Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
okserver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ai3
docker
okserver
Commits
f686fff3
Commit
f686fff3
authored
4 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Switch to ai3/build-container rules for CI
parent
3c176045
No related branches found
No related tags found
No related merge requests found
Pipeline
#7623
passed
4 years ago
Stage: build
Stage: release
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+1
-29
1 addition, 29 deletions
.gitlab-ci.yml
with
1 addition
and
29 deletions
.gitlab-ci.yml
+
1
−
29
View file @
f686fff3
i
mage
:
docker:latest
i
nclude
:
"
https://git.autistici.org/ai3/build-container/raw/master/common.yml"
stages
:
-
docker_build
-
release
services
:
-
docker:dind
variables
:
IMAGE_TAG
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
RELEASE_TAG
:
$CI_REGISTRY_IMAGE:latest
GIT_SUBMODULE_STRATEGY
:
recursive
docker_build
:
stage
:
docker_build
script
:
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.git.autistici.org
-
docker build --build-arg ci_token=$CI_JOB_TOKEN --pull -t $IMAGE_TAG .
-
docker push $IMAGE_TAG
release
:
stage
:
release
script
:
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.git.autistici.org
-
docker pull $IMAGE_TAG
-
docker tag $IMAGE_TAG $RELEASE_TAG
-
docker push $RELEASE_TAG
only
:
-
master
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