-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
143 changed files
with
9,162 additions
and
553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
# Copyright 2021 Adobe Systems Incorporated | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
name: Deploy to Cloud Manager | ||
env: | ||
CM_PROJECT_DIR: cm-project | ||
# Cloud Manager git connection details | ||
CM_REPO: ${{ secrets.CM_REPO }} | ||
CM_BRANCH: ${{ secrets.CM_BRANCH }} | ||
CM_USER_EMAIL: ${{ secrets.CM_USER_EMAIL }} | ||
CM_USER_NAME: ${{ secrets.CM_USER_NAME }} | ||
CM_USER_PWD: ${{ secrets.CM_USER_PWD }} | ||
# Cloud Manager deployment testing details | ||
CM_TEST_URL: ${{ secrets.CM_TEST_URL }} | ||
CM_TEST_RETRIES: 120 | ||
|
||
# Only run on a push to develop branch or manually | ||
on: | ||
push: | ||
branches: [ develop ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout this project into a sub folder | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: archetype | ||
# Set up dependency cache | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('archetype/**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
# Install archetype snapshot and store version in a variable | ||
- name: Install archetype snapshot and store version in a variable | ||
run: | | ||
cd archetype | ||
mvn clean install -Darchetype.test.skip | ||
echo "ARCHETYPE_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV | ||
echo "ARCHETYPE_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV | ||
cd .. | ||
# Create new project | ||
- name: Create new project with the archetype | ||
run: | | ||
mvn -B archetype:generate \ | ||
-D archetypeGroupId=com.adobe.aem \ | ||
-D archetypeArtifactId=aem-project-archetype \ | ||
-D archetypeVersion=${ARCHETYPE_VERSION} \ | ||
-D appTitle="Sites 30 Demo" \ | ||
-D appId="sitesdemo" \ | ||
-D groupId="com.sites30demo" \ | ||
-D includeExamples="y" | ||
# Set global git configuration | ||
- name: Set git config | ||
run: | | ||
git config --global credential.helper cache | ||
git config --global user.email ${CM_USER_EMAIL} | ||
git config --global user.name ${CM_USER_NAME} | ||
# Checkout the CM project | ||
- name: Checkout Cloud Manager project | ||
run: | ||
git clone -b ${CM_BRANCH} https://${CM_USER_NAMEL}:${CM_USER_PWD}@${CM_REPO} ${CM_PROJECT_DIR} | ||
# Move new project to CM dir | ||
- name: Move project to CM dir | ||
run: | | ||
git -C ${CM_PROJECT_DIR} rm -rf . | ||
mv sitesdemo/* ${CM_PROJECT_DIR} | ||
sed -i -e "s/USA/USA, ${ARCHETYPE_COMMIT}/g" ${CM_PROJECT_DIR}/ui.content/src/main/content/jcr_root/content/experience-fragments/sitesdemo/us/en/site/footer/master/.content.xml | ||
sed -i -e "s/merge/replace/g" ${CM_PROJECT_DIR}/ui.content/src/main/content/META-INF/vault/filter.xml | ||
# Commit and push changes to CM repo | ||
- name: Commit Changes | ||
run: | | ||
git -C archetype log --format="%an : %s" -n 1 > commit.txt | ||
git -C ${CM_PROJECT_DIR} add . | ||
git -C ${CM_PROJECT_DIR} commit -F ../commit.txt | ||
git -C ${CM_PROJECT_DIR} push | ||
# Check project was deployed | ||
- name: Check project was deployed | ||
run: | | ||
counter=0 | ||
max=${CM_TEST_RETRIES} | ||
until [[ $(curl --silent ${CM_TEST_URL} | grep ${ARCHETYPE_COMMIT}) ]]; do \ | ||
if [ ${counter} -eq ${max} ]; then \ | ||
echo "Could not find ${ARCHETYPE_COMMIT} after ${counter} tries!"; \ | ||
exit 1; \ | ||
fi; | ||
counter=$(($counter+1)); \ | ||
echo "$counter"; \ | ||
sleep 60; \ | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
* text=auto | ||
|
||
*.conf text | ||
*.vhost text | ||
*.rules text | ||
*.vars text | ||
*.any text | ||
magic text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,7 +85,6 @@ buildNumber.properties | |
|
||
# NPM | ||
node_modules/ | ||
package-lock.json | ||
yarn.lock | ||
|
||
# Webpack | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
src/main/archetype/core/src/main/java/core/models/commerce/MyProductTeaser.java
This file was deleted.
Oops, something went wrong.
121 changes: 0 additions & 121 deletions
121
src/main/archetype/core/src/main/java/core/models/commerce/MyProductTeaserImpl.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.