Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Docker Archlinux Ci
Manage
Activity
Members
Labels
Plan
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
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
Quang tru HUYNH
Docker Archlinux Ci
Commits
1c565efc
Commit
1c565efc
authored
1 year ago
by
Quang tru HUYNH
Browse files
Options
Downloads
Patches
Plain Diff
replaced docker build script
parent
71c65ad7
No related branches found
No related tags found
No related merge requests found
Pipeline
#116792
passed
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+11
-11
11 additions, 11 deletions
.gitlab-ci.yml
with
11 additions
and
11 deletions
.gitlab-ci.yml
+
11
−
11
View file @
1c565efc
image
:
registry-gitlab.pasteur.fr/dsi-tools/docker-images/docker:latest
services
:
-
registry-gitlab.pasteur.fr/dsi-tools/docker-images/docker:dind
stages
:
-
build
build
:
build
:
image
:
docker:24
stage
:
build
stage
:
build
before_script
:
-
i=0; while [ "$i" -lt 12 ]; do docker info && break; sleep 5; i=$(( i + 1 )) ; done
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script
:
script
:
-
docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" registry-gitlab.pasteur.fr
-
export MY_TIME=`date +"%F-%H%M"`
-
export MY_TIME=`date +"%F-%H%M"`
-
docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" -t "$CI_REGISTRY_IMAGE:latest" -t "$CI_REGISTRY_IMAGE:$MY_TIME" --build-arg="BUILD_OPTIONS=$OPTIONS" -f ./Dockerfile .
-
docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" -t "$CI_REGISTRY_IMAGE:latest" -t "$CI_REGISTRY_IMAGE:$MY_TIME" .
-
docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
-
docker push "$CI_REGISTRY_IMAGE"
-
docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA"
-
docker push "$CI_REGISTRY_IMAGE:latest"
-
docker push "$CI_REGISTRY_IMAGE:main"
-
docker push "$CI_REGISTRY_IMAGE:$MY_TIME"
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