Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docker-git
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
docker
docker-git
Commits
1a2e9df7
Commit
1a2e9df7
authored
Aug 10, 2020
by
Christian Salzmann-Jaeckel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add .gitlab-ci.yml
parent
7c1a3045
Pipeline
#24034
passed with stages
in 2 minutes and 23 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 @
1a2e9df7
variables
:
IMAGE_TAG
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
RELEASE_TAG
:
$CI_REGISTRY_IMAGE:latest
stages
:
-
build
-
release
default
:
image
:
$CI_REGISTRY/docker/docker-git
tags
:
-
docker
before_script
:
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
build_docker_image
:
stage
:
build
script
:
-
docker build -t $IMAGE_TAG .
-
docker push $IMAGE_TAG
release_docker_image
:
stage
:
release
script
:
-
docker pull $IMAGE_TAG
-
docker tag $IMAGE_TAG $RELEASE_TAG
-
docker push $RELEASE_TAG
-
docker rmi $IMAGE_TAG
only
:
-
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