Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ci-docker-images
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Algorithms Library Toolkit
infrastructure
ci-docker-images
Commits
7e2edf0b
Unverified
Commit
7e2edf0b
authored
1 year ago
by
Tomáš Pecka
Browse files
Options
Downloads
Patches
Plain Diff
ci: replace docker with buildah
parent
c942e90f
No related branches found
No related tags found
No related merge requests found
Pipeline
#265169
passed
1 year ago
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+7
-23
7 additions, 23 deletions
.gitlab-ci.yml
with
7 additions
and
23 deletions
.gitlab-ci.yml
+
7
−
23
View file @
7e2edf0b
...
...
@@ -3,41 +3,25 @@ image: $CI_REGISTRY/ict/alpine-docker-images/ci:3.17
stages
:
-
deploy
.docker
:
&docker_template
cache
:
{}
# disable
variables
:
DOCKER_DRIVER
:
overlay2
DOCKER_HOST
:
tcp://docker:2375
DOCKER_TLS_CERTDIR
:
"
"
services
:
-
name
:
gitlab.fit.cvut.cz:5000/algorithms-library-toolkit/infrastructure/ci-docker-images/docker:dind
alias
:
docker
before_script
:
-
apk add --no-cache docker
-
docker info
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
dependencies
:
[]
.push-only-job
:
&push-only-job
<<
:
*docker_template
stage
:
deploy
image
:
$CI_REGISTRY/ict/images/buildah:v1
script
:
-
IMAGE="${CI_JOB_NAME#deploy:}"
-
IMAGE_NAME="${CI_REGISTRY_IMAGE}/${IMAGE}:latest"
-
cd "$IMAGE"
-
echo "Building image '${IMAGE}' as '${IMAGE_NAME}'"
-
docker
build -t "$IMAGE_NAME" .
-
docker
push
"$IMAGE_NAME"
-
buildah
build
--squash
-t "$
{
IMAGE_NAME
}
" .
-
buildah
push "$
{
IMAGE_NAME
}
"
.create-local-copy
:
©-job
<<
:
*docker_template
stage
:
deploy
image
:
$CI_REGISTRY/ict/images/buildah:v1
script
:
-
IMAGE="${CI_JOB_NAME#copy:}"
-
docker
pull "${IMAGE}"
-
docker
tag "${IMAGE}" "${CI_REGISTRY_IMAGE}/${IMAGE}"
-
docker
push "${CI_REGISTRY_IMAGE}/${IMAGE}"
-
buildah
pull "${IMAGE}"
-
buildah
tag "${IMAGE}" "${CI_REGISTRY_IMAGE}/${IMAGE}"
-
buildah
push "${CI_REGISTRY_IMAGE}/${IMAGE}"
deploy:alt-builder
:
<<
:
*push-only-job
...
...
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