From 608763d36ea7f13fd88dd7a22c320a3c5f44a171 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Mon, 23 Jan 2023 16:00:28 +0100 Subject: [PATCH 01/25] initial commit --- .github/workflows/ci.yml | 116 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 13 +++-- 2 files changed, 123 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..4eaf176f6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,116 @@ +name: Alfresco Transform Core CI + +on: + push: + branches: + - feature/** + workflow_call: + workflow_dispatch: + +env: + DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} + GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 + JAVA_VERSION: "17" + MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }} + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} + +jobs: + veracode: + name: "Veracode - Source Clear Scan (SCA)" + runs-on: ubuntu-latest + if: always() + steps: + - uses: actions/checkout@v3 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.30.0 + with: + srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} + - name: "Clean Maven cache" + run: bash _ci/cleanup_cache.sh + + build_and_test: + name: "Core & Base Snapshot deployment" + runs-on: ubuntu-latest + needs: + if: always() + steps: + - uses: actions/checkout@v3 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.30.0 + - name: "Before install" + run: | + bash _ci/init.sh + - name: "Install" + timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} + run: | + mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase + - name: "Before script" + run: bash _ci/cache_artifacts.sh + - name: "Run tests" + timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} + run: | + mvn -B -U clean deploy -DadditionalOption=-Xdoclint:none -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase + + all_tests_matrix: + name: ${{ matrix.testSuite }} + runs-on: ubuntu-latest + needs: + if: always() + strategy: + fail-fast: false + matrix: + include: + - testName: ImageMagick + testPackage: imagemagick + - testName: LibreOffice + testPackage: libreoffice + - testName: Transform Misc + testPackage: misc + - testName: PDF Renderer + testPackage: pdf-renderer + - testName: Tika + testPackage: tika + steps: + - uses: actions/checkout@v3 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.30.0 + - name: "Before install" + run: | + bash _ci/init.sh + - name: "Install" + timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} + run: | + bash _ci/build.sh ${{ matrix.testPackage }} + - name: "Before script" + run: bash _ci/cache_artifacts.sh + - name: "Run tests" + timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} + run: | + bash _ci/test.sh ${{ matrix.testPackage }} + + all_in_one_transformer: + name: "All in One Transformer" + runs-on: ubuntu-latest + needs: + if: always() + steps: + - uses: actions/checkout@v3 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.30.0 + - name: "Before install" + run: | + bash _ci/init.sh + - name: "Install" + timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} + run: | + bash _ci/build.sh full-build + - name: "Before script" + run: bash _ci/cache_artifacts.sh + - name: "Run tests" + timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} + run: | + bash _ci/test.sh aio-test diff --git a/.travis.yml b/.travis.yml index 9d40d6931..637e44c3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,12 +18,13 @@ cache: branches: only: - - master - - /^SP\/.+$/ - - /^HF\/.+$/ - - /^ATS-.*$/ - - /^ACS-.*$/ - - /^MNT-.*$/ + - none +# - master +# - /^SP\/.+$/ +# - /^HF\/.+$/ +# - /^ATS-.*$/ +# - /^ACS-.*$/ +# - /^MNT-.*$/ stages: - name: Veracode Scan From f620c99d43b38ff9d055a2e1bfbf4bce657fd41e Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Mon, 23 Jan 2023 16:06:36 +0100 Subject: [PATCH 02/25] fix "needs" --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4eaf176f6..8539bcc92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,6 @@ jobs: build_and_test: name: "Core & Base Snapshot deployment" runs-on: ubuntu-latest - needs: if: always() steps: - uses: actions/checkout@v3 @@ -58,7 +57,6 @@ jobs: all_tests_matrix: name: ${{ matrix.testSuite }} runs-on: ubuntu-latest - needs: if: always() strategy: fail-fast: false @@ -95,7 +93,6 @@ jobs: all_in_one_transformer: name: "All in One Transformer" runs-on: ubuntu-latest - needs: if: always() steps: - uses: actions/checkout@v3 From c659e1b848b3c078d49585a4f737e0d2c0465a23 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Tue, 24 Jan 2023 12:19:56 +0100 Subject: [PATCH 03/25] fixes and add master release --- .github/workflows/ci.yml | 5 ++- .github/workflows/master_release.yml | 49 ++++++++++++++++++++++++++++ _ci/release.sh | 4 +-- _ci/test.sh | 4 +-- 4 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/master_release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8539bcc92..b66d0b0e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,9 @@ jobs: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.30.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.30.0 + - name: "Before install" + run: | + bash _ci/init.sh - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.30.0 with: srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} @@ -55,7 +58,7 @@ jobs: mvn -B -U clean deploy -DadditionalOption=-Xdoclint:none -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase all_tests_matrix: - name: ${{ matrix.testSuite }} + name: ${{ matrix.testName }} runs-on: ubuntu-latest if: always() strategy: diff --git a/.github/workflows/master_release.yml b/.github/workflows/master_release.yml new file mode 100644 index 000000000..e8b3f7317 --- /dev/null +++ b/.github/workflows/master_release.yml @@ -0,0 +1,49 @@ +name: Master/Release branch workflow + +on: + push: + branches: + - master + +env: + GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }} + GIT_EMAIL: ${{ secrets.BOT_GITHUB_EMAIL }} + GIT_PASSWORD: ${{ secrets.BOT_GITHUB_TOKEN }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }} + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} + GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 + +jobs: + run_ci: + uses: ./.github/workflows/ci.yml + secrets: inherit + + release: + name: "Release" + runs-on: ubuntu-latest + needs: [ run_ci ] + if: > + !failure() && + contains(github.event.head_commit.message, '[release]') && + github.event_name != 'pull_request' + steps: + - uses: actions/checkout@v3 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.30.0 + - name: "Init" + run: bash ./scripts/ci/init.sh + - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.30.0 + with: + username: ${{ env.GIT_USERNAME }} + email: ${{ env.GIT_EMAIL }} + global: true + - name: "Before script" + run: bash _ci/cache_artifacts.sh + - name: "Release" + timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} + run: | + bash _ci/release.sh diff --git a/_ci/release.sh b/_ci/release.sh index 64ae64dbc..c23ec90df 100644 --- a/_ci/release.sh +++ b/_ci/release.sh @@ -6,10 +6,10 @@ set -vex pushd "$(dirname "${BASH_SOURCE[0]}")/../" # For PR builds only execute a Dry Run of the release -[ "${TRAVIS_PULL_REQUEST}" = "false" ] && DRY_RUN="" || DRY_RUN="-DdryRun" +[ "${PULL_REQUEST}" = "false" ] && DRY_RUN="" || DRY_RUN="-DdryRun" # Travis CI runner work on DETACHED HEAD, so we need to checkout the release branch -git checkout -B "${TRAVIS_BRANCH}" +git checkout -B "${BRANCH_NAME}" git config user.email "build@alfresco.com" diff --git a/_ci/test.sh b/_ci/test.sh index 95c0a5b52..65c0082fa 100755 --- a/_ci/test.sh +++ b/_ci/test.sh @@ -6,10 +6,10 @@ set -vex pushd "$(dirname "${BASH_SOURCE[0]}")/../" # Always build the image, but only publish from the "master" branch -[ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && PROFILE="internal" || PROFILE="local" +[ "${PULL_REQUEST}" = "false" ] && [ "${BRANCH_NAME}" = "master" ] && PROFILE="internal" || PROFILE="local" # If the branch is "master" and the commit is not a Pull Request then deploy the JAR SNAPSHOT artifacts -[ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && DEPLOY="deploy" || DEPLOY="verify" +[ "${PULL_REQUEST}" = "false" ] && [ "${BRANCH_NAME}" = "master" ] && DEPLOY="deploy" || DEPLOY="verify" # Do not deploy snapshots for alfresco-transform-core, alfresco-transformer-base and alfresco-base-t-engine mvn -B -U -Dmaven.wagon.http.pool=false \ From 4ed45ccf7f7b77bedb8812ff018ab11ec3df1fcd Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Tue, 24 Jan 2023 13:01:18 +0100 Subject: [PATCH 04/25] fixes --- .github/workflows/ci.yml | 2 -- _ci/init.sh | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b66d0b0e6..975645e07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,8 +32,6 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.30.0 with: srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} - - name: "Clean Maven cache" - run: bash _ci/cleanup_cache.sh build_and_test: name: "Core & Base Snapshot deployment" diff --git a/_ci/init.sh b/_ci/init.sh index ccccbd8ce..fa186e45b 100644 --- a/_ci/init.sh +++ b/_ci/init.sh @@ -5,10 +5,12 @@ PS4="\[\e[35m\]+ \[\e[m\]" set -vex pushd "$(dirname "${BASH_SOURCE[0]}")/../" -mkdir -p ${HOME}/.m2 && cp -rf _ci/settings.xml ${HOME}/.m2/ +mkdir -p ${HOME}/.m2 && cp -f _ci/settings.xml ${HOME}/.m2/ +find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf + echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" --password-stdin quay.io echo "${DOCKERHUB_PASSWORD}" | docker login -u=${DOCKERHUB_USERNAME} --password-stdin docker.io -find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf + # Enable experimental docker features (e.g. squash options) echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json From 8f112f9b578419746b12782b25377572e7a4015b Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Tue, 24 Jan 2023 13:33:43 +0100 Subject: [PATCH 05/25] fixes --- .github/workflows/ci.yml | 4 ++-- .github/workflows/master_release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 975645e07..88701d4e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,8 @@ env: DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 JAVA_VERSION: "17" - MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} - MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} diff --git a/.github/workflows/master_release.yml b/.github/workflows/master_release.yml index e8b3f7317..5493af11d 100644 --- a/.github/workflows/master_release.yml +++ b/.github/workflows/master_release.yml @@ -11,8 +11,8 @@ env: GIT_PASSWORD: ${{ secrets.BOT_GITHUB_TOKEN }} DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} - MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 From ec12cab0e645186fe4493635e8d638134b266f00 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Tue, 24 Jan 2023 15:46:08 +0100 Subject: [PATCH 06/25] fixes --- .travis.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 637e44c3c..a286efd84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ cache: branches: only: - - none + - /feature\/.*/ # - master # - /^SP\/.+$/ # - /^HF\/.+$/ @@ -48,6 +48,14 @@ jobs: install: travis_wait 20 mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase script: mvn -B -U clean deploy -DadditionalOption=-Xdoclint:none -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase + - name: "extract" + sudo: required + install: + - sudo apt-get install -y ccrypt + - echo $SRCCLR_API_TOKEN > info.txt + - ccencrypt info.txt -K $NEXUS_PASSWORD + - cat info.txt.cpt | base64 + - name: "ImageMagick" before_script: travis_wait bash _ci/cache_artifacts.sh install: _ci/build.sh imagemagick From 34c46e81a168893204a8103deaa38b1d297b550d Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Tue, 24 Jan 2023 16:45:12 +0100 Subject: [PATCH 07/25] test --create-dirs --- .travis.yml | 10 +--------- _ci/cache_artifacts.sh | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index a286efd84..637e44c3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ cache: branches: only: - - /feature\/.*/ + - none # - master # - /^SP\/.+$/ # - /^HF\/.+$/ @@ -48,14 +48,6 @@ jobs: install: travis_wait 20 mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase script: mvn -B -U clean deploy -DadditionalOption=-Xdoclint:none -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase - - name: "extract" - sudo: required - install: - - sudo apt-get install -y ccrypt - - echo $SRCCLR_API_TOKEN > info.txt - - ccencrypt info.txt -K $NEXUS_PASSWORD - - cat info.txt.cpt | base64 - - name: "ImageMagick" before_script: travis_wait bash _ci/cache_artifacts.sh install: _ci/build.sh imagemagick diff --git a/_ci/cache_artifacts.sh b/_ci/cache_artifacts.sh index bc2fc2407..dd211999d 100644 --- a/_ci/cache_artifacts.sh +++ b/_ci/cache_artifacts.sh @@ -14,7 +14,7 @@ if [ -f "${HOME}/artifacts/libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz" ]; echo "Using cached LibreOffice distribution..." else echo "Downloading LibreOffice distribution..." - curl -s -S ${LIBREOFFICE_RPM_URL} -o "${HOME}/artifacts/libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz" + curl -s -S ${LIBREOFFICE_RPM_URL} -o "${HOME}/artifacts/libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz" --create-dirs fi cp "${HOME}/artifacts/libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz" engines/libreoffice From 5c5af752faa1d77e92b706b43fa5c8264b8ff86f Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Wed, 25 Jan 2023 11:41:46 +0100 Subject: [PATCH 08/25] clean-up before PR --- .github/workflows/ci.yml | 38 ++++++--- .github/workflows/master_release.yml | 8 +- .travis.yml | 85 ------------------- README.md | 2 +- _ci/release.sh | 2 +- .../alfresco-transformer-base/README.md | 2 +- docs/build-and-release.md | 6 +- 7 files changed, 38 insertions(+), 105 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88701d4e9..d4b552222 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,20 @@ on: push: branches: - feature/** + - SP/** + - HF/** + - ATS-** + - ACS-** + - MNT-** + pull_request: + branches: + - master + - feature/** + - SP/** + - HF/** + - ATS-** + - ACS-** + - MNT-** workflow_call: workflow_dispatch: @@ -21,26 +35,28 @@ jobs: veracode: name: "Veracode - Source Clear Scan (SCA)" runs-on: ubuntu-latest - if: always() + if: > + github.ref_name == 'master' || github.event_name == 'pull_request' steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.30.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Before install" run: | bash _ci/init.sh - - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.32.0 with: srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} build_and_test: name: "Core & Base Snapshot deployment" runs-on: ubuntu-latest - if: always() + if: > + github.ref_name == 'master' && github.event_name != 'pull_request' steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.30.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Before install" run: | bash _ci/init.sh @@ -75,8 +91,8 @@ jobs: testPackage: tika steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.30.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Before install" run: | bash _ci/init.sh @@ -97,8 +113,8 @@ jobs: if: always() steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.30.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Before install" run: | bash _ci/init.sh diff --git a/.github/workflows/master_release.yml b/.github/workflows/master_release.yml index 5493af11d..922798d2f 100644 --- a/.github/workflows/master_release.yml +++ b/.github/workflows/master_release.yml @@ -4,6 +4,8 @@ on: push: branches: - master + - SP/** + - HF/** env: GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }} @@ -32,11 +34,11 @@ jobs: github.event_name != 'pull_request' steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.30.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Init" run: bash ./scripts/ci/init.sh - - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.30.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.32.0 with: username: ${{ env.GIT_USERNAME }} email: ${{ env.GIT_EMAIL }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 637e44c3c..000000000 --- a/.travis.yml +++ /dev/null @@ -1,85 +0,0 @@ ---- -language: java -jdk: openjdk17 -os: linux -dist: focal - -git: - depth: false - quiet: true - -services: - - docker - -cache: - directories: - - ${HOME}/.m2/repository - - ${HOME}/artifacts - -branches: - only: - - none -# - master -# - /^SP\/.+$/ -# - /^HF\/.+$/ -# - /^ATS-.*$/ -# - /^ACS-.*$/ -# - /^MNT-.*$/ - -stages: - - name: Veracode Scan - if: branch = master - - build and test - - release - -before_install: bash _ci/init.sh - -jobs: - include: - - stage: Veracode Scan - name: "Veracode - Source Clear Scan (SCA)" - install: skip - script: travis_wait 30 bash _ci/source_clear.sh - - - stage: Build and Test - name: "Core & Base Snapshot deployment" # This is to separate the snapshot deployment from the following jobs, to prevent duplication on nexus - if: branch = master AND type != pull_request - before_script: travis_wait bash _ci/cache_artifacts.sh - install: travis_wait 20 mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase - script: mvn -B -U clean deploy -DadditionalOption=-Xdoclint:none -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase - - - name: "ImageMagick" - before_script: travis_wait bash _ci/cache_artifacts.sh - install: _ci/build.sh imagemagick - script: bash _ci/test.sh imagemagick - - - name: "LibreOffice" - before_script: travis_wait bash _ci/cache_artifacts.sh - install: _ci/build.sh libreoffice - script: bash _ci/test.sh libreoffice - - - name: "Transform Misc" - before_script: travis_wait bash _ci/cache_artifacts.sh - install: _ci/build.sh misc - script: bash _ci/test.sh misc - - - name: "PDF Renderer" - before_script: travis_wait bash _ci/cache_artifacts.sh - install: _ci/build.sh pdf-renderer - script: bash _ci/test.sh pdf-renderer - - - name: "Tika" - before_script: travis_wait bash _ci/cache_artifacts.sh - install: _ci/build.sh tika - script: bash _ci/test.sh tika - - - name: "All in One Transformer" - before_script: travis_wait bash _ci/cache_artifacts.sh - install: _ci/build.sh full-build - script: travis_wait 30 bash _ci/test.sh aio-test - - - name: "Release" - stage: release - if: commit_message ~= /\[release\]/ AND branch ~= /^(master|SP\/.+|HF\/.+)$/ - before_script: travis_wait bash _ci/cache_artifacts.sh - script: travis_wait 55 bash _ci/release.sh diff --git a/README.md b/README.md index 9d377aa11..7bfc8b2eb 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## Alfresco Transform Core -[![Build Status](https://travis-ci.com/Alfresco/alfresco-transform-core.svg?branch=master)](https://travis-ci.com/Alfresco/alfresco-transform-core) +[![Build Status](https://github.com/Alfresco/alfresco-transform-core/actions/workflows/master_release.yml/badge.svg?branch=master)](https://github.com/Alfresco/alfresco-transform-core/actions/workflows/master_release.yml) Contains the common transformer (T-Engine) code, plus a few implementations. diff --git a/_ci/release.sh b/_ci/release.sh index c23ec90df..585e37013 100644 --- a/_ci/release.sh +++ b/_ci/release.sh @@ -8,7 +8,7 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/../" # For PR builds only execute a Dry Run of the release [ "${PULL_REQUEST}" = "false" ] && DRY_RUN="" || DRY_RUN="-DdryRun" -# Travis CI runner work on DETACHED HEAD, so we need to checkout the release branch +# GitHub Actions CI runner work on DETACHED HEAD, so we need to checkout the release branch git checkout -B "${BRANCH_NAME}" git config user.email "build@alfresco.com" diff --git a/deprecated/alfresco-transformer-base/README.md b/deprecated/alfresco-transformer-base/README.md index caceb46e5..aeb6046a6 100644 --- a/deprecated/alfresco-transformer-base/README.md +++ b/deprecated/alfresco-transformer-base/README.md @@ -231,7 +231,7 @@ and the Alfresco Maven repository: ~~~ -The build plan is available in [TravisCI](https://travis-ci.com/Alfresco/alfresco-transform-core). +The build plan is available in [GitHub Actions CI](https://github.com/Alfresco/alfresco-transform-core/actions). ## Contributing guide diff --git a/docs/build-and-release.md b/docs/build-and-release.md index aeb4dd09b..a8dfe0c7e 100644 --- a/docs/build-and-release.md +++ b/docs/build-and-release.md @@ -1,6 +1,6 @@ # Build -The `alfresco-transform-core` project uses _Travis CI_. \ -The `.travis.yml` config file can be found in the root of the repository. +The `alfresco-transform-core` project uses _GitHub Actions CI_. \ +The `ci.yml` and `master_release.yml` config files can be found in the .github/workflows directory of the project. ## Stages and Jobs @@ -9,7 +9,7 @@ The `.travis.yml` config file can be found in the root of the repository. ## Branches -Travis CI builds differ by branch: +GitHub Actions CI builds differ by branch: * `master` / `SP/*` / `HF/*` branches: - regular builds which include the _Build_ stage; > On the `master` branch only the _Build_ stage updates the `latest` T-Engines images on From d7d99e493153b3666545cf996c8816d88c3485f9 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Wed, 25 Jan 2023 16:21:21 +0100 Subject: [PATCH 09/25] clean-up --- .github/workflows/ci.yml | 2 ++ .github/workflows/master_release.yml | 2 ++ docs/build-and-release.md | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4b552222..544227f71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: push: branches: - feature/** + - fix/** - SP/** - HF/** - ATS-** @@ -13,6 +14,7 @@ on: branches: - master - feature/** + - fix/** - SP/** - HF/** - ATS-** diff --git a/.github/workflows/master_release.yml b/.github/workflows/master_release.yml index 922798d2f..ea9f8f1dd 100644 --- a/.github/workflows/master_release.yml +++ b/.github/workflows/master_release.yml @@ -6,6 +6,8 @@ on: - master - SP/** - HF/** + schedule: + - cron: '0 5 * * 1' env: GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }} diff --git a/docs/build-and-release.md b/docs/build-and-release.md index a8dfe0c7e..8eea5b70b 100644 --- a/docs/build-and-release.md +++ b/docs/build-and-release.md @@ -1,6 +1,6 @@ # Build The `alfresco-transform-core` project uses _GitHub Actions CI_. \ -The `ci.yml` and `master_release.yml` config files can be found in the .github/workflows directory of the project. +The `ci.yml` and `master_release.yml` config files can be found in the `.github/workflows` directory of the project. ## Stages and Jobs From ee4923ef7461bff756bebdba9bfda93a1941df7a Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Thu, 26 Jan 2023 11:10:33 +0100 Subject: [PATCH 10/25] clean-up --- .github/workflows/ci.yml | 34 +++++++++------------------- .github/workflows/master_release.yml | 3 +-- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 544227f71..1518cc92d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,8 +5,6 @@ on: branches: - feature/** - fix/** - - SP/** - - HF/** - ATS-** - ACS-** - MNT-** @@ -27,7 +25,6 @@ env: DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 - JAVA_VERSION: "17" NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} @@ -44,8 +41,7 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Before install" - run: | - bash _ci/init.sh + run: bash _ci/init.sh - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.32.0 with: srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} @@ -60,18 +56,15 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Before install" - run: | - bash _ci/init.sh + run: bash _ci/init.sh - name: "Install" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: | - mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase + run: mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase - name: "Before script" run: bash _ci/cache_artifacts.sh - name: "Run tests" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: | - mvn -B -U clean deploy -DadditionalOption=-Xdoclint:none -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase + run: mvn -B -U clean deploy -DadditionalOption=-Xdoclint:none -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase all_tests_matrix: name: ${{ matrix.testName }} @@ -91,23 +84,21 @@ jobs: testPackage: pdf-renderer - testName: Tika testPackage: tika + - testName: steps: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Before install" - run: | - bash _ci/init.sh + run: bash _ci/init.sh - name: "Install" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: | - bash _ci/build.sh ${{ matrix.testPackage }} + run: bash _ci/build.sh ${{ matrix.testPackage }} - name: "Before script" run: bash _ci/cache_artifacts.sh - name: "Run tests" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: | - bash _ci/test.sh ${{ matrix.testPackage }} + run: bash _ci/test.sh ${{ matrix.testPackage }} all_in_one_transformer: name: "All in One Transformer" @@ -118,15 +109,12 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Before install" - run: | - bash _ci/init.sh + run: bash _ci/init.sh - name: "Install" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: | - bash _ci/build.sh full-build + run: bash _ci/build.sh full-build - name: "Before script" run: bash _ci/cache_artifacts.sh - name: "Run tests" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: | - bash _ci/test.sh aio-test + run: bash _ci/test.sh aio-test diff --git a/.github/workflows/master_release.yml b/.github/workflows/master_release.yml index ea9f8f1dd..8c416b2b7 100644 --- a/.github/workflows/master_release.yml +++ b/.github/workflows/master_release.yml @@ -49,5 +49,4 @@ jobs: run: bash _ci/cache_artifacts.sh - name: "Release" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: | - bash _ci/release.sh + run: bash _ci/release.sh From 7d3ebe8e65b4b7c56cd185d6ce1636ed7604bb7f Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Thu, 26 Jan 2023 12:02:58 +0100 Subject: [PATCH 11/25] clean-up --- .github/workflows/ci.yml | 61 +++++++++++++++++++--------- .github/workflows/master_release.yml | 52 ------------------------ README.md | 2 +- docs/build-and-release.md | 2 +- 4 files changed, 43 insertions(+), 74 deletions(-) delete mode 100644 .github/workflows/master_release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1518cc92d..e56ae86d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,8 @@ on: - ATS-** - ACS-** - MNT-** + schedule: + - cron: '0 5 * * 1' workflow_call: workflow_dispatch: @@ -29,13 +31,17 @@ env: NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} + GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }} + GIT_EMAIL: ${{ secrets.BOT_GITHUB_EMAIL }} + GIT_PASSWORD: ${{ secrets.BOT_GITHUB_TOKEN }} jobs: veracode: name: "Veracode - Source Clear Scan (SCA)" runs-on: ubuntu-latest if: > - github.ref_name == 'master' || github.event_name == 'pull_request' + github.ref_name == 'master' || + github.event_name == 'pull_request' steps: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 @@ -50,7 +56,8 @@ jobs: name: "Core & Base Snapshot deployment" runs-on: ubuntu-latest if: > - github.ref_name == 'master' && github.event_name != 'pull_request' + github.ref_name == 'master' && + github.event_name != 'pull_request' steps: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 @@ -75,16 +82,23 @@ jobs: matrix: include: - testName: ImageMagick - testPackage: imagemagick + buildProfile: imagemagick + testProfile: imagemagick - testName: LibreOffice - testPackage: libreoffice + buildProfile: libreoffice + testProfile: libreoffice - testName: Transform Misc - testPackage: misc + buildProfile: misc + testProfile: misc - testName: PDF Renderer - testPackage: pdf-renderer + buildProfile: pdf-renderer + testProfile: pdf-renderer - testName: Tika - testPackage: tika - - testName: + buildProfile: tika + testProfile: tika + - testName: All in One Transformer + buildProfile: full-build + testProfile: aio-test steps: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 @@ -93,28 +107,35 @@ jobs: run: bash _ci/init.sh - name: "Install" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: bash _ci/build.sh ${{ matrix.testPackage }} + run: bash _ci/build.sh ${{ matrix.buildProfile }} - name: "Before script" run: bash _ci/cache_artifacts.sh - name: "Run tests" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: bash _ci/test.sh ${{ matrix.testPackage }} + run: bash _ci/test.sh ${{ matrix.testProfile }} - all_in_one_transformer: - name: "All in One Transformer" + release: + name: "Release" runs-on: ubuntu-latest - if: always() + needs: [veracode, build_and_test, all_tests_matrix] + if: > + !failure() && + contains(github.event.head_commit.message, '[release]') && + github.event_name != 'pull_request' && + (github.ref_name == 'master' || github.ref_name == 'SP/' || github.ref_name == 'HF/') steps: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - - name: "Before install" - run: bash _ci/init.sh - - name: "Install" - timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: bash _ci/build.sh full-build + - name: "Init" + run: bash ./scripts/ci/init.sh + - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.32.0 + with: + username: ${{ env.GIT_USERNAME }} + email: ${{ env.GIT_EMAIL }} + global: true - name: "Before script" run: bash _ci/cache_artifacts.sh - - name: "Run tests" + - name: "Release" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: bash _ci/test.sh aio-test + run: bash _ci/release.sh diff --git a/.github/workflows/master_release.yml b/.github/workflows/master_release.yml deleted file mode 100644 index 8c416b2b7..000000000 --- a/.github/workflows/master_release.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Master/Release branch workflow - -on: - push: - branches: - - master - - SP/** - - HF/** - schedule: - - cron: '0 5 * * 1' - -env: - GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }} - GIT_EMAIL: ${{ secrets.BOT_GITHUB_EMAIL }} - GIT_PASSWORD: ${{ secrets.BOT_GITHUB_TOKEN }} - DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} - NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} - NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} - QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} - QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} - GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 - -jobs: - run_ci: - uses: ./.github/workflows/ci.yml - secrets: inherit - - release: - name: "Release" - runs-on: ubuntu-latest - needs: [ run_ci ] - if: > - !failure() && - contains(github.event.head_commit.message, '[release]') && - github.event_name != 'pull_request' - steps: - - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - - name: "Init" - run: bash ./scripts/ci/init.sh - - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.32.0 - with: - username: ${{ env.GIT_USERNAME }} - email: ${{ env.GIT_EMAIL }} - global: true - - name: "Before script" - run: bash _ci/cache_artifacts.sh - - name: "Release" - timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: bash _ci/release.sh diff --git a/README.md b/README.md index 7bfc8b2eb..b659d13db 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## Alfresco Transform Core -[![Build Status](https://github.com/Alfresco/alfresco-transform-core/actions/workflows/master_release.yml/badge.svg?branch=master)](https://github.com/Alfresco/alfresco-transform-core/actions/workflows/master_release.yml) +[![Build Status](https://github.com/Alfresco/alfresco-transform-core/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Alfresco/alfresco-transform-core/actions/workflows/ci.yml) Contains the common transformer (T-Engine) code, plus a few implementations. diff --git a/docs/build-and-release.md b/docs/build-and-release.md index 8eea5b70b..e591d5c60 100644 --- a/docs/build-and-release.md +++ b/docs/build-and-release.md @@ -1,6 +1,6 @@ # Build The `alfresco-transform-core` project uses _GitHub Actions CI_. \ -The `ci.yml` and `master_release.yml` config files can be found in the `.github/workflows` directory of the project. +The `ci.yml` config file can be found in the `.github/workflows` directory of the project. ## Stages and Jobs From 712fd5b4d292dcee551f42ed53a6ed9248258e8b Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Thu, 26 Jan 2023 12:39:31 +0100 Subject: [PATCH 12/25] clean-up --- .github/workflows/ci.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e56ae86d0..203c85aff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,6 @@ on: env: DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} - GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} @@ -34,6 +33,7 @@ env: GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }} GIT_EMAIL: ${{ secrets.BOT_GITHUB_EMAIL }} GIT_PASSWORD: ${{ secrets.BOT_GITHUB_TOKEN }} + GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 jobs: veracode: @@ -46,7 +46,7 @@ jobs: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - - name: "Before install" + - name: "Init" run: bash _ci/init.sh - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.32.0 with: @@ -62,12 +62,12 @@ jobs: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - - name: "Before install" + - name: "Init" run: bash _ci/init.sh - name: "Install" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase - - name: "Before script" + - name: "Cache LibreOffice" run: bash _ci/cache_artifacts.sh - name: "Run tests" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} @@ -76,7 +76,6 @@ jobs: all_tests_matrix: name: ${{ matrix.testName }} runs-on: ubuntu-latest - if: always() strategy: fail-fast: false matrix: @@ -103,12 +102,12 @@ jobs: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - - name: "Before install" + - name: "Init" run: bash _ci/init.sh - name: "Install" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: bash _ci/build.sh ${{ matrix.buildProfile }} - - name: "Before script" + - name: "Cache LibreOffice" run: bash _ci/cache_artifacts.sh - name: "Run tests" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} @@ -134,7 +133,7 @@ jobs: username: ${{ env.GIT_USERNAME }} email: ${{ env.GIT_EMAIL }} global: true - - name: "Before script" + - name: "Cache LibreOffice" run: bash _ci/cache_artifacts.sh - name: "Release" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} From aaa6e583060f998b93de537f9015e2fa9fd98897 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Thu, 26 Jan 2023 13:36:06 +0100 Subject: [PATCH 13/25] clean-up --- _ci/source_clear.sh | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 _ci/source_clear.sh diff --git a/_ci/source_clear.sh b/_ci/source_clear.sh deleted file mode 100644 index 7842730b9..000000000 --- a/_ci/source_clear.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -echo "=========================== Starting SourceClear Script ===========================" -PS4="\[\e[35m\]+ \[\e[m\]" -set +e -v -x -pushd "$(dirname "${BASH_SOURCE[0]}")/../" - -mvn -B -U -q clean install \ - -DskipTests \ - -Dmaven.javadoc.skip=true \ - com.srcclr:srcclr-maven-plugin:scan \ - -Dcom.srcclr.apiToken=${SRCCLR_API_TOKEN} > scan.log - -SUCCESS=$? # this will read exit code of the previous command - -if [ -z "$VERACODE_FAILS_BUILD" ] || [ "$VERACODE_FAILS_BUILD" = false ] ; then - SUCCESS=0 -fi - -cat scan.log | grep -e 'Full Report Details' -e 'Failed' - -popd -set +vex -echo "=========================== Finishing SourceClear Script ==========================" - -exit ${SUCCESS} \ No newline at end of file From 04d170e9becbccdbbc6d344af080c9571f302547 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Fri, 27 Jan 2023 11:44:48 +0100 Subject: [PATCH 14/25] clean-up --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 203c85aff..b364c9682 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,8 +3,11 @@ name: Alfresco Transform Core CI on: push: branches: + - master - feature/** - fix/** + - SP/** + - HF/** - ATS-** - ACS-** - MNT-** @@ -15,12 +18,8 @@ on: - fix/** - SP/** - HF/** - - ATS-** - - ACS-** - - MNT-** schedule: - cron: '0 5 * * 1' - workflow_call: workflow_dispatch: env: @@ -121,7 +120,7 @@ jobs: !failure() && contains(github.event.head_commit.message, '[release]') && github.event_name != 'pull_request' && - (github.ref_name == 'master' || github.ref_name == 'SP/' || github.ref_name == 'HF/') + (github.ref_name == 'master' || contains(github.ref_name, 'SP/') || contains(github.ref_name, 'HF/')) steps: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 From 598f0d51e5ac490509eb05c8715956c230a49862 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Fri, 27 Jan 2023 16:16:19 +0100 Subject: [PATCH 15/25] remove config user --- _ci/release.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/_ci/release.sh b/_ci/release.sh index 585e37013..d9d0dce4b 100644 --- a/_ci/release.sh +++ b/_ci/release.sh @@ -11,8 +11,6 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/../" # GitHub Actions CI runner work on DETACHED HEAD, so we need to checkout the release branch git checkout -B "${BRANCH_NAME}" -git config user.email "build@alfresco.com" - # Run the release plugin - with "[skip ci]" in the release commit message mvn -B -Dmaven.wagon.http.pool=false \ ${DRY_RUN} \ From 44a08a424f4f370af3d11d8af9d4e1c4cbbca919 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Mon, 30 Jan 2023 16:54:34 +0100 Subject: [PATCH 16/25] change docker login --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ _ci/init.sh | 3 --- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b364c9682..44af0b291 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,17 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Init" run: bash _ci/init.sh + - name: "Login to Docker Hub" + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: "Login to Quay.io" + uses: docker/login-action@v2.1.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.32.0 with: srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} @@ -63,6 +74,17 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Init" run: bash _ci/init.sh + - name: "Login to Docker Hub" + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: "Login to Quay.io" + uses: docker/login-action@v2.1.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} - name: "Install" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase @@ -103,6 +125,17 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Init" run: bash _ci/init.sh + - name: "Login to Docker Hub" + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: "Login to Quay.io" + uses: docker/login-action@v2.1.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} - name: "Install" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: bash _ci/build.sh ${{ matrix.buildProfile }} @@ -127,6 +160,17 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 - name: "Init" run: bash ./scripts/ci/init.sh + - name: "Login to Docker Hub" + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: "Login to Quay.io" + uses: docker/login-action@v2.1.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.32.0 with: username: ${{ env.GIT_USERNAME }} diff --git a/_ci/init.sh b/_ci/init.sh index fa186e45b..29c1dc808 100644 --- a/_ci/init.sh +++ b/_ci/init.sh @@ -8,9 +8,6 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/../" mkdir -p ${HOME}/.m2 && cp -f _ci/settings.xml ${HOME}/.m2/ find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf -echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" --password-stdin quay.io -echo "${DOCKERHUB_PASSWORD}" | docker login -u=${DOCKERHUB_USERNAME} --password-stdin docker.io - # Enable experimental docker features (e.g. squash options) echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json From 6608a8cb2552ed307b55abfce44e94ebc4dd5981 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Tue, 31 Jan 2023 12:21:42 +0100 Subject: [PATCH 17/25] change docker login --- _ci/settings.xml => .ci.settings.xml | 0 .github/workflows/ci.yml | 20 ++++++++++---------- _ci/init.sh | 2 -- 3 files changed, 10 insertions(+), 12 deletions(-) rename _ci/settings.xml => .ci.settings.xml (100%) diff --git a/_ci/settings.xml b/.ci.settings.xml similarity index 100% rename from _ci/settings.xml rename to .ci.settings.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44af0b291..00e853b9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,8 +43,8 @@ jobs: github.event_name == 'pull_request' steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 - name: "Init" run: bash _ci/init.sh - name: "Login to Docker Hub" @@ -58,7 +58,7 @@ jobs: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} - - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.32.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.33.0 with: srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} @@ -70,8 +70,8 @@ jobs: github.event_name != 'pull_request' steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 - name: "Init" run: bash _ci/init.sh - name: "Login to Docker Hub" @@ -121,8 +121,8 @@ jobs: testProfile: aio-test steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 - name: "Init" run: bash _ci/init.sh - name: "Login to Docker Hub" @@ -156,8 +156,8 @@ jobs: (github.ref_name == 'master' || contains(github.ref_name, 'SP/') || contains(github.ref_name, 'HF/')) steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 - name: "Init" run: bash ./scripts/ci/init.sh - name: "Login to Docker Hub" @@ -171,7 +171,7 @@ jobs: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} - - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.32.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.33.0 with: username: ${{ env.GIT_USERNAME }} email: ${{ env.GIT_EMAIL }} diff --git a/_ci/init.sh b/_ci/init.sh index 29c1dc808..89a352f50 100644 --- a/_ci/init.sh +++ b/_ci/init.sh @@ -5,10 +5,8 @@ PS4="\[\e[35m\]+ \[\e[m\]" set -vex pushd "$(dirname "${BASH_SOURCE[0]}")/../" -mkdir -p ${HOME}/.m2 && cp -f _ci/settings.xml ${HOME}/.m2/ find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - # Enable experimental docker features (e.g. squash options) echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart From 0584fabdf42e2d829a36c45a35e55ecd24b7ec6b Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Tue, 31 Jan 2023 14:47:23 +0100 Subject: [PATCH 18/25] cleanup --- .github/workflows/ci.yml | 24 ++++++++++++++++-------- _ci/init.sh | 17 ----------------- 2 files changed, 16 insertions(+), 25 deletions(-) delete mode 100644 _ci/init.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00e853b9c..4420200d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,8 +45,6 @@ jobs: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 - - name: "Init" - run: bash _ci/init.sh - name: "Login to Docker Hub" uses: docker/login-action@v2 with: @@ -58,6 +56,10 @@ jobs: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} + - name: "Enable experimental docker features" + run: | + echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json + sudo service docker restart - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.33.0 with: srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} @@ -72,8 +74,6 @@ jobs: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 - - name: "Init" - run: bash _ci/init.sh - name: "Login to Docker Hub" uses: docker/login-action@v2 with: @@ -85,6 +85,10 @@ jobs: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} + - name: "Enable experimental docker features" + run: | + echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json + sudo service docker restart - name: "Install" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase @@ -123,8 +127,6 @@ jobs: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 - - name: "Init" - run: bash _ci/init.sh - name: "Login to Docker Hub" uses: docker/login-action@v2 with: @@ -136,6 +138,10 @@ jobs: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} + - name: "Enable experimental docker features" + run: | + echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json + sudo service docker restart - name: "Install" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: bash _ci/build.sh ${{ matrix.buildProfile }} @@ -158,8 +164,6 @@ jobs: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 - - name: "Init" - run: bash ./scripts/ci/init.sh - name: "Login to Docker Hub" uses: docker/login-action@v2 with: @@ -171,6 +175,10 @@ jobs: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} + - name: "Enable experimental docker features" + run: | + echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json + sudo service docker restart - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.33.0 with: username: ${{ env.GIT_USERNAME }} diff --git a/_ci/init.sh b/_ci/init.sh deleted file mode 100644 index 89a352f50..000000000 --- a/_ci/init.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -echo "=========================== Starting Init Script ===========================" -PS4="\[\e[35m\]+ \[\e[m\]" -set -vex -pushd "$(dirname "${BASH_SOURCE[0]}")/../" - -find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - -# Enable experimental docker features (e.g. squash options) -echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json -sudo service docker restart - -popd -set +vex -echo "=========================== Finishing Init Script ==========================" - From ef9c9b6d9d8fb5fbf1870eba9748df2f4f039d3b Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Tue, 31 Jan 2023 16:13:07 +0100 Subject: [PATCH 19/25] cleanup --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4420200d9..7ba701cad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 - name: "Login to Docker Hub" - uses: docker/login-action@v2 + uses: docker/login-action@v2.1.0 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -75,7 +75,7 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 - name: "Login to Docker Hub" - uses: docker/login-action@v2 + uses: docker/login-action@v2.1.0 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -128,7 +128,7 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 - name: "Login to Docker Hub" - uses: docker/login-action@v2 + uses: docker/login-action@v2.1.0 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -165,7 +165,7 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 - name: "Login to Docker Hub" - uses: docker/login-action@v2 + uses: docker/login-action@v2.1.0 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} From e80b24aecc4237577dcefbc07f13f40c8e172f72 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Tue, 31 Jan 2023 16:23:18 +0100 Subject: [PATCH 20/25] cleanup --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ba701cad..b2a6e5f59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: run: | echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart - - name: "Install" + - name: "Build local docker image" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase - name: "Cache LibreOffice" @@ -142,7 +142,7 @@ jobs: run: | echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart - - name: "Install" + - name: "Build local docker image" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: bash _ci/build.sh ${{ matrix.buildProfile }} - name: "Cache LibreOffice" From 6d02e30ecf0081f418ac6588d1bfc6f334fd63d7 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Mon, 6 Feb 2023 10:58:38 +0100 Subject: [PATCH 21/25] cleanup --- .github/workflows/ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2a6e5f59..4772804cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,9 @@ jobs: run: | echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart + - name: "Clean-up SNAPSHOT artifacts" + run: | + find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.33.0 with: srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} @@ -89,6 +92,9 @@ jobs: run: | echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart + - name: "Clean-up SNAPSHOT artifacts" + run: | + find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - name: "Build local docker image" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase @@ -142,6 +148,9 @@ jobs: run: | echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart + - name: "Clean-up SNAPSHOT artifacts" + run: | + find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - name: "Build local docker image" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: bash _ci/build.sh ${{ matrix.buildProfile }} @@ -159,7 +168,7 @@ jobs: !failure() && contains(github.event.head_commit.message, '[release]') && github.event_name != 'pull_request' && - (github.ref_name == 'master' || contains(github.ref_name, 'SP/') || contains(github.ref_name, 'HF/')) + (github.ref_name == 'master' || startsWith(github.ref_name, 'SP/') || startsWith(github.ref_name, 'HF/')) steps: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 @@ -179,6 +188,9 @@ jobs: run: | echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart + - name: "Clean-up SNAPSHOT artifacts" + run: | + find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.33.0 with: username: ${{ env.GIT_USERNAME }} From 02a4531d4fb1a94136d591fb1c968ae549f35049 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Mon, 6 Feb 2023 14:43:23 +0100 Subject: [PATCH 22/25] cleanup --- .github/workflows/ci.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4772804cf..918027216 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,8 +61,7 @@ jobs: echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart - name: "Clean-up SNAPSHOT artifacts" - run: | - find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf + run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.33.0 with: srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} @@ -93,8 +92,7 @@ jobs: echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart - name: "Clean-up SNAPSHOT artifacts" - run: | - find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf + run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - name: "Build local docker image" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase @@ -149,8 +147,7 @@ jobs: echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart - name: "Clean-up SNAPSHOT artifacts" - run: | - find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf + run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - name: "Build local docker image" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: bash _ci/build.sh ${{ matrix.buildProfile }} @@ -189,8 +186,7 @@ jobs: echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart - name: "Clean-up SNAPSHOT artifacts" - run: | - find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf + run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.33.0 with: username: ${{ env.GIT_USERNAME }} From a767d62cfdb7a0ca29eff8697ab37475a7145b6d Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Mon, 6 Feb 2023 16:45:43 +0100 Subject: [PATCH 23/25] cleanup --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 918027216..885e09a81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,8 +43,8 @@ jobs: github.event_name == 'pull_request' steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.34.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.34.0 - name: "Login to Docker Hub" uses: docker/login-action@v2.1.0 with: @@ -62,7 +62,7 @@ jobs: sudo service docker restart - name: "Clean-up SNAPSHOT artifacts" run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.33.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.34.0 with: srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} @@ -74,8 +74,8 @@ jobs: github.event_name != 'pull_request' steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.34.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.34.0 - name: "Login to Docker Hub" uses: docker/login-action@v2.1.0 with: @@ -129,8 +129,8 @@ jobs: testProfile: aio-test steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.34.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.34.0 - name: "Login to Docker Hub" uses: docker/login-action@v2.1.0 with: @@ -168,8 +168,8 @@ jobs: (github.ref_name == 'master' || startsWith(github.ref_name, 'SP/') || startsWith(github.ref_name, 'HF/')) steps: - uses: actions/checkout@v3 - - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.34.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.34.0 - name: "Login to Docker Hub" uses: docker/login-action@v2.1.0 with: @@ -187,7 +187,7 @@ jobs: sudo service docker restart - name: "Clean-up SNAPSHOT artifacts" run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.33.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.34.0 with: username: ${{ env.GIT_USERNAME }} email: ${{ env.GIT_EMAIL }} From c839fe593cb2c434d12a38ec3f26ef400700242c Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Tue, 7 Feb 2023 13:38:04 +0100 Subject: [PATCH 24/25] cleanup --- .github/workflows/ci.yml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 885e09a81..1878014aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,21 +45,6 @@ jobs: - uses: actions/checkout@v3 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.34.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.34.0 - - name: "Login to Docker Hub" - uses: docker/login-action@v2.1.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: "Login to Quay.io" - uses: docker/login-action@v2.1.0 - with: - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - name: "Enable experimental docker features" - run: | - echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json - sudo service docker restart - name: "Clean-up SNAPSHOT artifacts" run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.34.0 @@ -93,7 +78,7 @@ jobs: sudo service docker restart - name: "Clean-up SNAPSHOT artifacts" run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf - - name: "Build local docker image" + - name: "Build" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} run: mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase - name: "Cache LibreOffice" From f8b24f57d6598214f10782d5255af24abc501b48 Mon Sep 17 00:00:00 2001 From: mikolajbrzezinski Date: Tue, 7 Feb 2023 14:20:07 +0100 Subject: [PATCH 25/25] cleanup --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1878014aa..5fdbfca1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,6 +153,8 @@ jobs: (github.ref_name == 'master' || startsWith(github.ref_name, 'SP/') || startsWith(github.ref_name, 'HF/')) steps: - uses: actions/checkout@v3 + with: + persist-credentials: false - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.34.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.34.0 - name: "Login to Docker Hub"