-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#27059: including fabric8.io maven docker plugin to run postman tests
- Loading branch information
1 parent
110141b
commit 9efff3c
Showing
8 changed files
with
205 additions
and
96 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
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 |
---|---|---|
|
@@ -20,7 +20,7 @@ concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
env: | ||
JVM_TEST_MAVEN_OPTS: "-e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" | ||
JVM_TEST_MAVEN_OPTS: "-e -B --no-transfer-progress -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" | ||
DOCKER_PLATFORMS: "linux/amd64,linux/arm64" | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: dotcms/dotcms_test | ||
|
@@ -187,7 +187,6 @@ jobs: | |
- name: Setup Context | ||
id: setup-docker-context | ||
run: | | ||
mkdir -p $DOCKER_BUILD_CONTEXT/context | ||
tar -xvf $DOCKER_BUILD_CONTEXT/docker-build.tar -C $DOCKER_BUILD_CONTEXT/context | ||
- name: Build base image | ||
|
@@ -407,7 +406,7 @@ jobs: | |
shell: bash | ||
env: | ||
NODE_CACHE_HIT: ${{ steps.cache-node-modules.outputs.cache-hit }} | ||
run: eval ./mvnw -Dprod $JVM_TEST_MAVEN_OPTS -Dskip.npm.install=${NODE_CACHE_HIT} $JVM_TEST_MAVEN_OPTS -pl :dotcms-core-web test | ||
run: eval ./mvnw -Dprod -Dskip.npm.install=${NODE_CACHE_HIT} $JVM_TEST_MAVEN_OPTS -pl :dotcms-core-web test | ||
- name: Prepare failure archive (if maven failed) | ||
if: failure() | ||
shell: bash | ||
|
@@ -533,12 +532,12 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
collection_group: [ 'graphql', 'workflow', 'template', 'page', 'container', 'pp', 'experiment', 'default' ] | ||
collection_group: [ 'category-container', 'content', 'experiment', 'graphql', 'page', 'pp', 'template', 'workflow', 'default' ] | ||
steps: | ||
- id: fetch-core | ||
name: Fetch Core Repo | ||
uses: actions/checkout@v3 | ||
- run: sudo npm install --location=global [email protected] | ||
- run: sudo npm install --location=global [email protected] [email protected] | ||
- id: docker-login | ||
name: Login to GHCR | ||
uses: docker/[email protected] | ||
|
@@ -551,22 +550,31 @@ jobs: | |
with: | ||
current: ${{ matrix.collection_group }} | ||
- name: Prepare license | ||
id: prepare-license | ||
run: | | ||
mkdir -p dotcms-postman/license | ||
touch dotcms-postman/license/license.dat | ||
echo "${{ secrets.DOTCMS_LICENSE }}" > dotcms-postman/license/license.dat | ||
chmod 777 dotcms-postman/license/license.dat | ||
postman_dir=${{ github.workspace }}/dotcms-postman | ||
docker_volumes_dir=${postman_dir}/target/docker-volumes | ||
[[ -d ${docker_volumes_dir} ]] && rm -rf ${docker_volumes_dir} | ||
dotcms_volumes_dir=${docker_volumes_dir}/dotcms | ||
license_dir=${dotcms_volumes_dir}/license | ||
mkdir -p ${license_dir} | ||
license_file=${license_dir}/license.dat | ||
touch ${license_file} | ||
echo "${{ secrets.DOTCMS_LICENSE }}" > ${license_file} | ||
chmod -R 777 ${license_dir} | ||
- id: run-postman-tests | ||
name: Run Postman Tests | ||
timeout-minutes: 90 | ||
run: | | ||
./mvnw $JVM_TEST_MAVEN_OPTS verify \ | ||
./mvnw -Dpostman-tests -Dprod $JVM_TEST_MAVEN_OPTS verify \ | ||
-pl :dotcms-postman \ | ||
-Dpostman.collections=\"${{ steps.resolve-postman-collections.outputs.collections_to_run }}\" | ||
-Dpostman.collections="${{ steps.resolve-postman-collections.outputs.collections_to_run }}" | ||
pec=$? | ||
[[ pec -eq 0 ]] || exit pec | ||
env: | ||
JVM_TEST_MAVEN_OPTS: "-e -B" | ||
DOTCMS_IMAGE: ${{ needs.build-jdk11.outputs.docker-tag }} | ||
- name: Prepare reports archive (if maven failed) | ||
if: failure() | ||
|
@@ -587,7 +595,7 @@ jobs: | |
with: | ||
name: "build-reports-test-postman - ${{ matrix.collection_group }}" | ||
path: | | ||
**/target/*-reports/TEST-*.xml | ||
**/dotcms-postman/target/postman-reports/TEST-*.xml | ||
target/build-report.json | ||
LICENSE | ||
retention-days: 2 | ||
|
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
Oops, something went wrong.