Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Maxime Chaillet
doi-landing-page
Commits
34de74a2
Commit
34de74a2
authored
Oct 18, 2018
by
Antoine Roux
🦊
Browse files
Update .gitlab-ci.yml
parent
091d89d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
34de74a2
...
@@ -7,23 +7,25 @@ stages:
...
@@ -7,23 +7,25 @@ stages:
build
:
build
:
stage
:
build
stage
:
build
script
:
script
:
-
docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
-
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" "$DOCKER_REGISTRY"
-
docker image tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" "$CI_REGISTRY_IMAGE:latest"
-
docker build --pull -t "$DOCKER_REGISTRY/$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
-
docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
-
docker image tag "$DOCKER_REGISTRY/$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" "$DOCKER_REGISTRY/$CI_REGISTRY_IMAGE:latest"
-
docker push "$CI_REGISTRY_IMAGE:latest"
-
docker push "$DOCKER_REGISTRY/$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
-
docker push "$DOCKER_REGISTRY/$CI_REGISTRY_IMAGE:latest"
except
:
except
:
-
master
-
master
deploy_production
:
deploy_production
:
stage
:
deploy
stage
:
deploy
script
:
script
:
-
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" "$DOCKER_REGISTRY"
-
export http_proxy=http://proxy.esrf.fr:3128
-
export http_proxy=http://proxy.esrf.fr:3128
-
'
which
ssh-agent
||
(
apk
update
&&
apk
add
openssh-client
)'
-
'
which
ssh-agent
||
(
apk
update
&&
apk
add
openssh-client
)'
-
eval $(ssh-agent -s)
-
eval $(ssh-agent -s)
-
echo "$SSH_DEPLOY_KEY_PROD" | ssh-add -
-
echo "$SSH_DEPLOY_KEY_PROD" | ssh-add -
-
mkdir -p ~/.ssh
-
mkdir -p ~/.ssh
-
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
-
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
-
ssh -l gitlab-deploy "$DEPLOY_HOST" "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
-
ssh -l gitlab-deploy "$DEPLOY_HOST" "$
DOCKER_REGISTRY/$
CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
environment
:
environment
:
name
:
production
name
:
production
url
:
http://doi.esrf.fr/
url
:
http://doi.esrf.fr/
...
...
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