Added webhook to GOCD and changed restart policy

This commit is contained in:
Aryom Belousov 2020-11-10 13:43:05 +03:00
parent 8817bd521a
commit ce2e653265
2 changed files with 5 additions and 1 deletions

View file

@ -6,6 +6,8 @@ test:
deploy:
stage: deploy
image: "docker:19.03.12"
before_script:
- apk add curl
variables:
DOCKER_TLS_CERTDIR: "/certs"
IMAGE_NAME: "$DOCKER_IMAGE_TAG:$CI_JOB_ID.$CI_COMMIT_SHORT_SHA"
@ -16,6 +18,6 @@ deploy:
- docker login $REGISTRY_NAME -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker push $IMAGE_NAME
- docker push $DOCKER_IMAGE_TAG
# - "curl -X POST -H \"Authorization: Bearer $GOCD_ACCESS_TOKEN\" -d '{\"repository_url\": \"https://gitlab.com/flygrounder/go-mtg-vk.git\"}' http://165.22.85.27:8153/go/admin/materials/git/notify"
- curl -X POST -H "Authorization: Bearer $GOCD_ACCESS_TOKEN" -d '{"repository_url": "https://gitlab.com/flygrounder/go-mtg-vk"}' -H "Accept: application/vnd.go.cd.v2+json" -H "Content-Type: application/json" http://165.22.85.27:8153/go/api/admin/materials/git/notify
only:
- master

View file

@ -10,5 +10,7 @@ services:
ports:
- "8888:80"
restart: "always"
redis:
image: "redis:6.0.9"
restart: "always"