From c28b65fba5b71fe90ead2cba70227d3873b533fc Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 2 Feb 2022 11:13:14 +0000 Subject: [PATCH] ACS-2499 Delete company release build stage. (#524) * ACS-2499 Delete company release build stage. This never uploaded any software, and so was not particularly useful. The software and license report should be uploaded to S3 as part of the transform-service build. Also skip uploading anything to staging bucket. --- .travis.yml | 41 +---------------------------------- _ci/prepare_release_deploy.sh | 22 ------------------- _ci/prepare_staging_deploy.sh | 22 ------------------- docs/build-and-release.md | 17 +-------------- 4 files changed, 2 insertions(+), 100 deletions(-) delete mode 100644 _ci/prepare_release_deploy.sh delete mode 100644 _ci/prepare_staging_deploy.sh diff --git a/.travis.yml b/.travis.yml index 789a64c1..66268894 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,6 @@ branches: - master - /^SP\/.+$/ - /^HF\/.+$/ - - company_release - /^ATS-.*$/ - /^ACS-.*$/ @@ -30,7 +29,6 @@ stages: if: branch = master - build and test - release - - company_release before_install: bash _ci/init.sh @@ -48,38 +46,32 @@ 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: "ImageMagick" - if: branch NOT IN (company_release) before_script: travis_wait bash _ci/cache_artifacts.sh install: _ci/build.sh imagemagick script: bash _ci/test.sh imagemagick - name: "LibreOffice" - if: branch NOT IN (company_release) before_script: travis_wait bash _ci/cache_artifacts.sh install: _ci/build.sh libreoffice script: bash _ci/test.sh libreoffice - name: "Transform Misc" - if: branch NOT IN (company_release) before_script: travis_wait bash _ci/cache_artifacts.sh install: _ci/build.sh misc script: bash _ci/test.sh misc - name: "PDF Renderer" - if: branch NOT IN (company_release) before_script: travis_wait bash _ci/cache_artifacts.sh install: _ci/build.sh pdf-renderer script: bash _ci/test.sh pdf-renderer - name: "Tika" - if: branch NOT IN (company_release) 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" - if: branch NOT IN (company_release) 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: "Static Analysis (SAST)" # TODO ATS-721: comment out until it is possible to run concurrent SAST scans -# if: branch NOT IN (company_release) AND type != pull_request +# if: type != pull_request # if: branch = master AND type != pull_request # before_install: # - bash _ci/static_analysis_init.sh @@ -91,34 +83,3 @@ jobs: if: commit_message ~= /\[trigger release\]/ AND branch ~= /^(master|SP\/.+|HF\/.+)$/ before_script: travis_wait bash _ci/cache_artifacts.sh script: travis_wait 55 bash _ci/release.sh - before_deploy: source _ci/prepare_staging_deploy.sh - deploy: - provider: s3 - access_key_id: "${STAGING_AWS_ACCESS_KEY}" - secret_access_key: "${STAGING_AWS_SECRET_KEY}" - bucket: "alfresco-artefacts-staging" - skip_cleanup: true - region: "eu-west-1" - local_dir: "deploy_dir" - upload-dir: "enterprise/AlfrescoTransformServices/TransformEngines/${VERSION}" - on: - all_branches: true - - - name: "Company Release" - stage: company_release - if: branch = company_release - before_install: bash _ci/init.sh - install: echo "NoOp" - script: echo "NoOp" - before_deploy: source _ci/prepare_release_deploy.sh - deploy: - provider: s3 - access_key_id: "${RELEASE_AWS_ACCESS_KEY}" - secret_access_key: "${RELEASE_AWS_SECRET_KEY}" - bucket: "eu.dl.alfresco.com" - skip_cleanup: true - region: "eu-west-1" - local_dir: "deploy_dir" - upload-dir: "release/enterprise/AlfrescoTransformServices/TransformEngines/${VERSION}" - on: - branch: company_release diff --git a/_ci/prepare_release_deploy.sh b/_ci/prepare_release_deploy.sh deleted file mode 100644 index abf63d91..00000000 --- a/_ci/prepare_release_deploy.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -echo "========================== Starting Prepare Release Deploy Script ===========================" -PS4="\[\e[35m\]+ \[\e[m\]" -set -vex -pushd "$(dirname "${BASH_SOURCE[0]}")/../" - -# Identify latest annotated tag (latest version) -export VERSION=$(git describe --abbrev=0 --tags) - -mkdir -p deploy_dir - -# Create third party license csv file and add it to the deploy directory. -git clone --depth=1 https://github.com/Alfresco/third-party-license-overrides.git -python3 ./third-party-license-overrides/thirdPartyLicenseCSVCreator.py --project "`pwd`" --version "${VERSION}" --combined --output "deploy_dir" - -echo "Local deploy directory content:" -ls -lA deploy_dir - -popd -set +vex -echo "========================== Finishing Prepare Release Deploy Script ==========================" diff --git a/_ci/prepare_staging_deploy.sh b/_ci/prepare_staging_deploy.sh deleted file mode 100644 index 32dbb8c9..00000000 --- a/_ci/prepare_staging_deploy.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -echo "========================== Starting Prepare Staging Deploy Script ===========================" -PS4="\[\e[35m\]+ \[\e[m\]" -set -vex -pushd "$(dirname "${BASH_SOURCE[0]}")/../" - -# Identify latest annotated tag (latest version) -export VERSION=$(git describe --abbrev=0 --tags) - -mkdir -p deploy_dir - -# Create third party license csv file and add it to the deploy directory. -git clone --depth=1 https://github.com/Alfresco/third-party-license-overrides.git -python3 ./third-party-license-overrides/thirdPartyLicenseCSVCreator.py --project "`pwd`" --version "${VERSION}" --combined --output "deploy_dir" - -echo "Local deploy directory content:" -ls -lA deploy_dir - -popd -set +vex -echo "========================== Finishing Prepare Staging Deploy Script ==========================" diff --git a/docs/build-and-release.md b/docs/build-and-release.md index 218751ac..951d5b54 100644 --- a/docs/build-and-release.md +++ b/docs/build-and-release.md @@ -5,8 +5,7 @@ The `.travis.yml` config file can be found in the root of the repository. ## Stages and Jobs 1. **Build**: Java build with unit and integration tests. -2. **Release**: Release with artifact deployment to Nexus and AWS Staging bucket. -3. **Company Release**: Artifact deployment to AWS Release bucket. +2. **Release**: Release with artifact deployment to Nexus, DockerHub and Quay.io. ## Branches @@ -27,10 +26,6 @@ Travis CI builds differ by branch: of the release jobs (no artifacts will be published until the PR is actually merged). * `ATS-*` branches: - regular builds which include only the _Build_ and _Tests_ stages; -* `company_release` branch: - - builds that include the _Company Release_ stage only. - - the `company_release` branch should be used for one-off events; once used (a build - completes), the branch should be deleted. All other branches are ignored. @@ -67,13 +62,3 @@ been generated by steps (2) and (3), then an empty commit should be created - e. **Create a merge commit** (_Merge pull request_) or **Squash and merge** options are used, you need to ensure that the _commit message_ contains the `[trigger release]` tag (sub-string). -## Company Release process steps & info -Prerequisites: - - The **Release** stage is complete - i.e. the release commit is tagged and the release - artifacts are deployed on Nexus. - -Steps: -1. Create a new `company_release` branch from the `master` / `SP/*`/ `HF/*` branch. This job uses -the latest branch git tag to identify the version that must be uploaded to the S3 release bucket. -2. Wait for a green build on the branch. -3. Delete local and remote `company_release` branch.