mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
119 lines
2.5 KiB
YAML
119 lines
2.5 KiB
YAML
---
|
|
stages:
|
|
- lint
|
|
- test
|
|
|
|
include:
|
|
- local: 'cicd/kitchen_template.yml'
|
|
- local: 'cicd/kitchen_testruns.yml'
|
|
|
|
# pre-commit-run-all:
|
|
# image:
|
|
# name: registry.gitlab.com/saltstack/pop/cicd/containers/ubuntu1804:latest
|
|
# entrypoint: [""]
|
|
# stage: lint
|
|
# variables:
|
|
# PRE_COMMIT_HOME: "${CI_PROJECT_DIR}/pre-commit-cache"
|
|
# only:
|
|
# refs:
|
|
# - merge_requests
|
|
# cache:
|
|
# key: pre-commit-cache
|
|
# paths:
|
|
# - pre-commit-cache/
|
|
# script:
|
|
# - pip3 install pre-commit
|
|
# - pre-commit run -a -v --color always
|
|
|
|
lint-salt-full:
|
|
image: registry.gitlab.com/saltstack/pop/cicd/containers/ubuntu1804:latest
|
|
stage: lint
|
|
tags:
|
|
- saltstack-internal
|
|
cache:
|
|
key: nox-lint-cache
|
|
paths:
|
|
- .nox
|
|
only:
|
|
refs:
|
|
- schedules
|
|
script:
|
|
- python --version
|
|
- pip3 install -U nox-py2==2019.6.25
|
|
- nox --version
|
|
- nox --install-only -e lint-salt
|
|
- EC=254
|
|
- export PYLINT_REPORT=pylint-report-salt-full.log
|
|
- nox -e lint-salt
|
|
- EC=$?
|
|
- exit $EC
|
|
|
|
lint-tests-full:
|
|
image: registry.gitlab.com/saltstack/pop/cicd/containers/ubuntu1804:latest
|
|
stage: lint
|
|
tags:
|
|
- saltstack-internal
|
|
cache:
|
|
key: nox-lint-cache
|
|
paths:
|
|
- .nox
|
|
only:
|
|
refs:
|
|
- schedules
|
|
script:
|
|
- python --version
|
|
- pip3 install -U nox-py2==2019.6.25
|
|
- nox --version
|
|
- nox --install-only -e lint-tests
|
|
- EC=254
|
|
- export PYLINT_REPORT=pylint-report-tests-full.log
|
|
- nox -e lint-tests
|
|
- EC=$?
|
|
- exit $EC
|
|
|
|
docs-build-html:
|
|
image: registry.gitlab.com/saltstack/pop/cicd/containers/ubuntu1804:latest
|
|
stage: test
|
|
tags:
|
|
- saltstack-internal
|
|
cache:
|
|
key: nox-docs-cache
|
|
paths:
|
|
- .nox
|
|
only:
|
|
refs:
|
|
- schedules
|
|
script:
|
|
- python --version
|
|
- pip install -U nox-py2==2019.6.25
|
|
- nox --version
|
|
- nox -e 'docs-html(compress=True)'
|
|
|
|
docs-build-man-pages:
|
|
image: registry.gitlab.com/saltstack/pop/cicd/containers/ubuntu1804:latest
|
|
stage: test
|
|
tags:
|
|
- saltstack-internal
|
|
cache:
|
|
key: nox-docs-cache
|
|
paths:
|
|
- .nox
|
|
only:
|
|
refs:
|
|
- schedules
|
|
script:
|
|
- python --version
|
|
- pip install -U nox-py2==2019.6.25
|
|
- nox --version
|
|
- nox -e 'docs-man(compress=True, update=False)'
|
|
|
|
scan:
|
|
stage: test
|
|
image: shiftleft/sast-scan
|
|
script:
|
|
- scan --src ${CI_PROJECT_DIR} --type python --out_dir ${CI_PROJECT_DIR}/reports
|
|
artifacts:
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
|
|
paths:
|
|
- $CI_PROJECT_DIR/reports/
|
|
when: always
|