ci(gitlab-ci): trigger gitlab job template from awi_utils
This commit is contained in:
parent
db783455ec
commit
4ffeba4c3b
@ -18,7 +18,8 @@ workflow:
|
|||||||
|
|
||||||
include:
|
include:
|
||||||
- template: Security/Secret-Detection.gitlab-ci.yml
|
- template: Security/Secret-Detection.gitlab-ci.yml
|
||||||
|
- project: "bec/awi_utils"
|
||||||
|
file: "awi_utils/test_pkg_versions/.gitlab-ci-job-check-pkg.yml"
|
||||||
|
|
||||||
#commands to run in the Docker container before starting each job.
|
#commands to run in the Docker container before starting each job.
|
||||||
before_script:
|
before_script:
|
||||||
@ -37,7 +38,7 @@ stages:
|
|||||||
formatter:
|
formatter:
|
||||||
stage: Formatter
|
stage: Formatter
|
||||||
before_script:
|
before_script:
|
||||||
- ''
|
- ""
|
||||||
script:
|
script:
|
||||||
- pip install black isort
|
- pip install black isort
|
||||||
- pip install -e .[dev]
|
- pip install -e .[dev]
|
||||||
@ -69,10 +70,10 @@ pylint-check:
|
|||||||
script:
|
script:
|
||||||
# Identify changed Python files
|
# Identify changed Python files
|
||||||
- if [ "$CI_PIPELINE_SOURCE" == "merge_request_event" ]; then
|
- if [ "$CI_PIPELINE_SOURCE" == "merge_request_event" ]; then
|
||||||
TARGET_BRANCH_COMMIT_SHA=$(git rev-parse $CI_MERGE_REQUEST_TARGET_BRANCH_NAME);
|
TARGET_BRANCH_COMMIT_SHA=$(git rev-parse $CI_MERGE_REQUEST_TARGET_BRANCH_NAME);
|
||||||
CHANGED_FILES=$(git diff --name-only $SOURCE_BRANCH_COMMIT_SHA $TARGET_BRANCH_COMMIT_SHA | grep '\.py$' || true);
|
CHANGED_FILES=$(git diff --name-only $SOURCE_BRANCH_COMMIT_SHA $TARGET_BRANCH_COMMIT_SHA | grep '\.py$' || true);
|
||||||
else
|
else
|
||||||
CHANGED_FILES=$(git diff --name-only $CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA | grep '\.py$' || true);
|
CHANGED_FILES=$(git diff --name-only $CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA | grep '\.py$' || true);
|
||||||
fi
|
fi
|
||||||
- if [ -z "$CHANGED_FILES" ]; then echo "No Python files changed."; exit 0; fi
|
- if [ -z "$CHANGED_FILES" ]; then echo "No Python files changed."; exit 0; fi
|
||||||
|
|
||||||
@ -91,7 +92,7 @@ pylint-check:
|
|||||||
|
|
||||||
secret_detection:
|
secret_detection:
|
||||||
before_script:
|
before_script:
|
||||||
- ''
|
- ""
|
||||||
|
|
||||||
pytest:
|
pytest:
|
||||||
stage: test
|
stage: test
|
||||||
@ -109,7 +110,7 @@ pytest:
|
|||||||
path: coverage.xml
|
path: coverage.xml
|
||||||
|
|
||||||
config_test:
|
config_test:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- ophyd_test --config ./ophyd_devices/epics/db/ --output ./config_tests
|
- ophyd_test --config ./ophyd_devices/epics/db/ --output ./config_tests
|
||||||
artifacts:
|
artifacts:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user