Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GitlabMarkdownToPDF
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ifs
GitlabMarkdownToPDF
Commits
2a27e578
Commit
2a27e578
authored
7 years ago
by
Marcel Huber
Browse files
Options
Downloads
Patches
Plain Diff
job added to deploy tagged image
parent
5489d5e3
No related branches found
No related tags found
No related merge requests found
Pipeline
#94308
failed
3 years ago
Stage: prepare
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+14
-1
14 additions, 1 deletion
.gitlab-ci.yml
with
14 additions
and
1 deletion
.gitlab-ci.yml
+
14
−
1
View file @
2a27e578
variables
:
variables
:
PANDOC_IMAGE_BASENAME
:
$CI_REGISTRY_IMAGE/pandoc
PANDOC_IMAGE
:
$CI_REGISTRY_IMAGE/pandoc:$CI_COMMIT_REF_NAME
PANDOC_IMAGE
:
$CI_REGISTRY_IMAGE/pandoc:$CI_COMMIT_REF_NAME
stages
:
stages
:
-
prepare
-
prepare
-
build
-
build
-
deploy
before_script
:
before_script
:
...
@@ -13,10 +15,21 @@ BuildPandocImage:
...
@@ -13,10 +15,21 @@ BuildPandocImage:
tags
:
tags
:
-
docker
-
docker
script
:
script
:
-
docker build --build-arg VCS_REF=$CI_COMMIT_
REF_NAME
--tag=$PANDOC_IMAGE --file=Dockerfile.pandoc .
-
docker build --build-arg VCS_REF=$CI_COMMIT_
SHA
--tag=$PANDOC_IMAGE --file=Dockerfile.pandoc .
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
-
docker push $PANDOC_IMAGE
-
docker push $PANDOC_IMAGE
TagPandocImage
:
image
:
docker:latest
stage
:
deploy
only
:
-
tags
tags
:
-
docker
script
:
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
-
docker image tag $PANDOC_IMAGE $PANDOC_IMAGE_BASENAME:$CI_COMMIT_TAG
.job_template
:
&job_definition
.job_template
:
&job_definition
image
:
$PANDOC_IMAGE
image
:
$PANDOC_IMAGE
stage
:
build
stage
:
build
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment