fix script #1
parent
db94ab00fc
commit
a2af613191
|
|
@ -226,28 +226,28 @@ docker-nvidia-no-db-build:
|
||||||
# All other branches are tagged with the escaped branch name (commit ref slug)
|
# All other branches are tagged with the escaped branch name (commit ref slug)
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
arch="nvidia"
|
arch="nvidia" ;
|
||||||
branch=""
|
branch="" ;
|
||||||
no_db=true
|
no_db=true ;
|
||||||
no_db_tag = ""
|
no_db_tag = "" ;
|
||||||
docker_file_ext=""
|
docker_file_ext="" ;
|
||||||
|
|
||||||
if [[ "${arch}" != "" ]]; then
|
if [[ "${arch}" != "" ]]; then
|
||||||
docker_file_ext=".${arch}"
|
docker_file_ext=".${arch}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$CI_COMMIT_BRANCH" != "$CI_DEFAULT_BRANCH" ]]; then
|
if [[ "$CI_COMMIT_BRANCH" != "$CI_DEFAULT_BRANCH" ]]; then
|
||||||
branch="${CI_COMMIT_REF_SLUG}-"
|
branch="${CI_COMMIT_REF_SLUG}-"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${no_db}" == "true" ]]; then
|
if [[ "${no_db}" == "true" ]]; then
|
||||||
no_db_tag="-no-db"
|
no_db_tag="-no-db"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tag=":${branch}${arch}${no_db_tag}"
|
tag=":${branch}${arch}${no_db_tag}" ;
|
||||||
|
|
||||||
image_tag="$CI_REGISTRY_IMAGE${tag}"
|
image_tag="$CI_REGISTRY_IMAGE${tag}" ;
|
||||||
echo "Running on branch '${CI_COMMIT_BRANCH}', Tag: ${tag}, Image: ${image_tag}"
|
echo "Running on branch '${CI_COMMIT_BRANCH}', Tag: ${tag}, Image: ${image_tag}" ;
|
||||||
|
|
||||||
- docker build --pull --build-arg VAR_EXCLUDE_DB="${no_db}" -t "${image_tag}" . -f "Dockerfile${docker_file_ext}"
|
- docker build --pull --build-arg VAR_EXCLUDE_DB="${no_db}" -t "${image_tag}" . -f "Dockerfile${docker_file_ext}"
|
||||||
- docker push "${image_tag}"
|
- docker push "${image_tag}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue