From 9d14af987e8edc3d2eb443cbb81aaef0a056cb54 Mon Sep 17 00:00:00 2001 From: Gustavo Bazan Date: Thu, 16 Apr 2020 18:43:58 +0100 Subject: [PATCH] Fix publish adding NOTARY_KEY_NAME --- .evergreen.yml | 150 ++++-------------------- .repo_config.yml => etc/repo_config.yml | 149 +++++++++++++++++++++++ 2 files changed, 170 insertions(+), 129 deletions(-) rename .repo_config.yml => etc/repo_config.yml (64%) diff --git a/.evergreen.yml b/.evergreen.yml index 5b1127a13e..7b069d1f5e 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -64,42 +64,6 @@ functions: env: <<: *go_options command: make package - "set up remote credentials": - command: shell.exec - params: - silent: true - script: | - set -o errexit - # Since the macros 'private_key_remote' and 'private_key_file' are not always defined - # we default to /dev/null to avoid syntax errors of an empty expansion. - if [ ! -z "${private_key_remote}" ] && [ ! -z "${private_key_file}" ] ; then - mkdir -p ~/.ssh - echo -n "${private_key_remote}" > ${private_key_file|/dev/null} - chmod 0600 ${private_key_file|/dev/null} - fi - # Ensure a clean aws configuration state - rm -rf ~/.aws - mkdir -p ~/.aws - # If ${aws_profile_remote} is not specified then the config & credentials are - # stored in the 'default' profile. - aws_profile="${aws_profile_remote|default}" - # The profile in the config file is specified as [profile ], except - # for [default], see http://boto3.readthedocs.io/en/latest/guide/configuration.html - if [ $aws_profile = "default" ] ; then - aws_profile_config="[default]" - else - aws_profile_config="[profile $aws_profile]" - fi - cat <> ~/.aws/config - $aws_profile_config - region = us-east-1 - EOF - # The profile in the credentials file is specified as []. - cat <> ~/.aws/credentials - [$aws_profile] - aws_access_key_id = ${aws_key_remote} - aws_secret_access_key = ${aws_secret_remote} - EOF "set up notary client credentials": - command: shell.exec params: @@ -109,14 +73,13 @@ functions: set -o errexit cat < notary_env.sh + export NOTARY_KEY_NAME='server-4.4' export NOTARY_TOKEN=${signing_auth_token_44} export BARQUE_USERNAME=${barque_user} export BARQUE_PASSWORD=${barque_password} EOF - if [[ ! -f signing_auth_token_44 ]]; then - echo "${signing_auth_token_44}" > signing_auth_token - fi + echo "${signing_auth_token_44}" > ./signing_auth_token "push": - command: shell.exec params: @@ -124,6 +87,7 @@ functions: script: | . ./notary_env.sh + set -o xtrace set -o errexit set -o verbose @@ -134,14 +98,17 @@ functions: # We get the raw version string (v1.2.3-45-gabcdef) from git VERSION=$(git describe --abbrev=7 | cut -d "v" -f 2) - ./curator repo submit \ + ./curator \ + --level debug \ + repo submit \ --service ${barque_url} \ - --config .repo_config.yml \ + --config etc/repo_config.yml \ --distro ${distro} \ --edition ${edition} \ --version $VERSION \ --arch x86_64 \ - --packages https://s3.amazonaws.com/mongodb-mongocli-build/${project}/${revision}/dist/mongocli_next_${revision}_${version_id}_${created_at}_linux_x86_64.${ext} + --packages https://s3.amazonaws.com/mongodb-mongocli-build/${project}/dist/${build_id}/${ext}.tgz + tasks: - name: compile commands: @@ -155,23 +122,18 @@ tasks: - func: "gen-notices" - func: "fetch goreleaser" - func: "package" - - command: shell.exec + - command: archive.targz_pack params: - working_dir: mongocli/dist - script: | - set -o errexit - set -o verbose - - # we could generate a similar name with goreleaser but we want to keep the vars evg compatibale to use later - mv mongocli_next_linux_i386.deb mongocli_next_${revision}_${version_id}_${created_at}_linux_i386.deb - mv mongocli_next_linux_i386.rpm mongocli_next_${revision}_${version_id}_${created_at}_linux_i386.rpm - mv mongocli_next_linux_i386.tar.gz mongocli_next_${revision}_${version_id}_${created_at}_linux_i386.tar.gz - mv mongocli_next_linux_x86_64.deb mongocli_next_${revision}_${version_id}_${created_at}_linux_x86_64.deb - mv mongocli_next_linux_x86_64.rpm mongocli_next_${revision}_${version_id}_${created_at}_linux_x86_64.rpm - mv mongocli_next_linux_x86_64.tar.gz mongocli_next_${revision}_${version_id}_${created_at}_linux_x86_64.tar.gz - mv mongocli_next_macos_x86_64.tar.gz mongocli_next_${revision}_${version_id}_${created_at}_macOS_x86_64.tar.gz - mv mongocli_next_windows_i386.zip mongocli_next_${revision}_${version_id}_${created_at}_windows_i386.zip - mv mongocli_next_windows_x86_64.zip mongocli_next_${revision}_${version_id}_${created_at}_windows_x86_64.zip + target: mongocli/dist/deb.tgz + source_dir: mongocli/dist + include: + - "mongocli_next_linux_x86_64.deb" + - command: archive.targz_pack + params: + target: mongocli/dist/rpm.tgz + source_dir: mongocli/dist + include: + - "mongocli_next_linux_x86_64.rpm" - command: s3.put params: aws_key: ${aws_key} @@ -181,7 +143,7 @@ tasks: - mongocli/dist/*.zip - mongocli/dist/*.deb - mongocli/dist/*.rpm - remote_file: ${project}/${revision}/dist/ + remote_file: ${project}/dist/${build_id}/ bucket: mongodb-mongocli-build permissions: public-read content_type: ${content_type|application/x-gzip} @@ -197,10 +159,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -217,10 +175,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -238,10 +192,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -259,10 +209,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -296,10 +242,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -318,10 +260,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -338,10 +276,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -359,11 +293,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - - func: "set up notary client credentials" - func: "push" vars: edition: enterprise @@ -379,10 +308,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -400,10 +325,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -420,10 +341,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -441,10 +358,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -461,11 +374,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - - func: "set up notary client credentials" - func: "push" vars: edition: org @@ -482,10 +390,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -502,10 +406,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -523,10 +423,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: @@ -543,10 +439,6 @@ tasks: - name: package commands: - func: "clone" - - func: "set up remote credentials" - vars: - aws_key_remote: ${repo_aws_key} - aws_secret_remote: ${repo_aws_secret} - func: "set up notary client credentials" - func: "push" vars: diff --git a/.repo_config.yml b/etc/repo_config.yml similarity index 64% rename from .repo_config.yml rename to etc/repo_config.yml index bd740f0931..5ab49591ae 100644 --- a/.repo_config.yml +++ b/etc/repo_config.yml @@ -66,6 +66,22 @@ repos: # #################### + - name: rhel62 + type: rpm + edition: org + bucket: repo.mongodb.org + repos: + - yum/redhat/6/mongodb-org + - yum/redhat/6Server/mongodb-org + + - name: rhel67 + type: rpm + edition: org + bucket: repo.mongodb.org + repos: + - yum/redhat/6/mongodb-org + - yum/redhat/6Server/mongodb-org + - name: rhel70 type: rpm edition: org @@ -74,6 +90,14 @@ repos: - yum/redhat/7/mongodb-org - yum/redhat/7Server/mongodb-org + - name: rhel72 + type: rpm + edition: org + bucket: repo.mongodb.org + repos: + - yum/redhat/7/mongodb-org + - yum/redhat/7Server/mongodb-org + - name: rhel80 type: rpm edition: org @@ -82,6 +106,13 @@ repos: - yum/redhat/8/mongodb-org - yum/redhat/8Server/mongodb-org + - name: amazon + type: rpm + edition: org + bucket: repo.mongodb.org + repos: + - yum/amazon/2013.03/mongodb-org + - name: amazon2 type: rpm edition: org @@ -89,6 +120,13 @@ repos: repos: - yum/amazon/2/mongodb-org + - name: suse11 + type: rpm + edition: org + bucket: repo.mongodb.org + repos: + - zypper/suse/11/mongodb-org + - name: suse12 type: rpm edition: org @@ -149,6 +187,30 @@ repos: repos: - apt/debian/dists/wheezy/mongodb-org + - name: ubuntu1204 + type: deb + code_name: "precise" + edition: org + bucket: repo.mongodb.org + component: multiverse + architectures: + - amd64 + - i386 + repos: + - apt/ubuntu/dists/precise/mongodb-org + + - name: ubuntu1404 + type: deb + code_name: "trusty" + edition: org + bucket: repo.mongodb.org + component: multiverse + architectures: + - amd64 + - i386 + repos: + - apt/ubuntu/dists/trusty/mongodb-org + - name: ubuntu1604 type: deb code_name: "xenial" @@ -182,6 +244,22 @@ repos: # #################### + - name: rhel62 + type: rpm + edition: enterprise + bucket: repo.mongodb.com + repos: + - yum/redhat/6/mongodb-enterprise + - yum/redhat/6Server/mongodb-enterprise + + - name: rhel67 + type: rpm + edition: enterprise + bucket: repo.mongodb.com + repos: + - yum/redhat/6/mongodb-enterprise + - yum/redhat/6Server/mongodb-enterprise + - name: rhel70 type: rpm edition: enterprise @@ -190,6 +268,21 @@ repos: - yum/redhat/7/mongodb-enterprise - yum/redhat/7Server/mongodb-enterprise + - name: rhel71 + type: rpm + edition: enterprise + bucket: repo.mongodb.com + repos: + - yum/redhat/7/mongodb-enterprise + - yum/redhat/7Server/mongodb-enterprise + + - name: rhel72 + type: rpm + edition: enterprise + bucket: repo.mongodb.com + repos: + - yum/redhat/7/mongodb-enterprise + - yum/redhat/7Server/mongodb-enterprise - name: rhel80 type: rpm @@ -199,6 +292,13 @@ repos: - yum/redhat/8/mongodb-enterprise - yum/redhat/8Server/mongodb-enterprise + - name: amazon + type: rpm + edition: enterprise + bucket: repo.mongodb.com + repos: + - yum/amazon/2013.03/mongodb-enterprise + - name: amazon2 type: rpm edition: enterprise @@ -206,6 +306,27 @@ repos: repos: - yum/amazon/2/mongodb-enterprise + - name: suse11 + type: rpm + edition: enterprise + bucket: repo.mongodb.com + repos: + - zypper/suse/11/mongodb-enterprise + + - name: suse12 + type: rpm + edition: enterprise + bucket: repo.mongodb.com + repos: + - zypper/suse/12/mongodb-enterprise + + - name: suse15 + type: rpm + edition: enterprise + bucket: repo.mongodb.com + repos: + - zypper/suse/15/mongodb-enterprise + - name: debian10 type: deb edition: enterprise @@ -256,6 +377,34 @@ repos: repos: - apt/debian/dists/wheezy/mongodb-enterprise + - name: ubuntu1204 + type: deb + code_name: "precise" + edition: enterprise + bucket: repo.mongodb.com + component: multiverse + architectures: + - amd64 + - ppc64el + - s390x + - i386 + repos: + - apt/ubuntu/dists/precise/mongodb-enterprise + + - name: ubuntu1404 + type: deb + code_name: "trusty" + edition: enterprise + bucket: repo.mongodb.com + component: multiverse + architectures: + - amd64 + - ppc64el + - s390x + - i386 + repos: + - apt/ubuntu/dists/trusty/mongodb-enterprise + - name: ubuntu1604 type: deb code_name: "xenial"