Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
kk
tower
Commits
ecc62267
Commit
ecc62267
authored
Feb 15, 2017
by
Aleksey Shirokih
Browse files
better building
parent
17e5f297
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
ecc62267
...
...
@@ -25,7 +25,7 @@ build_tgz:
-
docker
upload
:
stage
:
upload
stage
:
upload
image
:
registry.getnoc.com/infrastructure/s3helper:master
script
:
-
export VERSION=$(cat VERSION)
...
...
@@ -36,7 +36,7 @@ upload:
dependencies
:
-
build_tgz
tags
:
-
docker
-
docker
build_image
:
stage
:
build_image
...
...
@@ -45,8 +45,9 @@ build_image:
-
export CONTAINER_NAME=$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME
script
:
-
docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
-
docker build --build-arg="http_proxy=$PROXY" --build-arg="https_proxy=$PROXY" --build-arg=VERSION=${VERSION} -t $CONTAINER_NAME .
-
docker push $CONTAINER_NAME
-
docker pull $CONTAINER_NAME
-
docker build --pull --build-arg="http_proxy=$PROXY" --build-arg="https_proxy=$PROXY" --build-arg=VERSION=${VERSION} -t $CONTAINER_NAME .
-
docker push $CONTAINER_NAME
-
if [ -n "${CI_BUILD_TAG}" ]; then docker tag $CONTAINER_NAME $CI_REGISTRY_IMAGE:${CI_BUILD_TAG}; docker push $CI_REGISTRY_IMAGE:${CI_BUILD_TAG}; fi
-
if [ -n "${CI_BUILD_TAG}" ]; then docker tag $CONTAINER_NAME $CI_REGISTRY_IMAGE:latest; docker push $CI_REGISTRY_IMAGE:latest; fi
dependencies
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment