diff --git a/build-pipeline-yocto.yml.jinja2 b/build-pipeline-yocto.yml.jinja2 index d16786b0df41a06413f75866f0a54c5035dbb9a6..0cd50b4a3e079327fb92fc21242df2cbf65e6708 100644 --- a/build-pipeline-yocto.yml.jinja2 +++ b/build-pipeline-yocto.yml.jinja2 @@ -48,15 +48,20 @@ build-documentation: extends: .build_documentation rules: - if: $DOCUMENTATION_FILES +{% if CI_COMMIT_TAG is defined %} variables: FILES: ${DOCUMENTATION_FILES} + MANUAL_BUILD: "false" +{% else %} + variables: + FILES: ${DOCUMENTATION_FILES} +{% endif %} needs: - job: changelog {% for machine in MACHINES.split(' ') %} {% if SIMULATE_BUILD is not defined or SIMULATE_BUILD != "true" %} - build-{{ machine }}: extends: .build_yocto variables: @@ -266,6 +271,8 @@ deploy-{{ machine }}: rules: &deploy_ftp_rules - if: $DEPLOY_FTP_TARGET !~ /^./ when: never + - if: $SKIP_FTP_STAGE == "true" + when: never - when: manual allow_failure: true variables: @@ -317,8 +324,15 @@ ftp-{{ machine }}: # See for reference: https://gitlab.com/gitlab-org/gitlab/-/issues/321371 - if: $AZURE_CONTAINER_NAME !~ /^./ || $AZURE_TARGET_FOLDER !~ /^./ when: never + - if: $SKIP_AZURE_STAGE == "true" + when: never +{% if CI_COMMIT_TAG is defined %} + - when: on_success + allow_failure: true +{% else %} - when: manual allow_failure: true +{% endif %} variables: DEPLOY_SOURCE: ${RELEASE_NAME} DEPLOY_TARGET: ${AZURE_TARGET_FOLDER}/${RELEASE_NAME} @@ -333,6 +347,7 @@ azure-documentation: variables: ASSOCIATED_PACKAGE_JOB: package-documentation needs: + - job: deploy-documentation - job: package-documentation artifacts: false - job: build-version @@ -347,6 +362,7 @@ azure-{{ machine }}: needs: - job: package-{{ machine }} artifacts: false + - job: deploy-{{ machine }} - job: build-version {% endfor %} @@ -365,7 +381,7 @@ generate-firmware-package-{{ machine }}: rules: - if: $DEPLOY_RELEASE_TARGET !~ /^./ when: never - - when: manual + - when: on_success allow_failure: true {% else %} rules: @@ -389,9 +405,15 @@ deploy-firmware-package-{{ machine }}: stage: Firmware Package variables: ASSOCIATED_PACKAGE_JOB: generate-firmware-package-{{ machine }} +{% if CI_COMMIT_TAG is defined %} + rules: + - when: on_success + allow_failure: true +{% endif %} needs: - job: generate-firmware-package-{{ machine }} artifacts: false + - deploy-{{ machine }} - job: build-version {% endfor %} @@ -405,6 +427,8 @@ deploy-firmware-package-{{ machine }}: .confluence-rules: rules: + - if: $SKIP_CONFLUENCE_STAGE == "true" + when: never - if: $CONFLUENCE_PARENT_ID =~ /^./ && $CONFLUENCE_SPACE =~ /^./ when: manual allow_failure: true diff --git a/build-pipeline.yml b/build-pipeline.yml index 75823cae373067c0cfd457bf655ae3051bbb31be..145cdc3faf2e7bf7db5610421e67a63e4b30bd50 100644 --- a/build-pipeline.yml +++ b/build-pipeline.yml @@ -262,6 +262,9 @@ workflow: - if: $MANUAL_BUILD == "true" when: manual allow_failure: true + - if: $DELAY_BUILD == "true" + when: delayed + start_in: 20 minutes - when: always artifacts: expire_in: 1 week @@ -353,9 +356,11 @@ workflow: - .infrastructure timeout: 1h rules: - - if: $TEST_STAGE == "true" + - if: $TEST_STAGE == "manual" when: manual allow_failure: true + - if: $TEST_STAGE == "auto" + allow_failure: true dependencies: [] variables: # TODO checkout only gitlab-ci repo to allow running on deleted branches diff --git a/docs/manifest-pipeline.md b/docs/manifest-pipeline.md index c774dc72b6765308b525cd79353f7b760e72ab1c..e9051bf7f1e8a5d12c013824aa436724fc6d3fe5 100644 --- a/docs/manifest-pipeline.md +++ b/docs/manifest-pipeline.md @@ -88,7 +88,7 @@ pipelines by overriding these variables in the trigger job: * `PACKAGE_TYPE` Type of packaging (supported values: `image`, `sdk`) * `TEST_STAGE` - Boolean value to set whether to include the Test stage + Set whether to include the Test stage (supported values: `manual`, `auto`) * `CONFLUENCE_SPACE` Confluence Space to publish the release overview in * `CONFLUENCE_PARENT_ID` @@ -109,6 +109,12 @@ pipelines by overriding these variables in the trigger job: Name of the Azure blob container to deploy the images to * `AZURE_TARGET_FOLDER` Name of the Azure folder to deploy the images to +* `SKIP_FTP_STAGE` + Do not run FTP stage in build pipeline +* `SKIP_AZURE_STAGE` + Do not run AZURE stage in build pipeline +* `SKIP_CONFLUENCE_STAGE` + Do not run CONFLUENCE stage in build pipeline **Example:** diff --git a/manifest-pipeline-ci-test.yml b/manifest-pipeline-ci-test.yml index 3070fd9cb369326f6496b64ea9e18aef8fba0d45..7ac91b48761c82f34bdd771d45d954a1929ee50b 100644 --- a/manifest-pipeline-ci-test.yml +++ b/manifest-pipeline-ci-test.yml @@ -74,7 +74,7 @@ yocto-simulation-pipeline: ARTIFACTS_PATH: build-*/tmp/deploy/images/**/* DOCUMENTATION_FILES: "*.md" PACKAGE_TYPE: image - TEST_STAGE: "true" + TEST_STAGE: "manual" TEST_REPO_BRANCH: dunfell CONFLUENCE_SPACE: RnD CONFLUENCE_PARENT_ID: 1615560743 diff --git a/manifest-pipeline-yocto.yml b/manifest-pipeline-yocto.yml index aba0515996d5420a60e13404274da5994767ec08..9ef8d69c26b7e456229176107dca2054e7531c6b 100644 --- a/manifest-pipeline-yocto.yml +++ b/manifest-pipeline-yocto.yml @@ -67,7 +67,11 @@ yocto-pipeline: ARTIFACTS_PATH: build-*/tmp/deploy/images/**/* DOCUMENTATION_FILES: "*.md" PACKAGE_TYPE: image - TEST_STAGE: "true" + TEST_STAGE: "manual" + rules: + - if: '$CI_COMMIT_TAG' + variables: + TEST_STAGE: "auto" sdk-pipeline: extends: @@ -80,6 +84,11 @@ sdk-pipeline: ARTIFACTS_PATH: build-*/tmp/deploy/sdk/* MANUAL_BUILD: "true" PACKAGE_TYPE: sdk + rules: + - if: '$CI_COMMIT_TAG' + variables: + MANUAL_BUILD: "false" + DELAY_BUILD: "true" fngsystem-pipeline: extends: