Skip to content

Commit

Permalink
Merge branch 'release/27'
Browse files Browse the repository at this point in the history
  • Loading branch information
bpauli committed Mar 24, 2021
2 parents a0ffb4e + 8e933a7 commit f534d74
Show file tree
Hide file tree
Showing 143 changed files with 9,162 additions and 553 deletions.
108 changes: 108 additions & 0 deletions .github/workflows/maven-deploy-cm.yml
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
6 changes: 4 additions & 2 deletions .github/workflows/maven-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ name: Test

on:
push:
branches: [ master ]
branches: [ master, develop ]
pull_request:
branches: [ master ]
branches: [ master, develop ]

jobs:
build:
Expand All @@ -32,6 +32,8 @@ jobs:
java: [8, 11]

steps:
- name: Configure git with longpath enabled (for windows)
run: git config --global core.longpaths true
# Check out Git repository
- name: Checkout code
uses: actions/checkout@v2
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Maven template that creates a minimal, best-practices-based Adobe Experience Man
To generate a project, adjust the following command line to your needs:

* Set `aemVersion=cloud` for [AEM as a Cloud Service](https://docs.adobe.com/content/help/en/experience-manager-cloud-service/landing/home.html);
Set `aemVersion=6.5.5` for [Adobe Managed Services](https://github.com/adobe/aem-project-archetype/tree/master/src/main/archetype/dispatcher.ams), or on-premise.
The Core Components dependency is only added for non cloud aem versions as the Core Components are provided OOTB for AEM as a Cloud
Set `aemVersion=6.5.7` for [Adobe Managed Services](https://github.com/adobe/aem-project-archetype/tree/master/src/main/archetype/dispatcher.ams), or on-premise.
The Core Components dependency is only added for non cloud aem versions as the Core Components are provided OOTB for AEM as a Cloud
Service.
* Adjust `appTitle="My Site"` to define the website title and components groups.
* Adjust `appId="mysite"` to define the Maven artifactId, the component, config and content folder names, as well as client library names.
Expand All @@ -53,7 +53,7 @@ To generate a project, adjust the following command line to your needs:
mvn -B archetype:generate \
-D archetypeGroupId=com.adobe.aem \
-D archetypeArtifactId=aem-project-archetype \
-D archetypeVersion=26 \
-D archetypeVersion=27 \
-D appTitle="My Site" \
-D appId="mysite" \
-D groupId="com.mysite"
Expand Down Expand Up @@ -87,14 +87,14 @@ Name | Default | Description
`includeForms` | `n` | Includes [Forms Core Components](https://github.com/adobe/aem-core-forms-components) dependencies and generates corresponding artifacts.
`sdkFormsVersion` | `latest` | When `aemVersion=cloud` and `includeForms=y` an Forms SDK version can be specified (e.g. `2020.12.17.02`).
`datalayer` | `y` | Activate integration with [Adobe Client Data Layer](https://docs.adobe.com/content/help/en/experience-manager-core-components/using/developing/data-layer/overview.html).
`amp` | `n` | Enable [AMP](https://docs.adobe.com/content/help/en/experience-manager-core-components/using/developing/amp.html) support for genenerated project templates.
`amp` | `n` | Enable [AMP](https://docs.adobe.com/content/help/en/experience-manager-core-components/using/developing/amp.html) support for genenerated project templates.
`enableDynamicMedia` | `n` | Enabled foundation DynamicMedia components in project policy settings and activates Dynamic Media features in Core Image component's policy.

## System Requirements

Archetype | AEM as a Cloud Service | AEM 6.5 | AEM 6.4 | Java SE | Maven
---------|---------|---------|---------|---------|---------
[26](https://github.com/adobe/aem-project-archetype/releases/tag/aem-project-archetype-26) | Continual | 6.5.5.0+ | 6.4.8.1+ | 8, 11 | 3.3.9+
[27](https://github.com/adobe/aem-project-archetype/releases/tag/aem-project-archetype-27) | Continual | 6.5.7.0+ | 6.4.8.4+ | 8, 11 | 3.3.9+

Setup your local development environment for [AEM as a Cloud Service SDK](https://docs.adobe.com/content/help/en/experience-manager-learn/cloud-service/local-development-environment-set-up/overview.html) or for [older versions of AEM](https://docs.adobe.com/content/help/en/experience-manager-learn/foundation/development/set-up-a-local-aem-development-environment.html).

Expand Down
3 changes: 1 addition & 2 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ Archetype Version | AEM Version
19 | 6.5, 6.4, 6.3 + SP3
20, 21, 22 | 6.5, 6.4, 6.3 + SP3
23 | 6.5, 6.4, 6.3 + SP3, AEM as a Cloud Service
24 | 6.5.5, 6.4.8.1, AEM as a Cloud Service
25 | 6.5.5, 6.4.8.1, AEM as a Cloud Service
24,25,26 | 6.5.5, 6.4.8.1, AEM as a Cloud Service
8 changes: 8 additions & 0 deletions src/main/archetype/.gitattributes
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
1 change: 0 additions & 1 deletion src/main/archetype/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ buildNumber.properties

# NPM
node_modules/
package-lock.json
yarn.lock

# Webpack
Expand Down
14 changes: 11 additions & 3 deletions src/main/archetype/all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@
<configuration>
<group>${groupId}</group>
<packageType>container</packageType>
<properties>
<cloudManagerTarget>all</cloudManagerTarget>
</properties>
<!-- skip sub package validation for now as some vendor packages like CIF apps will not pass -->
<skipSubPackageValidation>true</skipSubPackageValidation>
<embeddeds>
Expand Down Expand Up @@ -125,6 +122,12 @@
#end
#end
#if ( $includeExamples == "y" )
<embedded>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.examples.ui.config</artifactId>
<type>zip</type>
<target>/apps/${appId}-vendor-packages/application/install</target>
</embedded>
<embedded>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.examples.ui.apps</artifactId>
Expand Down Expand Up @@ -353,6 +356,11 @@
</dependency>
#end
#if ( $includeExamples == "y" )
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.examples.ui.config</artifactId>
<type>zip</type>
</dependency>
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.examples.ui.apps</artifactId>
Expand Down
1 change: 0 additions & 1 deletion src/main/archetype/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ Import-Package: javax.annotation;version=0.0.0,*
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<classifier>apis</classifier>
</dependency>
<dependency>
<groupId>com.adobe.cq</groupId>
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit f534d74

Please sign in to comment.