Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
pass version param (#19982)
Browse files Browse the repository at this point in the history
  • Loading branch information
mseth10 authored Mar 5, 2021
1 parent 098af4f commit 9a2a502
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 26 deletions.
2 changes: 2 additions & 0 deletions cd/Jenkinsfile_release_job
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pipeline {
string(defaultValue: "mxnet_lib", description: "Pipeline to build", name: "RELEASE_JOB_TYPE")
string(defaultValue: "cpu,native,cu100,cu101,cu102,cu110,cu112", description: "Comma separated list of variants", name: "MXNET_VARIANTS")
booleanParam(defaultValue: false, description: 'Whether this is a release build or not', name: "RELEASE_BUILD")
string(defaultValue: "nightly_v1.x", description: "String used for naming docker images", name: "VERSION")
}

stages {
Expand Down Expand Up @@ -74,6 +75,7 @@ pipeline {
|Release Build: ${params.RELEASE_BUILD}
|Commit Id: ${env.GIT_COMMIT}
|Branch: ${env.GIT_BRANCH}
|Version: ${VERSION}
|Variants: ${params.MXNET_VARIANTS}""".stripMargin()
}
}
Expand Down
1 change: 1 addition & 0 deletions cd/Jenkinsfile_utils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def trigger_release_job(cd_release_job, job_name, job_type, mxnet_variants) {
string(name: "RELEASE_JOB_TYPE", value: "${job_type}"),
string(name: "MXNET_VARIANTS", value: "${mxnet_variants}"),
booleanParam(name: "RELEASE_BUILD", value: "${env.RELEASE_BUILD}"),
string(name: "VERSION", value: "${env.VERSION}"),
string(name: "COMMIT_ID", value: "${env.GIT_COMMIT}")
],
// If propagate is true, any result other than successful will
Expand Down
12 changes: 0 additions & 12 deletions cd/python/docker/python_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,6 @@ push() {

# Push image
docker push "${image_name}"

# Iterate over remaining tags, if any
for ((i=1;i<${#docker_tags[@]};i++)); do
local docker_tag="${docker_tags[${i}]}"
local latest_image_name="${RELEASE_PUBLIC_ECR_REPOSITORY}/${repository}:${docker_tag}_py3"

docker tag "${image_name}" "${latest_image_name}"
docker push "${latest_image_name}"
echo "Successfully pushed ${latest_image_name}. Pull it with:"
echo "docker pull ${latest_image_name}"
echo "For a complete list of tags see https://hub.docker.com/u/${RELEASE_DOCKERHUB_REPOSITORY}/${repository}"
done
}

case ${command} in
Expand Down
20 changes: 6 additions & 14 deletions cd/utils/docker_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ mxnet_variant=${1:?"Please specify the mxnet variant as the first parameter"}
is_release=${RELEASE_BUILD:-false}
version=${VERSION:-nightly_v1.x}

# The docker tags will be in the form <version>_<hardware>(_mkl)
# Eg. nightly_cpu, 1.4.0_cpu_mkl, nightly_gpu_cu80_mkl, etc.
if [[ ${version} == "null" ]]; then
version="nightly_v1.x"
fi

# The docker tags will be in the form <version>_<hardware>
# Eg. nightly_v1.x_cpu, 1.8.0_cpu, nightly_v1.x_gpu_cu110, etc.

if [[ ${mxnet_variant} == "cpu" ]]; then
tag_suffix="cpu"
Expand All @@ -39,15 +43,3 @@ else
fi

echo "${version}_${tag_suffix}"

# Print out latest tags as well
if [[ ${is_release} == "true" ]]; then
if [[ ${mxnet_variant} == "cpu" ]]; then
echo "latest"
echo "latest_cpu"
elif [[ ${mxnet_variant} == "native" ]]; then
echo "latest_cpu_native"
elif [[ ${mxnet_variant} == "cu90" ]]; then
echo "latest_gpu"
fi
fi

0 comments on commit 9a2a502

Please sign in to comment.