diff --git a/.travis.yml b/.travis.yml index 0ac66c20bf..89a181cb62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -136,5 +136,26 @@ jobs: - name: "Enterprise Release" stage: Release and Publish - script: - - echo "Enterprise Release" + stage: Release + if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message =~ /\[.*release .*\]/ + before_script: + bash scripts/set-release-variables.sh + script: + - echo "Enterprise Release" + - bash scripts/release.sh enterprise + before_deploy: + - bash scripts/zip-artifacts.sh enterprise + deploy: + - provider: s3 + access_key_id: ${ARTIFACTS_KEY} + secret_access_key: ${ARTIFACTS_SECRET} + region: "eu-west-1" + bucket: ${ARTIFACTS_UPLOAD_BUCKET} + upload_dir: ${ARTIFACTS_UPLOAD_DIR} + skip_cleanup: true + acl: private + local_dir: artifacts_dir + on: + all_branches: true + after_deploy: + - echo "Finished release and deployed to https://s3.console.aws.amazon.com/s3/buckets/${ARTIFACTS_UPLOAD_BUCKET}/${ARTIFACTS_UPLOAD_DIR}" diff --git a/scripts/zip-artifacts.sh b/scripts/zip-artifacts.sh index c182809d4e..d81acca46d 100755 --- a/scripts/zip-artifacts.sh +++ b/scripts/zip-artifacts.sh @@ -9,5 +9,11 @@ if [ $1 == 'community' ]; then cd artifacts_dir zip alfresco-rm-community-${RELEASE_VERSION}.zip *amp ls artifacts_dir -#elif [ $1 == "enterprise" ]; then +elif [ $1 == "enterprise" ]; then + mkdir "artifacts_dir" + cp rm-enterprise/rm-enterprise-repo/target/alfresco-rm-*enterprise*amp artifacts_dir + cp rm-enterprise/rm-enterprise-share/target/alfresco-rm-*enterprise*amp artifacts_dir + cd artifacts_dir + zip alfresco-rm-enterprise-${RELEASE_VERSION}.zip *amp + ls artifacts_dir fi