Skip to content

Commit

Permalink
Add version when publishing a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
bamarni committed Jun 29, 2018
1 parent 13b718b commit 49e504e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ci/build.groovy
Expand Up @@ -186,8 +186,8 @@ pipeline {
steps {
withCredentials([
string(credentialsId: "8b793652-f26a-422f-a9ba-0d1e47eb9d89", variable: "SLACK_API_TOKEN"),
string(credentialsId: "3f0dbb48-de33-431f-b91c-2366d2f0e1cf",variable: "AWS_ACCESS_KEY_ID"),
string(credentialsId: "f585ec9a-3c38-4f67-8bdb-79e5d4761937",variable: "AWS_SECRET_ACCESS_KEY"),
string(credentialsId: "e270aa3f-4825-480c-a3ec-18a541c4e2d1",variable: "AWS_ACCESS_KEY_ID"),
string(credentialsId: "cd616d55-78eb-45de-b7a8-e5bc5ccce4c7",variable: "AWS_SECRET_ACCESS_KEY"),
]) {

unstash "dcos-linux"
Expand Down
6 changes: 6 additions & 0 deletions cli/bin/binary.sh
Expand Up @@ -3,6 +3,12 @@
CURRDIR=$(dirname "${0}")
source ${CURRDIR}/common.sh

if [ -n "${TAG_NAME}" ]; then
echo "Injecting CLI version."
echo "version = \"${TAG_NAME}\"" > ${BUILDDIR}/../dcos/__init__.py
echo "version = \"${TAG_NAME}\"" > ${BUILDDIR}/dcoscli/__init__.py
fi

echo "Building binary..."
${BUILDDIR}/${VENV}/${BIN}/pyinstaller${EXE} \
--workpath=${BUILDDIR}/${DIST}/build \
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_binaries.py
Expand Up @@ -10,7 +10,7 @@
# TODO: the current DC/OS dev version (1.12) should be pulled dynamically (from the Github API?).
version = os.environ.get("TAG_NAME") or "dcos-1.12"

s3_client = boto3.resource('s3').meta.client
s3_client = boto3.resource('s3', region_name='us-west-2').meta.client
bucket = "downloads.dcos.io"
artifacts = [
("linux/dcos", "binaries/cli/linux/x86-64/{}/dcos".format(version)),
Expand Down
2 changes: 1 addition & 1 deletion scripts/release_tag.py
Expand Up @@ -18,7 +18,7 @@
print("Missing DCOS_VERSION.", file=sys.stderr)
sys.exit(1)

s3_client = boto3.resource('s3').meta.client
s3_client = boto3.resource('s3', region_name='us-west-2').meta.client
bucket = "downloads.dcos.io"
artifacts = [
"binaries/cli/linux/x86-64/{}/dcos",
Expand Down

0 comments on commit 49e504e

Please sign in to comment.