diff options
author | Mathew Robinson <chasinglogic@gmail.com> | 2018-12-20 15:56:56 -0500 |
---|---|---|
committer | Mathew Robinson <chasinglogic@gmail.com> | 2019-01-30 14:14:20 -0500 |
commit | bd106df413be605d761df1063c824af30ec4865d (patch) | |
tree | 659e3e07cf4c68f353bfef2c308931368fec6f6f | |
parent | d80755651cbd268c7db03ebba914051428fedeb4 (diff) | |
download | mongo-bd106df413be605d761df1063c824af30ec4865d.tar.gz |
SERVER-35356 Add release process builder for cocoapods
4 files changed, 108 insertions, 6 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml index a26137de341..d2f87cb0669 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -4271,18 +4271,114 @@ tasks: permissions: public-read content_type: application/tar + # If this is not a release build, blow away the file so our subsequent and optional s3.put + # doesn't run. That way, we won't overwrite the latest part in our patches. + - command: shell.exec + params: + script: | + set -o errexit + set -o verbose + + if [ "${is_release}" != "true" ]; then + rm -f mongo-embedded-sdk-${version}.tgz + rm -f mongo-embedded-sdk-${version}-mongo-c-driver.tgz + rm -f mongo-embedded-sdk-${version}-mongo-embedded.tgz + rm -f mongo-embedded-sdk-${version}-mongoc-embedded.tgz + fi + + - command: s3.put + params: + visibility: none + optional: true + aws_key: ${aws_key} + aws_secret: ${aws_secret} + local_file: "mongo-embedded-sdk-${version}.tgz" + remote_file: ${push_path}-STAGE/${push_name}/mongo-${build_variant}-${version}.tgz + bucket: build-push-testing + permissions: public-read + content_type: application/tar + + - command: s3.put + params: + visibility: none + optional: true + aws_key: ${aws_key} + aws_secret: ${aws_secret} + local_file: "mongo-embedded-sdk-${version}-mongo-c-driver.tgz" + remote_file: ${push_path}-STAGE/${push_name}/mongo-c-driver-${version}.tgz + bucket: build-push-testing + permissions: public-read + content_type: application/tar + + - command: s3.put + params: + visibility: none + optional: true + aws_key: ${aws_key} + aws_secret: ${aws_secret} + local_file: "mongo-embedded-sdk-${version}-mongo-embedded.tgz" + remote_file: ${push_path}-STAGE/${push_name}/mongo-embedded-${version}.tgz + bucket: build-push-testing + permissions: public-read + content_type: application/tar + + - command: s3.put + params: + visibility: none + optional: true + aws_key: ${aws_key} + aws_secret: ${aws_secret} + local_file: "mongo-embedded-sdk-${version}-mongoc-embedded.tgz" + remote_file: ${push_path}-STAGE/${push_name}/mongoc-embedded-${version}.tgz + bucket: build-push-testing + permissions: public-read + content_type: application/tar + + - command: s3Copy.copy + params: + aws_key: ${aws_key} + aws_secret: ${aws_secret} + optional: true + s3_copy_files: + - {'source': {'path': '${push_path}-STAGE/${push_name}/mongoc-embedded-${version}.tgz', 'bucket': 'build-push-testing'}, + 'destination': {'path': '${push_path}/${push_name}/mongoc-embedded-${version}.tgz', 'bucket': '${push_bucket}'}} + + - {'source': {'path': '${push_path}-STAGE/${push_name}/mongo-embedded-${version}.tgz', 'bucket': 'build-push-testing'}, + 'destination': {'path': '${push_path}/${push_name}/mongo-embedded-${version}.tgz', 'bucket': '${push_bucket}'}} + + - {'source': {'path': '${push_path}-STAGE/${push_name}/mongo-c-driver-${version}.tgz', 'bucket': 'build-push-testing'}, + 'destination': {'path': '${push_path}/${push_name}/mongo-c-driver-${version}.tgz', 'bucket': '${push_bucket}'}} + - command: shell.exec params: script: | set -o errexit set -o verbose + echo "Releases disabled on master." + exit 0 + + if [ "${is_release|false}" != "true" ]; then + echo "Not a release build" + exit 0 + fi + sed s/@VERSION@/1.13.0/g src/src/mongo/embedded/mongoc_embedded/mongo-embedded-c-driver.podspec.in | tee mongo-embedded-c-driver.podspec + DRIVER_SHA=`shasum -a 256 mongo-embedded-sdk-${version}-mongo-c-driver.tgz | awk '{ print $1 }'` + sed -i '' s/@SHA256@/$DRIVER_SHA/g mongo-embedded-c-driver.podspec + sed -i '' s/@MONGO_VERSION@/${version}/g mongo-embedded-c-driver.podspec + sed s/@VERSION@/${version}/g src/src/mongo/embedded/mongo_embedded/mongo_embedded.podspec.in | tee mongo_embedded.podspec + MONGO_SHA=`shasum -a 256 mongo-embedded-sdk-${version}-mongo-embedded.tgz | awk '{ print $1 }'` + sed -i '' s/@SHA256@/$MONGO_SHA/g mongo_embedded.podspec + sed s/@VERSION@/${version}/g src/src/mongo/embedded/mongoc_embedded/mongoc_embedded.podspec.in | tee mongoc_embedded.podspec + MONGOC_SHA=`shasum -a 256 mongo-embedded-sdk-${version}-mongoc-embedded.tgz | awk '{ print $1 }'` + sed -i '' s/@SHA256@/$MONGOC_SHA/g mongoc_embedded.podspec - # conditional cocoapods deployment here, pending integration with release process - #sudo gem install cocoapods + pod trunk push mongo-embedded-c-driver.podspec + pod trunk push mongo_embedded.podspec + pod trunk push mongoc_embedded.podspec - name: stitch_support_create_lib commands: @@ -10560,10 +10656,13 @@ buildvariants: - name: embedded-sdk-apple-multiarch display_name: "Embedded SDK - Apple Multiarch" run_on: - - macos-1012 + - macos-release batchtime: 1440 # 1 day expansions: compile_env: DEVELOPER_DIR=/Applications/XCode9.2.app + push_path: mobile + push_name: apple + push_bucket: downloads.mongodb.org tasks: - name: embedded_sdk_multiarch_apple_package diff --git a/src/mongo/embedded/mongo_embedded/mongo_embedded.podspec.in b/src/mongo/embedded/mongo_embedded/mongo_embedded.podspec.in index de84cc35ce8..dd44766f09f 100644 --- a/src/mongo/embedded/mongo_embedded/mongo_embedded.podspec.in +++ b/src/mongo/embedded/mongo_embedded/mongo_embedded.podspec.in @@ -17,7 +17,8 @@ Pod::Spec.new do |s| s.watchos.deployment_target = "4.3" s.tvos.deployment_target = "10.2" - s.source = { :http => "https://s3.amazonaws.com/mciuploads/mongodb-mongo-master/embedded-sdk/mongo-embedded-cocoapod-latest.tgz" } + s.source = { :http => "https://downloads.mongodb.org/mobile/apple/mongo-embedded-sdk-@VERSION@.tgz" + :sha256 => "@SHA256@" } s.ios.vendored_frameworks = "iPhoneOS/Frameworks/mongo_embedded.framework" s.watchos.vendored_frameworks = "WatchOS/Frameworks/mongo_embedded.framework" diff --git a/src/mongo/embedded/mongoc_embedded/mongo-embedded-c-driver.podspec.in b/src/mongo/embedded/mongoc_embedded/mongo-embedded-c-driver.podspec.in index 7a6f5e53ebb..39b0f03e726 100644 --- a/src/mongo/embedded/mongoc_embedded/mongo-embedded-c-driver.podspec.in +++ b/src/mongo/embedded/mongoc_embedded/mongo-embedded-c-driver.podspec.in @@ -20,7 +20,8 @@ Pod::Spec.new do |s| s.watchos.deployment_target = "4.3" s.tvos.deployment_target = "10.2" - s.source = { :http => "https://s3.amazonaws.com/mciuploads/mongodb-mongo-master/embedded-sdk/mongo-c-driver-cocoapod-latest.tgz" } + s.source = { :http => "https://downloads.mongodb.org/mobile/apple/mongo-c-driver-@VERSION@-@MONGO_VERSION@.tgz", + :sha256 => "@SHA256@" } s.ios.vendored_frameworks = "iPhoneOS/Frameworks/bson.framework", "iPhoneOS/Frameworks/mongoc.framework" s.osx.vendored_frameworks = "MacOS/Frameworks/bson.framework", "MacOS/Frameworks/mongoc.framework" diff --git a/src/mongo/embedded/mongoc_embedded/mongoc_embedded.podspec.in b/src/mongo/embedded/mongoc_embedded/mongoc_embedded.podspec.in index 4bb7b1d892a..6a28021dea2 100644 --- a/src/mongo/embedded/mongoc_embedded/mongoc_embedded.podspec.in +++ b/src/mongo/embedded/mongoc_embedded/mongoc_embedded.podspec.in @@ -17,7 +17,8 @@ Pod::Spec.new do |s| s.watchos.deployment_target = "4.3" s.tvos.deployment_target = "10.2" - s.source = { :http => "https://s3.amazonaws.com/mciuploads/mongodb-mongo-master/embedded-sdk/mongoc-embedded-cocoapod-latest.tgz" } + s.source = { :http => "https://downloads.mongodb.org/mobile/apple/mongoc-embedded-sdk-@VERSION@.tgz", + :sha256 => "@SHA256@" } s.ios.vendored_frameworks = "iPhoneOS/Frameworks/mongoc_embedded.framework" s.watchos.vendored_frameworks = "WatchOS/Frameworks/mongoc_embedded.framework" |