Correct CI references #1627
Workflow file for this run
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
name: ACS Packaging CI | |
on: | |
pull_request: | |
branches: | |
- feature/** | |
- fix/** | |
- master | |
- release/** | |
push: | |
branches: | |
- feature/** | |
- fix/** | |
workflow_call: | |
workflow_dispatch: | |
env: | |
JAVA_VERSION: "11" | |
AZURE_AUTHENTICATION_MODE: sharedKey | |
AZURE_STORAGE_ACCOUNT_NAME: acspackagingci | |
AZURE_STORAGE_ACCOUNT_KEY: ${{ secrets.AZURE_PACKAGING_STORAGE_ACCOUNT_KEY }} | |
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 | |
GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }} | |
GIT_EMAIL: ${{ secrets.BOT_GITHUB_EMAIL }} | |
GIT_PASSWORD: ${{ secrets.BOT_GITHUB_TOKEN }} | |
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | |
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} | |
AWS_REGION: eu-west-1 | |
TAS_ENVIRONMENT: ./tests/environment | |
TAS_SCRIPTS: ../alfresco-community-repo/packaging/tests/scripts | |
ALF_LICENCE_S3_PATH: s3://acs-license/acs/alf71-allenabled.lic | |
ALF_LICENCE_LOCAL_PATH: /tmp/licence.lic | |
PYTHON_VERSION: 3.7.15 | |
DTAS_VERSION: v1.1 | |
jobs: | |
veracode: | |
name: "Source Clear Scan (SCA)" | |
runs-on: ubuntu-latest | |
if: > | |
((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) && github.event_name != 'pull_request') && | |
!contains(github.event.head_commit.message, '[skip tests]') | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: "Init" | |
run: bash ./scripts/ci/init.sh | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
continue-on-error: true | |
with: | |
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} | |
- name: "Clean Maven cache" | |
run: bash ./scripts/ci/cleanup_cache.sh | |
tas_tests: | |
name: ${{ matrix.testSuite }} TAS tests | |
runs-on: ubuntu-latest | |
if: > | |
contains(github.event.head_commit.message, '[tas]') && | |
!contains(github.event.head_commit.message, '[skip tests]') | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- testSuite: REST API part1 | |
pom-dir: tests/tas-restapi | |
profiles: all-tas-tests,run-restapi-part1 | |
compose-file: docker-compose-rest-api-tests.yml | |
deploy-timeout: 60 | |
- testSuite: REST API part2 | |
pom-dir: tests/tas-restapi | |
profiles: all-tas-tests,run-restapi-part2 | |
compose-file: docker-compose-rest-api-tests.yml | |
deploy-timeout: 60 | |
- testSuite: REST API part3 | |
pom-dir: tests/tas-restapi | |
profiles: all-tas-tests,run-restapi-part3 | |
compose-file: docker-compose-rest-api-tests.yml | |
deploy-timeout: 60 | |
- testSuite: CMIS (BROWSER binding) | |
pom-dir: tests/tas-cmis | |
profiles: all-tas-tests,run-cmis-browser | |
compose-file: docker-compose-cmis-tests.yml | |
deploy-timeout: 40 | |
- testSuite: CMIS (ATOM binding) | |
pom-dir: tests/tas-cmis | |
profiles: all-tas-tests,run-cmis-atom | |
compose-file: docker-compose-cmis-tests.yml | |
deploy-timeout: 40 | |
- testSuite: CMIS (WEBSERVICES binding) | |
pom-dir: tests/tas-cmis | |
profiles: all-tas-tests,run-cmis-webservices | |
compose-file: docker-compose-cmis-tests.yml | |
deploy-timeout: 40 | |
- testSuite: Email | |
pom-dir: tests/tas-email | |
profiles: all-tas-tests | |
compose-file: docker-compose-email-tests.yml | |
deploy-timeout: 30 | |
- testSuite: WebDAV | |
pom-dir: tests/tas-webdav | |
profiles: all-tas-tests | |
compose-file: docker-compose-minimal.yml | |
deploy-timeout: 20 | |
- testSuite: Integration | |
pom-dir: tests/tas-integration | |
profiles: all-tas-tests | |
compose-file: docker-compose-integration-tests.yml | |
deploy-timeout: 30 | |
- testSuite: LDAP | |
pom-dir: tests/tas-integration | |
profiles: run-ldap | |
compose-file: docker-compose-with-ldap.yml | |
deploy-timeout: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: "Build" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: | | |
bash ./scripts/ci/init.sh | |
bash ./scripts/ci/build.sh | |
- name: "Set up the environment" | |
run: | | |
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/${{ matrix.compose-file }} | |
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco" | |
- name: "Run tests" | |
id: tests | |
timeout-minutes: ${{ matrix.deploy-timeout }} | |
run: mvn -B install -ntp -f ${{ matrix.pom-dir }}/pom.xml -P${{ matrix.profiles }} -Denvironment=default -DrunBugs=false | |
- name: "Print output after failure" | |
if: ${{ always() && steps.tests.outcome == 'failure' }} | |
run: ${TAS_SCRIPTS}/output_logs_for_failures.sh "${{ matrix.pom-dir }}" | |
- name: "Clean Maven cache" | |
run: bash ./scripts/ci/cleanup_cache.sh | |
tas_tests_with_aims: | |
name: ${{ matrix.testSuite }} TAS tests with AIMS | |
runs-on: ubuntu-latest | |
if: > | |
!contains(github.event.head_commit.message, '[skip tas]') && | |
!contains(github.event.head_commit.message, '[skip tests]') | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- testSuite: REST API | |
pom: tests/tas-restapi/pom.xml | |
profiles: all-tas-tests,run-restapi-aims | |
deploy-timeout: 60 | |
- testSuite: CMIS - BROWSER binding | |
pom: tests/tas-cmis/pom.xml | |
profiles: all-tas-tests,run-cmis-browser-with-aims | |
deploy-timeout: 40 | |
- testSuite: CMIS - ATOM binding | |
pom: tests/tas-cmis/pom.xml | |
profiles: all-tas-tests,run-cmis-atom-with-aims | |
deploy-timeout: 40 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: "Build" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: | | |
bash ./scripts/ci/init.sh | |
bash ./scripts/ci/build.sh | |
- name: "Set HOST_IP" | |
run: echo "HOST_IP=$(hostname -I | cut -f1 -d' ')" >> $GITHUB_ENV | |
- name: "Set up the environment" | |
run: | | |
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-aims.yml | |
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco" 180 | |
- name: "Run tests" | |
id: tests | |
timeout-minutes: ${{ matrix.deploy-timeout }} | |
run: mvn -B install -ntp -f ${{ matrix.pom }} -P${{ matrix.profiles }} -Denvironment=aims-environment -DrunBugs=false "-Didentity-service.auth-server-url=http://${HOST_IP}:8999/auth" | |
- name: "Print output after failure" | |
if: ${{ always() && matrix.testSuite == 'REST API' && steps.tests.outcome == 'failure' }} | |
run: ${TAS_SCRIPTS}/output_logs_for_failures.sh "tests/tas-restapi" | |
- name: "Clean Maven cache" | |
run: bash ./scripts/ci/cleanup_cache.sh | |
syncservice_tas_tests: | |
name: "Sync Service TAS tests" | |
runs-on: ubuntu-latest | |
if: > | |
!contains(github.event.head_commit.message, '[skip tas]') && | |
!contains(github.event.head_commit.message, '[skip tests]') | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: "Build" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: | | |
bash ./scripts/ci/init.sh | |
bash ./scripts/ci/build.sh | |
- name: "Set up the environment" | |
run: | | |
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-sync-service.yml | |
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco" | |
- name: "Run tests" | |
id: tests | |
timeout-minutes: 40 | |
run: mvn -B install -ntp -f tests/tas-sync-service/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false | |
- name: "Print output after failure" | |
if: ${{ always() && steps.tests.outcome == 'failure' }} | |
run: ${TAS_SCRIPTS}/output_logs_for_failures.sh "tests/tas-sync-service" | |
- name: "Clean Maven cache" | |
run: bash ./scripts/ci/cleanup_cache.sh | |
tas_tests_search_api: | |
name: ${{ matrix.testSuite }} | TAS tests (Search API) | |
runs-on: ubuntu-latest | |
if: > | |
!contains(github.event.head_commit.message, '[skip search]') && | |
!contains(github.event.head_commit.message, '[skip tests]') | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- testSuite: Elasticsearch | |
profiles: all-tas-tests,elastic | |
search-engine-type: elasticsearch | |
- testSuite: Elasticsearch Basic Auth | |
profiles: all-tas-tests,elastic-basic-auth | |
search-engine-type: elasticsearch | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: "Build" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: | | |
bash ./scripts/ci/init.sh | |
bash ./scripts/ci/build.sh | |
- name: "Run tests" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: mvn -B install -ntp -pl ":content-repository-elasticsearch-test" -am -P${{ matrix.profiles }} -Denvironment=default -DrunBugs=false "-Dsearch.engine.type=${{ matrix.search-engine-type }}" | |
- name: "Clean Maven cache" | |
run: bash ./scripts/ci/cleanup_cache.sh | |
upgrade_tas_tests: | |
name: Upgrade Elasticsearch TAS tests | |
runs-on: ubuntu-latest | |
if: > | |
!contains(github.event.head_commit.message, '[skip search]') && | |
!contains(github.event.head_commit.message, '[skip tests]') | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: "Build" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: | | |
bash ./scripts/ci/init.sh | |
bash ./scripts/ci/build.sh | |
- name: "Configure AWS credentials" | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_S3_ACSLICENSE_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_S3_ACSLICENSE_SECRET_ACCESS_KEY }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: "Copy Licence" | |
run: aws s3 cp ${ALF_LICENCE_S3_PATH} ${ALF_LICENCE_LOCAL_PATH} | |
- name: "Run tests" | |
timeout-minutes: 30 | |
run: mvn -B install -ntp -pl ":content-repository-elasticsearch-test" -am -Pall-tas-tests,elastic-upgrade -Denvironment=default -DrunBugs=false "-Dsearch.engine.type=elasticsearch" | |
- name: "Clean Maven cache" | |
run: bash ./scripts/ci/cleanup_cache.sh | |
all_amps_tests: | |
name: "All AMPs tests" | |
runs-on: ubuntu-latest | |
if: > | |
!contains(github.event.head_commit.message, '[skip tests]') | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: "Build" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: | | |
bash ./scripts/ci/init.sh | |
bash ./scripts/ci/build.sh | |
- name: "Set up the environment" | |
run: mvn -B -q install -ntp -f tests/tas-all-amps/pom.xml -DskipTests -Pall-tas-tests,prepare-wars-with-amps | |
- name: "Run tests" | |
id: tests | |
timeout-minutes: 20 | |
env: | |
AWS_ACCESS_KEY: ${{ secrets.AWS_S3_PIPELINE_AMPS_ACCESS_KEY_ID }} | |
AWS_SECRET_KEY: ${{ secrets.AWS_S3_PIPELINE_AMPS_SECRET_ACCESS_KEY }} | |
run: | | |
./tests/scripts/checkLibraryDuplicates.sh ./tests/tas-all-amps/target/war/alfresco/WEB-INF/lib | |
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-all-amps-test.yml | |
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco" | |
mvn -B install -ntp -f tests/tas-all-amps/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false | |
- name: "Print output after failure" | |
if: ${{ always() && steps.tests.outcome == 'failure' }} | |
run: ${TAS_SCRIPTS}/output_logs_for_failures.sh "tests/tas-all-amps" | |
- name: "Clean Maven cache" | |
run: bash ./scripts/ci/cleanup_cache.sh | |
distribution_zip_content_tests: | |
name: "Distribution Zip content tests" | |
runs-on: ubuntu-latest | |
if: > | |
!contains(github.event.head_commit.message, '[skip tests]') | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: "Build" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: | | |
bash ./scripts/ci/init.sh | |
bash ./scripts/ci/build.sh | |
- name: "Set up the environment" | |
run: mvn -B -V clean install -ntp -Pags -DskipTests -Dmaven.javadoc.skip=true | |
- name: "Run tests" | |
id: tests | |
timeout-minutes: 20 | |
run: mvn -B install -ntp -f tests/tas-distribution-zip/pom.xml -Prun-distribution-zip-contents-check -DrunBugs=false | |
- name: "Print output after failure" | |
if: ${{ always() && steps.tests.outcome == 'failure' }} | |
run: ${TAS_SCRIPTS}/output_logs_for_failures.sh "tests/tas-distribution-zip" | |
- name: "Clean Maven cache" | |
run: bash ./scripts/ci/cleanup_cache.sh | |
single_pipeline_image_tests: | |
name: "Single Pipeline image tests" | |
runs-on: ubuntu-latest | |
if: > | |
github.event_name != 'pull_request' && | |
!contains(github.event.head_commit.message, '[skip tests]') | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: "Build" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: | | |
bash ./scripts/ci/init.sh | |
bash ./scripts/ci/build.sh | |
- name: "Set up the environment" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
env: | |
AWS_ACCESS_KEY: ${{ secrets.AWS_S3_PIPELINE_AMPS_ACCESS_KEY_ID }} | |
AWS_SECRET_KEY: ${{ secrets.AWS_S3_PIPELINE_AMPS_SECRET_ACCESS_KEY }} | |
run: | | |
mvn -B clean install -ntp -Ppipeline,build-docker-images $(mvn -B -q help:evaluate "-Dexpression=dependency.alfresco-enterprise-repo.version" -DforceStdout | grep -q '\-SNAPSHOT$' && echo '-Drepo.image.tag=latest') $(mvn -B -q help:evaluate "-Dexpression=dependency.alfresco-enterprise-share.version" -DforceStdout | grep -q '\-SNAPSHOT$' && echo '-Dshare.image.tag=latest') | |
cat tests/pipeline-all-amps/repo/target/dtas/dtas-config.json | |
pip install requests pytest==6.2.4 pytest-testinfra==6.3.0 jmespath==0.10.0 | |
git clone --depth 1 --branch $DTAS_VERSION https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/Alfresco/alfresco-deployment-test-automation-scripts.git dtas | |
docker images | grep pipeline | |
${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-pipeline-all-amps.yml | |
${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco/" 180 | |
docker ps | |
curl -v --user [email protected]:admin http://localhost:8080/alfresco/api/discovery | |
- name: "Run tests" | |
run: | | |
cd dtas | |
pytest --configuration ../tests/pipeline-all-amps/repo/target/dtas/dtas-config.json tests/ -s | |
- name: "Clean Maven cache" | |
run: bash ./scripts/ci/cleanup_cache.sh |