mirror of
https://gitlab.com/simple-stock-bots/simple-stock-bot.git
synced 2025-06-15 23:06:40 +00:00
34 lines
880 B
YAML
34 lines
880 B
YAML
black:
|
|
stage: .pre
|
|
image: registry.gitlab.com/pipeline-components/black:latest
|
|
script:
|
|
- black --check --verbose -- .
|
|
|
|
|
|
build:master:
|
|
stage: build
|
|
image:
|
|
name: gcr.io/kaniko-project/executor:v1.9.0-debug
|
|
entrypoint: [""]
|
|
script:
|
|
- /kaniko/executor
|
|
--context "${CI_PROJECT_DIR}"
|
|
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
|
|
--destination "${CI_REGISTRY_IMAGE}:latest"
|
|
rules:
|
|
- if: '${CI_COMMIT_BRANCH} == "master"'
|
|
|
|
|
|
build:branch:
|
|
stage: build
|
|
image:
|
|
name: gcr.io/kaniko-project/executor:v1.9.0-debug
|
|
entrypoint: [""]
|
|
script:
|
|
- /kaniko/executor
|
|
--context "${CI_PROJECT_DIR}"
|
|
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
|
|
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}"
|
|
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_BRANCH}"
|
|
rules:
|
|
- if: '${CI_COMMIT_BRANCH} != "master"' |