comprofix.com/.gitlab-ci.yml

39 lines
813 B
YAML
Raw Normal View History

2022-08-07 14:28:37 +10:00
variables:
2022-08-07 18:04:42 +10:00
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
2022-08-07 14:46:56 +10:00
IMAGE_TAG_LATEST: $CI_REGISTRY_IMAGE:latest
2022-08-07 15:04:07 +10:00
2022-08-07 13:37:05 +10:00
stages:
- eleventy
- docker_build
2022-08-07 16:49:16 +10:00
- docker_deploy
2022-08-07 14:28:37 +10:00
eleventy:
stage: eleventy
2022-08-07 13:37:05 +10:00
image: node:latest
cache:
paths:
- node_modules/
script:
- npm install
- npm run build
artifacts:
paths:
- _site/
only:
2022-08-07 18:01:27 +10:00
- master
2022-08-07 14:05:13 +10:00
docker_build:
stage: docker_build
2023-12-31 16:01:57 +10:00
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
2022-08-07 14:05:13 +10:00
script:
2023-12-31 16:00:15 +10:00
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
2023-12-31 17:30:02 +10:00
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $IMAGE_TAG --destination $IMAGE_TAG_LATEST
2022-08-07 14:05:13 +10:00
only:
2022-08-07 18:01:27 +10:00
- master
2022-08-07 16:49:16 +10:00