Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
João Sequeira
MOSCA
Commits
b272e4c8
Commit
b272e4c8
authored
Mar 09, 2021
by
João Sequeira
Browse files
add gitlab ci
parent
127d131a
Pipeline
#1313
failed with stages
in 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
b272e4c8
image
:
docker:latest
services
:
-
docker:dind
build
:
stage
:
build
script
:
-
docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY
-
docker pull $CI_REGISTRY_IMAGE:latest ||
true
-
docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest .
deploy
:
stage
:
deploy
script
:
-
docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY
-
docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
-
docker push $CI_REGISTRY_IMAGE:latest
only
:
-
master
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