-
Notifications
You must be signed in to change notification settings - Fork 88
Fix publish adding NOTARY_KEY_NAME #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <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 <<EOF >> ~/.aws/config | ||
$aws_profile_config | ||
region = us-east-1 | ||
EOF | ||
# The profile in the credentials file is specified as [<profile>]. | ||
cat <<EOF >> ~/.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,21 +73,21 @@ functions: | |
set -o errexit | ||
|
||
cat <<EOF > notary_env.sh | ||
export NOTARY_KEY_NAME='server-4.4' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we were missing this |
||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. simplifying this |
||
"push": | ||
- command: shell.exec | ||
params: | ||
working_dir: mongocli | ||
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 \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hiding this away |
||
--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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. curator is happier with tar.gz |
||
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: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this