Mise à jour du Pipeline CI pour utiliser les identifiés par Gitlab au lieu d'un jeton d'accès personnel
This commit is contained in:
parent
6782970159
commit
63c7c35a73
|
@ -4,7 +4,7 @@ variables:
|
|||
|
||||
before_script:
|
||||
- docker info
|
||||
- docker login -u $CI_USERNAME -p $CI_ACCESS_TOKEN $CI_REGISTRY
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
@ -78,5 +78,5 @@ deploy:
|
|||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||
script:
|
||||
- ssh -p $DEPLOYMENT_SERVER_SSH_PORT $DEPLOYMENT_SERVER_USERNAME@$DEPLOYMENT_SERVER "docker stop $DEPLOYED_CONTAINER_NAME || true && docker rm $DEPLOYED_CONTAINER_NAME || true"
|
||||
- ssh -p $DEPLOYMENT_SERVER_SSH_PORT $DEPLOYMENT_SERVER_USERNAME@$DEPLOYMENT_SERVER "docker login -u $CI_USERNAME -p $CI_ACCESS_TOKEN $CI_REGISTRY && docker pull $CI_REGISTRY_IMAGE_BACKEND"
|
||||
- ssh -p $DEPLOYMENT_SERVER_SSH_PORT $DEPLOYMENT_SERVER_USERNAME@$DEPLOYMENT_SERVER "docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY && docker pull $CI_REGISTRY_IMAGE_BACKEND"
|
||||
- ssh -p $DEPLOYMENT_SERVER_SSH_PORT $DEPLOYMENT_SERVER_USERNAME@$DEPLOYMENT_SERVER "docker run -d -p $PORT:$PORT --name=$DEPLOYED_CONTAINER_NAME -e spring_profiles_active=$SPRING_PROFILES -e spring_datasource_username=$DB_USERNAME -e spring_datasource_password=$DB_PASSWORD -e spring_datasource_url=$DB_URL $CI_REGISTRY_IMAGE_BACKEND"
|
||||
|
|
Loading…
Reference in New Issue