|
1 | 1 | --- |
| 2 | +variables: |
| 3 | + FF_SCRIPT_SECTIONS: "true" |
| 4 | + |
2 | 5 | before_script: |
3 | 6 | - export $BASH_VARS |
4 | 7 |
|
5 | 8 | stages: |
6 | 9 | - linting |
| 10 | + - builds |
7 | 11 |
|
8 | 12 | ansible-lint: |
9 | 13 | stage: linting |
10 | 14 | image: registry.gitlab.com/pipeline-components/ansible-lint:latest |
11 | 15 | script: |
12 | 16 | - ansible-lint --show-relpath roles |
| 17 | + rules: |
| 18 | + - if: $CI_COMMIT_BRANCH != "$CI_DEFAULT_BRANCH" |
| 19 | + - if: $CI_PIPELINE_SOURCE == "schedule" |
| 20 | + when: never |
| 21 | + |
| 22 | +yamllint: |
| 23 | + stage: linting |
| 24 | + image: registry.gitlab.com/pipeline-components/yamllint:latest |
| 25 | + script: |
| 26 | + - yamllint roles |
| 27 | + rules: |
| 28 | + - if: $CI_COMMIT_BRANCH != "$CI_DEFAULT_BRANCH" |
| 29 | + - if: $CI_PIPELINE_SOURCE == "schedule" |
| 30 | + when: never |
| 31 | + |
| 32 | +webserver: |
| 33 | + stage: builds |
| 34 | + image: debian:bookworm |
| 35 | + script: |
| 36 | + - | |
| 37 | + /usr/bin/apt-get update |
| 38 | + /usr/bin/apt-get install -y curl sudo |
| 39 | + /usr/bin/curl -LO ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}/-/raw/${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}/install.sh |
| 40 | + /usr/bin/chmod +x ./install.sh |
| 41 | + /usr/bin/sudo ./install.sh --version ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} --config-branch ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} --docker --no-firewall |
| 42 | + /usr/bin/git config --global --add safe.directory /home/controller/ce-provision |
| 43 | + /usr/bin/git config --global --add safe.directory /home/controller/ce-provision/config |
| 44 | + /usr/sbin/sshd& |
| 45 | + /usr/bin/su - controller -c "cd /home/controller/ce-provision && /bin/sh /home/controller/ce-provision/scripts/provision.sh --python-interpreter /home/controller/ce-python/bin/python3 --repo dummy --branch dummy --workspace /home/controller/ce-provision/ce-dev/ansible --playbook plays/web/ci.yml --own-branch ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} --config-branch ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} --force" |
| 46 | + rules: |
| 47 | + - if: $CI_PIPELINE_SOURCE == "merge_request_event" |
| 48 | + - if: $CI_PIPELINE_SOURCE == "schedule" |
| 49 | + when: always |
| 50 | + |
| 51 | +gitlabserver: |
| 52 | + stage: builds |
| 53 | + image: debian:bookworm |
| 54 | + script: |
| 55 | + - | |
| 56 | + /usr/bin/apt-get update |
| 57 | + /usr/bin/apt-get install -y curl sudo |
| 58 | + /usr/bin/curl -LO ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}/-/raw/${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}/install.sh |
| 59 | + /usr/bin/chmod +x ./install.sh |
| 60 | + /usr/bin/sudo ./install.sh --version ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} --config-branch ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} --docker --no-firewall |
| 61 | + /usr/bin/git config --global --add safe.directory /home/controller/ce-provision |
| 62 | + /usr/bin/git config --global --add safe.directory /home/controller/ce-provision/config |
| 63 | + /usr/sbin/sshd& |
| 64 | + /usr/bin/su - controller -c "cd /home/controller/ce-provision && /bin/sh /home/controller/ce-provision/scripts/provision.sh --python-interpreter /home/controller/ce-python/bin/python3 --repo dummy --branch dummy --workspace /home/controller/ce-provision/ce-dev/ansible --playbook plays/gitlab/ci.yml --own-branch ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} --config-branch ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} --force" |
| 65 | + rules: |
| 66 | + - if: $CI_PIPELINE_SOURCE == "merge_request_event" |
| 67 | + - if: $CI_PIPELINE_SOURCE == "schedule" |
| 68 | + when: always |
0 commit comments