Commit 29240fff authored by Anthony FREYERMUTH's avatar Anthony FREYERMUTH
Browse files

[#2] Finished CI CD, secret variables are now hidden, deployment is manual

parent fcd1abf9
Pipeline #56374 failed with stages
in 2 minutes and 3 seconds
......@@ -4,9 +4,6 @@ stages:
- deploy
variables:
AF_REGISTRY_URL: docker-repository.artifactory.ippon.fr
AF_REGISTRY_USER: livretaccueil-ci
AF_REGISTRY_PASSWORD: livretaccueil-ci
APP: livretaccueil
maven-build:
......@@ -26,14 +23,13 @@ docker-build:
- docker logout
- docker login -u $AF_REGISTRY_USER -p $AF_REGISTRY_PASSWORD $AF_REGISTRY_URL
script:
- echo $AF_REGISTRY_URL $AF_REGISTRY_USER $IMAGE_FQDN $APP
- docker build --rm ./ -t $APP:$CI_COMMIT_SHORT_SHA
- docker tag $APP:$CI_COMMIT_SHORT_SHA $AF_REGISTRY_URL/$APP:$CI_COMMIT_SHORT_SHA
- docker push $AF_REGISTRY_URL/$APP:$CI_COMMIT_SHORT_SHA
- docker build --rm ./ -t IMAGE_FQDN
- docker tag $APP:$CI_COMMIT_SHORT_SHA $AF_REGISTRY_URL/$IMAGE_FQDN
- docker push $AF_REGISTRY_URL/$IMAGE_FQDN
variables:
IMAGE_FQDN: ${APP}:${CI_COMMIT_REF_SLUG}
IMAGE_FQDN: ${APP}:${CI_COMMIT_SHORT_SHA}
only:
- preprod
- master
deploy:
stage: deploy
......@@ -41,8 +37,9 @@ deploy:
- preprod
script:
- docker rm -f livretaccueil || true
- docker run -tid -p 8091:8091 --name livretaccueil $AF_REGISTRY_URL/$APP:$CI_COMMIT_SHORT_SHA
- docker run -tid -p 8091:8091 --name livretaccueil $AF_REGISTRY_URL/$IMAGE_FQDN
variables:
IMAGE_FQDN: ${APP}:${CI_COMMIT_REF_SLUG}
IMAGE_FQDN: ${APP}:${CI_COMMIT_SHORT_SHA}
only:
- preprod
- master
when: manual
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment