From 04b9c9ec56772255910de0c695fe438e107b4006 Mon Sep 17 00:00:00 2001 From: "Mark J. Becker" Date: Wed, 12 May 2021 13:42:54 +0200 Subject: [PATCH 1/5] CIF-2007 - Use latest release of CIF add-on from artifactory --- .circleci/ci/it-tests.js | 10 +++-- .circleci/settings.xml | 84 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 .circleci/settings.xml diff --git a/.circleci/ci/it-tests.js b/.circleci/ci/it-tests.js index 8cace863..a5d8a4ee 100644 --- a/.circleci/ci/it-tests.js +++ b/.circleci/ci/it-tests.js @@ -40,10 +40,12 @@ try { // The core components are already installed in the Cloud SDK extras += ` --bundle com.adobe.cq:core.wcm.components.all:${wcmVersion}:zip`; + } else if (classifier == 'cloud') { - // Download the CIF Add-On - ci.sh(`curl -s "${process.env.CIF_ADDON_URL}" -o cif-addon.far`); - extras = '--install-file cif-addon.far'; + // Get CIF add-on for cloud SDK. Use the following version keywords: + // LATEST: latest snapshot version + // LATEST-RELEASE: latest release version + extras = '--bundle com.adobe.cq.cif:cif-cloud-ready-feature-pkg:LATEST-RELEASE:far:cq-commerce-addon-authorfar' } // Install SNAPSHOT or current version of CIF examples bundle @@ -59,7 +61,7 @@ try { --bundle org.apache.sling:org.apache.sling.junit.core:1.0.23:jar \ ${extras} \ --install-file /home/circleci/build/all/target/venia.all-${veniaVersion}-${classifier}.zip \ - --vm-options \\\"-Xmx1536m -XX:MaxPermSize=256m -Djava.awt.headless=true -javaagent:${process.env.JACOCO_AGENT}=destfile=crx-quickstart/jacoco-it.exec\\\"`); + --vm-options \\\"-Xmx1536m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dorg.apache.maven.user-settings=.circleci/settings.xml -javaagent:${process.env.JACOCO_AGENT}=destfile=crx-quickstart/jacoco-it.exec\\\"`); }); // Run integration tests diff --git a/.circleci/settings.xml b/.circleci/settings.xml new file mode 100644 index 00000000..a33693bc --- /dev/null +++ b/.circleci/settings.xml @@ -0,0 +1,84 @@ + + + + + + + artifactory-cloud + + + maven-adobe-cif-release + maven-adobe-cif-release + https://artifactory-uw2.adobeitc.com/artifactory/maven-adobe-cif-release + + maven-adobe-cif-snapshot + maven-adobe-cif-snapshot + https://artifactory-uw2.adobeitc.com/artifactory/maven-adobe-cif-snapshot + + + + + + false + + maven-adobe-cif-release + maven-adobe-cif-release + https://artifactory-uw2.adobeitc.com/artifactory/maven-adobe-cif-release + + + + maven-adobe-cif-snapshot + maven-adobe-cif-snapshot + https://artifactory-uw2.adobeitc.com/artifactory/maven-adobe-cif-snapshot + + + + + + + false + + maven-adobe-cif-release + maven-adobe-cif-release + https://artifactory-uw2.adobeitc.com/artifactory/maven-adobe-cif-release + + + + maven-adobe-cif-snapshot + maven-adobe-cif-snapshot + https://artifactory-uw2.adobeitc.com/artifactory/maven-adobe-cif-snapshot + + + + + + + + maven-adobe-cif-release + ${env.DOCKER_USER} + ${env.DOCKER_PASS} + + + maven-adobe-cif-snapshot + ${env.DOCKER_USER} + ${env.DOCKER_PASS} + + + + \ No newline at end of file From 1070036511af21efe6dc969b8be03fff711f9020 Mon Sep 17 00:00:00 2001 From: "Mark J. Becker" Date: Wed, 12 May 2021 13:57:03 +0200 Subject: [PATCH 2/5] CIF-2007 - Use latest release of CIF add-on from artifactory --- .circleci/ci/it-tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/ci/it-tests.js b/.circleci/ci/it-tests.js index a5d8a4ee..fc2c53ef 100644 --- a/.circleci/ci/it-tests.js +++ b/.circleci/ci/it-tests.js @@ -61,7 +61,7 @@ try { --bundle org.apache.sling:org.apache.sling.junit.core:1.0.23:jar \ ${extras} \ --install-file /home/circleci/build/all/target/venia.all-${veniaVersion}-${classifier}.zip \ - --vm-options \\\"-Xmx1536m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dorg.apache.maven.user-settings=.circleci/settings.xml -javaagent:${process.env.JACOCO_AGENT}=destfile=crx-quickstart/jacoco-it.exec\\\"`); + --vm-options \\\"-Xmx1536m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dorg.apache.maven.user-settings=/home/circleci/build/.circleci/settings.xml -javaagent:${process.env.JACOCO_AGENT}=destfile=crx-quickstart/jacoco-it.exec\\\"`); }); // Run integration tests From 721cc99718a69d81fcb8335cfe4a497b84f08cab Mon Sep 17 00:00:00 2001 From: "Mark J. Becker" Date: Wed, 12 May 2021 14:51:43 +0200 Subject: [PATCH 3/5] CIF-2007 - Use latest release of CIF add-on from artifactory --- .circleci/ci/it-tests.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/ci/it-tests.js b/.circleci/ci/it-tests.js index fc2c53ef..9df0e6fb 100644 --- a/.circleci/ci/it-tests.js +++ b/.circleci/ci/it-tests.js @@ -17,6 +17,7 @@ const ci = new (require('./ci.js'))(); ci.context(); const qpPath = '/home/circleci/cq'; +const buildPath = '/home/circleci/build'; const { TYPE, BROWSER } = process.env; try { @@ -42,16 +43,15 @@ try { extras += ` --bundle com.adobe.cq:core.wcm.components.all:${wcmVersion}:zip`; } else if (classifier == 'cloud') { - // Get CIF add-on for cloud SDK. Use the following version keywords: - // LATEST: latest snapshot version - // LATEST-RELEASE: latest release version - extras = '--bundle com.adobe.cq.cif:cif-cloud-ready-feature-pkg:LATEST-RELEASE:far:cq-commerce-addon-authorfar' + // Download latest add-on release from artifactory + ci.sh(`mvn -s ${buildPath}/.circleci/settings.xml com.googlecode.maven-download-plugin:download-maven-plugin:1.6.3:artifact -Partifactory-cloud -DgroupId=com.adobe.cq.cif -DartifactId=cif-cloud-ready-feature-pkg -Dversion=LATEST -Dtype=far -Dclassifier=cq-commerce-addon-authorfar -DoutputDirectory=${buildPath}/dependencies -DoutputFileName=addon.far`); + extras = ` --install-file ${buildPath}/dependencies/addon.far`; } // Install SNAPSHOT or current version of CIF examples bundle if (cifVersion.endsWith('-SNAPSHOT')) { let jar = `core-cif-components-examples-bundle-${cifVersion}.jar`; - extras += ` --install-file /home/circleci/build/dependencies/aem-core-cif-components/examples/bundle/target/${jar}`; + extras += ` --install-file ${buildPath}/dependencies/aem-core-cif-components/examples/bundle/target/${jar}`; } else { extras += ` --bundle com.adobe.commerce.cif:core-cif-components-examples-bundle:${cifVersion}:jar`; } @@ -60,8 +60,8 @@ try { ci.sh(`./qp.sh -v start --id author --runmode author --port 4502 --qs-jar /home/circleci/cq/author/cq-quickstart.jar \ --bundle org.apache.sling:org.apache.sling.junit.core:1.0.23:jar \ ${extras} \ - --install-file /home/circleci/build/all/target/venia.all-${veniaVersion}-${classifier}.zip \ - --vm-options \\\"-Xmx1536m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dorg.apache.maven.user-settings=/home/circleci/build/.circleci/settings.xml -javaagent:${process.env.JACOCO_AGENT}=destfile=crx-quickstart/jacoco-it.exec\\\"`); + --install-file ${buildPath}/all/target/venia.all-${veniaVersion}-${classifier}.zip \ + --vm-options \\\"-Xmx1536m -XX:MaxPermSize=256m -Djava.awt.headless=true -javaagent:${process.env.JACOCO_AGENT}=destfile=crx-quickstart/jacoco-it.exec\\\"`); }); // Run integration tests From 5d6bf5b88704e5c32fa39efa0d941d997b8daabb Mon Sep 17 00:00:00 2001 From: "Mark J. Becker" Date: Wed, 12 May 2021 15:14:15 +0200 Subject: [PATCH 4/5] CIF-2007 - Use latest release of CIF add-on for AEM 6.5 from artifactory --- .circleci/ci/it-tests.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.circleci/ci/it-tests.js b/.circleci/ci/it-tests.js index 9df0e6fb..d8fa87ed 100644 --- a/.circleci/ci/it-tests.js +++ b/.circleci/ci/it-tests.js @@ -25,19 +25,17 @@ try { let veniaVersion = ci.sh('mvn help:evaluate -Dexpression=project.version -q -DforceStdout', true); let cifVersion = ci.sh('mvn help:evaluate -Dexpression=core.cif.components.version -q -DforceStdout', true); let wcmVersion = ci.sh('mvn help:evaluate -Dexpression=core.wcm.components.version -q -DforceStdout', true); - let connectorVersion = '1.8.0-magento242ee'; - let graphqlClientVersion = ci.sh('mvn help:evaluate -Dexpression=graphql.client.version -q -DforceStdout', true); let classifier = process.env.AEM; ci.dir(qpPath, () => { // Connect to QP ci.sh('./qp.sh -v bind --server-hostname localhost --server-port 55555'); - // We install the graphql-client by default except with the CIF Add-On - let extras = `--bundle com.adobe.commerce.cif:graphql-client:${graphqlClientVersion}:jar`; + let extras; if (classifier == 'classic') { - // Install CIF connector - extras += ` --bundle com.adobe.commerce.cif:cif-connector-all:${connectorVersion}:zip`; + // Download latest add-on for AEM 6.5 release from artifactory + ci.sh(`mvn -s ${buildPath}/.circleci/settings.xml com.googlecode.maven-download-plugin:download-maven-plugin:1.6.3:artifact -Partifactory-cloud -DgroupId=com.adobe.cq.cif -DartifactId=commerce-addon-aem-650-all -Dversion=LATEST -Dtype=zip -DoutputDirectory=${buildPath}/dependencies -DoutputFileName=addon-650.zip`); + extras = ` --install-file ${buildPath}/dependencies/addon-650.zip`; // The core components are already installed in the Cloud SDK extras += ` --bundle com.adobe.cq:core.wcm.components.all:${wcmVersion}:zip`; From 03fd791d73d24478e615d50be9cb41ae17766801 Mon Sep 17 00:00:00 2001 From: "Mark J. Becker" Date: Wed, 12 May 2021 16:14:55 +0200 Subject: [PATCH 5/5] CIF-2007 - Fix UI tests --- ui.tests/test-module/specs/venia/xf-page-dialogs.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/ui.tests/test-module/specs/venia/xf-page-dialogs.js b/ui.tests/test-module/specs/venia/xf-page-dialogs.js index 58f7c145..a0ded6c1 100644 --- a/ui.tests/test-module/specs/venia/xf-page-dialogs.js +++ b/ui.tests/test-module/specs/venia/xf-page-dialogs.js @@ -54,16 +54,9 @@ describe('XF Page Component Dialog', function() { commerceTab.click(); expect($('h3=Commerce Pages')).toBeDisplayed(); - - if (config.aem.type === 'cloud') { - expect($('h3=Product selection')).toBeDisplayed(); - expect($('h3=Category selection')).toBeDisplayed(); - expect($('h3=Catalog placeholder location')).toBeDisplayed(); - } else { - expect($$('h3=Product selection').length).toBe(0); - expect($$('h3=Category selection').length).toBe(0); - expect($$('h3=Catalog placeholder location').length).toBe(0); - } + expect($('h3=Product selection')).toBeDisplayed(); + expect($('h3=Category selection')).toBeDisplayed(); + expect($('h3=Catalog placeholder location')).toBeDisplayed(); }); }); \ No newline at end of file