Skip to content
Snippets Groups Projects
Commit 0ed78aaf authored by nimrod's avatar nimrod
Browse files

Use CI templates.

parent 02ddb72b
No related branches found
No related tags found
No related merge requests found
Pipeline #297 passed
---
image: adarnimrod/ci-images:docker
stages:
- test
- build
- run
pre-commit:
stage: test
image: adarnimrod/ci-images:pre-commit
variables:
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"
# Disabled until https://github.com/pre-commit/pre-commit/issues/1387 is
# resolved.
SKIP: "hadolint,docker-compose"
script:
- pre-commit run --all-files
cache:
paths:
- .cache/
include:
- project: shore/ci-templates
file: templates/docker-compose.yml
build:
stage: build
tags: ["ns4.shore.co.il"]
variables:
COMPOSE_DOCKER_CLI_BUILD: "1"
DOCKER_BUILDKIT: "1"
script:
- docker-compose build --no-cache --pull
- docker-compose pull --quiet
extends: .compose-build
tags: [ns4.shore.co.il]
run:
stage: run
tags: ["ns4.shore.co.il"]
when: manual
script:
- docker-compose up --detach --remove-orphans
# yamllint disable rule:line-length
- |
for i in $(seq 12)
do
docker container inspect --format '{{ .State.Health.Status }}' $(docker-compose ps -q) | grep -v '^healthy$' || break
sleep 10
done
! docker container inspect --format '{{ .State.Health.Status }}' $(docker-compose ps -q) | grep -v '^healthy$'
extends: .compose-run
tags: [ns4.shore.co.il]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment