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