Skip to content

Instantly share code, notes, and snippets.

@aviadlevy
aviadlevy / .gitlab-ci-dynamin-per-project.yaml
Last active July 17, 2023 17:11
GitLab CI per project dynamic deploy
create deploy to dedicated prod:
stage: pre-prod-deploy
image: gitlab.***.net:4567/group/app-infra/ci-image:latest
script:
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.***.net/group/app-infra.git
- cd app-infra
- python3 scripts/generate_ci.py
- cp -r ci-out ..
artifacts:
paths:
@aviadlevy
aviadlevy / .gitlab-ci-output-template-example.yaml
Last active July 17, 2023 17:10
Example for output from template of gitlab-ci
image: gitlab.***.net:4567/group/project/ci-image:latest
# https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
workflow:
rules:
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
- when: always
variables:
PY_COLORS: '1'
GIT_SUBMODULE_STRATEGY: recursive