Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
TelcoDB
Web Frontend
Commits
aa92b20e
Verified
Commit
aa92b20e
authored
Jan 20, 2020
by
Elias Ojala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gitlab CI for automatic Docker builds
parent
90f41392
Pipeline
#60
failed with stage
in 1 minute and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
.gitlab-ci.yml
.gitlab-ci.yml
+36
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
aa92b20e
# This file is a template, and might need editing before it works on your project.
docker-build-master
:
# Official docker image.
image
:
docker:latest
stage
:
build
services
:
-
docker:dind
variables
:
# Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
DOCKER_HOST
:
tcp://docker:2376
DOCKER_TLS_CERTDIR
:
"
/certs"
before_script
:
-
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script
:
-
docker build --pull -t "$CI_REGISTRY_IMAGE" .
-
docker push "$CI_REGISTRY_IMAGE"
only
:
-
master
docker-build
:
# Official docker image.
image
:
docker:latest
stage
:
build
services
:
-
docker:dind
variables
:
# Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
DOCKER_HOST
:
tcp://docker:2376
DOCKER_TLS_CERTDIR
:
"
/certs"
before_script
:
-
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script
:
-
docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
-
docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except
:
-
master
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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