Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Cecile Cavet
test-ci
Commits
1511102b
Commit
1511102b
authored
Sep 23, 2021
by
Cecile Cavet
Browse files
Update .gitlab-ci.yml
parent
08a4b8b4
Pipeline
#137107
failed with stage
in 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
.gitlab-ci.yml
.gitlab-ci.yml
+22
-10
No files found.
.gitlab-ci.yml
View file @
1511102b
...
...
@@ -87,17 +87,29 @@ deploy to staging:
# only:
# - master
build
:
image
:
docker:19.03.11
stage
:
build
services
:
-
docker:19.03.11-dind
before_script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script
:
-
docker build --pull -t $IMAGE_BUILD_TAG .
-
docker push $IMAGE_BUILD_TAG
#
build:
#
image: docker:19.03.11
#
stage: build
#
services:
#
- docker:19.03.11-dind
#
before_script:
#
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
#
script:
#
- docker build --pull -t $IMAGE_BUILD_TAG .
#
- docker push $IMAGE_BUILD_TAG
#script:
# - docker build --pull -t ${IMAGE_BUILD_TAG} --build-arg IMAGE_VERSION=${IMAGE_BUILD_TAG} .
# - docker push ${IMAGE_BUILD_TAG}
build
:
stage
:
build
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
mkdir -p /kaniko/.docker
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
rules
:
-
if
:
$CI_COMMIT_TAG
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