Testing parallel builds #1
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 workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Setup AIO CLI and Push Artifacts to RDE | |
on: | |
push: | |
branches: [ feature/cv-div-deploy ] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build, Unit Test and push Artifacts to Artifactory | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
java: [11] | |
profile: ['-Pclassic'] | |
node-version: [20] | |
steps: | |
# Check out Git repository | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Set up environment with Java and Maven | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' # See 'Supported distributions' for available options | |
java-version: ${{ matrix.java }} | |
# Set up dependency cache | |
- name: Cache local Maven repository | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
setup-aio: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 1 | |
matrix: | |
node-version: ['20'] | |
os: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Set up JDK 11 for x64 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "11" | |
distribution: "temurin" | |
architecture: x64 | |
server-id: artifactory | |
server-username: ARTIFACTORY_USERNAME_REF | |
server-password: ARTIFACTORY_TOKEN_REF | |
- name: Build with Maven | |
run: mvn clean package | |
env: | |
ARTIFACTORY_TOKEN_REF: ${{secrets.ARTIFACTORY_TOKEN}} | |
ARTIFACTORY_USERNAME_REF: ${{secrets.ARTIFACTORY_USERNAME}} | |
- name: Setup CLI | |
uses: adobe/[email protected] | |
with: | |
os: ${{ matrix.os }} | |
version: 10.1.0 | |
- name: Auth | |
uses: adobe/[email protected] | |
with: | |
os: ${{ matrix.os }} | |
command: oauth_sts | |
CLIENTID: ${{ vars.ADOBE_CM_CLIENT_ID }} | |
CLIENTSECRET: ${{ secrets.ADOBE_CM_CLIENT_SECRETS }} | |
TECHNICALACCOUNTID: ${{ vars.ADOBE_CM_TECHNICAL_ACCOUNT_ID }} | |
TECHNICALACCOUNTEMAIL: ${{ vars.ADOBE_CM_TECHNICAL_ACCOUNT_EMAIL }} | |
IMSORGID: ${{ vars.ADOBE_CM_IMS_ORG_ID }} | |
SCOPES: ${{ vars.ADOBE_CM_AUTH_SCOPES }} | |
- name: Install Adobe AIO CLI Plugin for Cloud Manager | |
run: aio plugins:install @adobe/aio-cli-plugin-cloudmanager | |
- name: Install Adobe AIO CLI Plugin for Cloud Manager for RDE | |
run: aio plugins:install @adobe/aio-cli-plugin-aem-rde | |
- name: Configure Adobe AIO CLI | |
run: | | |
aio config:set cloudmanager_orgid 297215F354E746E90A4C98A4@AdobeOrg | |
aio config:set cloudmanager_programid 30802 | |
aio config:set cloudmanager_environmentid 1394203 | |
# - name: Reset RDE (optional) | |
# run: aio aem:rde:reset | |
- name: Deploy content-package ALL | |
run: aio aem:rde:install -t content-package aem65-cv-divisional-apps/all/target/aem-cv-divisional-apps.all-1.0.0-SNAPSHOT.zip | |
#- name: Deploy dispatcher-config | |
# run: aio aem:rde:install -q -t dispatcher-config dispatcher/target/aem-guides-wknd.dispatcher.cloud-3.2.1-SNAPSHOT.zip | |