From 2f45e682fe042303395aa4d242e3a70f3ab7bcbe Mon Sep 17 00:00:00 2001 From: CezarLeahu <35226487+CezarLeahu@users.noreply.github.com> Date: Tue, 22 Jun 2021 12:46:39 +0300 Subject: [PATCH] APPS-1028 Build&publish an AGS distribution zip during the ACS release (#1374) --- .travis.yml | 18 ++++++ distribution-ags/pom.xml | 62 +++++++++++++++++++ .../src/assemble/ags-distribution.xml | 17 +++++ pom.xml | 1 + scripts/travis/copy_ags_to_release_bucket.sh | 27 ++++++++ 5 files changed, 125 insertions(+) create mode 100644 distribution-ags/pom.xml create mode 100644 distribution-ags/src/assemble/ags-distribution.xml create mode 100644 scripts/travis/copy_ags_to_release_bucket.sh diff --git a/.travis.yml b/.travis.yml index b27b27fde..38db09e9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -133,6 +133,9 @@ jobs: - cp distribution/target/alfresco.war deploy_dir - cp distribution/target/*-distribution*.zip deploy_dir - ls -lA deploy_dir + - mkdir -p deploy_dir_ags + - cp distribution-ags/target/*.zip deploy_dir_ags + - ls -lA deploy_dir_ags deploy: - provider: s3 access_key_id: "${AWS_STAGING_ACCESS_KEY}" @@ -145,6 +148,17 @@ jobs: upload_dir: "alfresco-content-services-community/release/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}" on: all_branches: true + - provider: s3 + access_key_id: "${AWS_STAGING_ACCESS_KEY}" + secret_access_key: "${AWS_STAGING_SECRET_KEY}" + bucket: "alfresco-artefacts-staging" + region: "eu-west-1" + skip_cleanup: true + acl: private + local_dir: "deploy_dir_ags" + upload_dir: "community/RM/${RELEASE_VERSION}" + on: + all_branches: true after_deploy: - echo "Finished release and deployed to https://s3.console.aws.amazon.com/s3/buckets/alfresco-artefacts-staging/alfresco-content-services/release/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}" @@ -159,3 +173,7 @@ jobs: script: bash scripts/travis/copy_to_release_bucket.sh on: all_branches: true + - provider: script + script: bash scripts/travis/copy_ags_to_release_bucket.sh + on: + all_branches: true diff --git a/distribution-ags/pom.xml b/distribution-ags/pom.xml new file mode 100644 index 000000000..baf8e0e28 --- /dev/null +++ b/distribution-ags/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + alfresco-governance-services-community-distribution + Alfresco Governance Services Community Distribution Zip + pom + + + org.alfresco + acs-community-packaging + 7.1.0-SNAPSHOT + + + + + org.alfresco + alfresco-governance-services-community-repo + ${dependency.alfresco-community-repo.version} + amp + + + org.alfresco + alfresco-governance-services-community-rest-api-explorer + ${dependency.alfresco-community-repo.version} + war + + + org.alfresco + alfresco-governance-services-community-share + ${dependency.alfresco-community-share.version} + amp + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + false + + + create-distribution + package + + single + + + alfresco-governance-services-community-${project.version} + false + + src/assemble/ags-distribution.xml + + + + + + + + \ No newline at end of file diff --git a/distribution-ags/src/assemble/ags-distribution.xml b/distribution-ags/src/assemble/ags-distribution.xml new file mode 100644 index 000000000..0f2b5a032 --- /dev/null +++ b/distribution-ags/src/assemble/ags-distribution.xml @@ -0,0 +1,17 @@ + + + distribution-ags + + zip + + false + + + false + false + false + + + diff --git a/pom.xml b/pom.xml index 5360a97d1..218191f26 100644 --- a/pom.xml +++ b/pom.xml @@ -40,6 +40,7 @@ + distribution-ags distribution public-javadoc docker-alfresco diff --git a/scripts/travis/copy_ags_to_release_bucket.sh b/scripts/travis/copy_ags_to_release_bucket.sh new file mode 100644 index 000000000..f57b84043 --- /dev/null +++ b/scripts/travis/copy_ags_to_release_bucket.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +echo "=========================== Starting Copy to Release Bucket Script ===========================" +PS4="\[\e[35m\]+ \[\e[m\]" +set -vex + +# +# Copy from S3 Release bucket to S3 eu.dl bucket +# + +if [ -z "${RELEASE_VERSION}" ]; then + echo "Please provide a RELEASE_VERSION in the format - (7.1.0-EA or 7.1.0-SNAPSHOT)" + exit 1 +fi + +SOURCE="s3://alfresco-artefacts-staging/community/RM/${RELEASE_VERSION}" +DESTINATION="s3://eu.dl.alfresco.com/release/community/RM/${RELEASE_VERSION}" + +printf "\n%s\n%s\n" "${SOURCE}" "${DESTINATION}" + +aws s3 cp --acl private \ + "${SOURCE}/alfresco-governance-services-community-${RELEASE_VERSION}.zip" \ + "${DESTINATION}/alfresco-governance-services-community-${RELEASE_VERSION}.zip" + + +set +vex +echo "=========================== Finishing Copy to Release Bucket Script ==========================" +