29 lines
989 B
YAML
29 lines
989 B
YAML
stages:
|
|
- build
|
|
- deploy
|
|
|
|
build:
|
|
stage: build
|
|
image: sikalabs/ci-node
|
|
variables:
|
|
IMAGE: vmcr.cz/ant.k8s.vxm.cz
|
|
IMAGE_TAG: $CI_COMMIT_SHORT_SHA
|
|
before_script:
|
|
- docker info
|
|
script:
|
|
- cd sites/ant.k8s.vxm.cz
|
|
- yarn install --frozen-lockfile
|
|
- yarn build
|
|
- docker build --tag $IMAGE:$IMAGE_TAG --file ./build/Containerfile .
|
|
- docker push $IMAGE:$IMAGE_TAG
|
|
|
|
deploy:
|
|
stage: deploy
|
|
image: sikalabs/ci
|
|
variables:
|
|
GIT_STRATEGY: none
|
|
environment:
|
|
name: production
|
|
url: https://ant.k8s.vxm.cz
|
|
script:
|
|
- curl --request PUT --header 'PRIVATE-TOKEN: ${CI_PUSH_TOKEN}' --header "Content-Type: application/json" --data '{"branch": "main", "author_email": "ci@gitlab.mareshq.com", "author_name": "GitLab CI [bot]", "content": "image: ${IMAGE}:${IMAGE_TAG}", "commit_message": "[auto] build(signpost): update image to ${IMAGE}:${IMAGE_TAG}"}' "https://gitlab.mareshq.com/api/v4/projects/60/repository/files/signpost%2Fvalues%2Eyaml"
|