Skip to content
Snippets Groups Projects
Commit 1bc683d5 authored by Tim Jaacks's avatar Tim Jaacks
Browse files

Move python scripts to subfolder

BCS 746-000808
parent e6980d48
No related branches found
No related tags found
1 merge request!160Move python scripts to subfolder
Pipeline #19885 waiting for manual action with stages
in 7 minutes and 19 seconds
Showing
with 25 additions and 22 deletions
......@@ -41,16 +41,19 @@ workflow:
pylint:
extends: .analyze
script:
- cd scripts
- pylint --rcfile=pylintrc *.py
black:
extends: .analyze
script:
- cd scripts
- black --diff --check *.py
executable:
extends: .analyze
script:
- cd scripts
- (! find ! -executable -name "*.py" -exec echo "not executable:"" {}" \; | grep .)
yamllint:
......@@ -111,7 +114,7 @@ yamllint:
MERGE: ""
script:
- cd ${CI_PROJECT_DIR}
- ./deploy_gitlab_ci.py
- scripts/deploy_gitlab_ci.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--manifest-project=${MANIFEST_PROJECT}
......
......@@ -79,7 +79,7 @@ integrate:
else
MERGE_REQUEST="${CI_OPEN_MERGE_REQUESTS%%,*}";
fi
- .gitlab-ci/integrate_into_manifest.py
- .gitlab-ci/scripts/integrate_into_manifest.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--manifest-project=${MANIFEST_PROJECT}
......@@ -103,7 +103,7 @@ merge:
- if: $CI_COMMIT_BRANCH == $MASTER_BRANCH_PROJECT
script:
- cd ${CI_PROJECT_DIR}
- .gitlab-ci/merge_into_manifest.py
- .gitlab-ci/scripts/merge_into_manifest.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--manifest-project=${MANIFEST_PROJECT}
......
......@@ -45,7 +45,7 @@ retrigger:
- if: $CI_COMMIT_REF_NAME == $MASTER_BRANCH_MANIFEST && $CI_PIPELINE_SOURCE != "api"
script:
- PROJECTS=$(
.gitlab-ci/get_manifest_projects.py
.gitlab-ci/scripts/get_manifest_projects.py
--manifest=default.xml
--remote=ci-test
)
......@@ -55,7 +55,7 @@ retrigger:
# Retrigger also project in SRCREV
- echo -e "Projects:\n${PROJECTS}"
- for PROJECT in ${PROJECTS}; do
.gitlab-ci/retrigger_mr_pipeline_jobs.py
.gitlab-ci/scripts/retrigger_mr_pipeline_jobs.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--project=${PROJECT}
......@@ -166,7 +166,7 @@ build:merge_request:
script:
- cd ${CI_PROJECT_DIR}
# Get pipeline for merge request
- MR_PIPELINE=$(.gitlab-ci/get_pipelines.py
- MR_PIPELINE=$(.gitlab-ci/scripts/get_pipelines.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--project=${CI_PROJECT_PATH}
......@@ -174,14 +174,14 @@ build:merge_request:
--ref=^${MASTER_BRANCH_MANIFEST} || true | head -1)
# If pipeline exists, mirror its result
- if [ ! -z "${MR_PIPELINE}" ]; then
.gitlab-ci/mirror_pipeline_result.py
.gitlab-ci/scripts/mirror_pipeline_result.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--project=${CI_PROJECT_PATH}
--pipeline=${MR_PIPELINE}
# If no pipeline found, trigger a new one on the master
- else
.gitlab-ci/trigger_pipeline.py
.gitlab-ci/scripts/trigger_pipeline.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--project=${CI_PROJECT_PATH}
......@@ -269,7 +269,7 @@ test:fail:
RELEASE="Yocto-dunfell-15.0/"
INSTALLSCRIPT_ABS="$DEPLOYPATH_TEST/$RELEASE/$CI_PARAM_MACHINE/fng-install.sh"
FNG_INSTALL_URL="${INSTALLSCRIPT_ABS#/*/}"
.gitlab-ci/submit_test.py \
.gitlab-ci/scripts/submit_test.py \
--fng-install "${FNG_INSTALL_URL}" \
--name \
"Gitlab build test ${CI_PARAM_MACHINE} ${RELEASE} ${CI_PIPELINE_ID}" \
......
......@@ -85,7 +85,7 @@ yamllint:
- if [ -n "${parent_merge_request}" ];then
PARENT_MR="--parent-merge-request=${parent_merge_request}";
fi
- .gitlab-ci/check_if_integration_branch_is_up_to_date.py
- .gitlab-ci/scripts/check_if_integration_branch_is_up_to_date.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--manifest-project=${MANIFEST_PROJECT}
......
......@@ -126,6 +126,6 @@ variables:
- |-
# Copy artifacts to local server for automated tests
echo "${LOGPREFIX} Copy files for automated tests using package_release"
.gitlab-ci/package_release.py \
.gitlab-ci/scripts/package_release.py \
--images-dir="${BUILDPATH}/${IMAGEPATH}" \
--outputdir-local="${DEPLOYPATH_TEST}"
......@@ -66,7 +66,7 @@ integrate:
else
MERGE_REQUEST="${CI_OPEN_MERGE_REQUESTS%%,*}";
fi
- .gitlab-ci/integrate_into_manifest.py
- .gitlab-ci/scripts/integrate_into_manifest.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--manifest-project=${MANIFEST_PROJECT}
......@@ -90,7 +90,7 @@ merge:
- if: $CI_COMMIT_BRANCH == $MASTER_BRANCH_PROJECT
script:
- cd ${CI_PROJECT_DIR}
- .gitlab-ci/merge_into_manifest.py
- .gitlab-ci/scripts/merge_into_manifest.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--manifest-project=${MANIFEST_PROJECT}
......
......@@ -56,7 +56,7 @@
echo "${LOGPREFIX} outdir=${outdir}"
# Check if the package_release script is available
script=".gitlab-ci/package_release.py"
script=".gitlab-ci/scripts/package_release.py"
# Change script path if ?
[ ! -x "${script}" ] && script=".repo/manifests/${script}"
if [ ! -x "${script}" ]; then
......@@ -93,7 +93,7 @@
# - a release tag is set
# - this is an image build and
# - the files were deployed to local network (drive Z)
apscript=".gitlab-ci/alphaplan_fwr.py"
apscript=".gitlab-ci/scripts/alphaplan_fwr.py"
echo "${LOGPREFIX} Check if AlphaPlan FWR articles need to be generated"
if [ -n "$CI_COMMIT_TAG" ] && [ -d "${ARTIFACTS_IMAGE_PATH}" ] && \
[[ "${CI_PARAM_PACKAGE_FTP}" == "false" ]];then
......
......@@ -54,7 +54,7 @@ retrigger:
- if: $CI_COMMIT_REF_NAME == $MASTER_BRANCH_MANIFEST && $CI_PIPELINE_SOURCE != "api"
script:
- PROJECTS=$(
.gitlab-ci/get_manifest_projects.py
.gitlab-ci/scripts/get_manifest_projects.py
--manifest=default.xml
--remote=seco-ne
--concat-namespaces
......@@ -65,7 +65,7 @@ retrigger:
# Retrigger also project in SRCREV
- echo -e "Projects:\n${PROJECTS}"
- for PROJECT in ${PROJECTS}; do
.gitlab-ci/retrigger_mr_pipeline_jobs.py
.gitlab-ci/scripts/retrigger_mr_pipeline_jobs.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--project=${PROJECT}
......@@ -83,7 +83,7 @@ changelog:
extends: .infrastructure
rules:
- if: $CI_COMMIT_REF_NAME != $MASTER_BRANCH_MANIFEST || $CI_PIPELINE_SOURCE == "api"
script: .gitlab-ci/changelog_generator.py
script: .gitlab-ci/scripts/changelog_generator.py
--token=${GITBOT_TOKEN}
--branch ${MASTER_BRANCH_MANIFEST}
> changelog.md
......@@ -138,7 +138,7 @@ build:merge_request:
script:
- cd ${CI_PROJECT_DIR}
# Get pipeline for merge request
- MR_PIPELINE=$(.gitlab-ci/get_pipelines.py
- MR_PIPELINE=$(.gitlab-ci/scripts/get_pipelines.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--project=${CI_PROJECT_PATH}
......@@ -146,14 +146,14 @@ build:merge_request:
--ref=^${MASTER_BRANCH_MANIFEST} || true | head -1)
# If pipeline exists, mirror its result
- if [ ! -z "${MR_PIPELINE}" ]; then
.gitlab-ci/mirror_pipeline_result.py
.gitlab-ci/scripts/mirror_pipeline_result.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--project=${CI_PROJECT_PATH}
--pipeline=${MR_PIPELINE}
# If no pipeline found, trigger a new one on the master
- else
.gitlab-ci/trigger_pipeline.py
.gitlab-ci/scripts/trigger_pipeline.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--project=${CI_PROJECT_PATH}
......@@ -210,7 +210,7 @@ build:merge_request:
RELEASE=$(ls ${DEPLOYPATH_TEST}/)
INSTALLSCRIPT_ABS="$DEPLOYPATH_TEST/$RELEASE/$CI_PARAM_MACHINE/fng-install.sh"
FNG_INSTALL_URL="${ARTIFACTS_HOST_URL}/${INSTALLSCRIPT_ABS#/*/}"
.gitlab-ci/submit_test.py \
.gitlab-ci/scripts/submit_test.py \
--fng-install "${FNG_INSTALL_URL}" \
--name \
"Gitlab build test ${CI_PARAM_MACHINE} ${RELEASE} ${CI_PIPELINE_ID}" \
......
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment