diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1589bff50700aa7aff68dd062523b9379cb4802f..0c3faa91639dc897fd1936e89deaa579de9a14b5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,18 +36,18 @@ variables: # include jobs include: - project: $PIPELINE_TEMPLATE_PROJECT - ref: v0.0.4 + ref: v0.0.7 file: - gitlab-ci/common_gitlab-ci.yml - gitlab-ci/docker-image-base_gitlab-ci.yml - gitlab-ci/danger-review_gitlab-ci.yml - gitlab-ci/changelog_gitlab-ci.yml - gitlab-ci/auto-release_gitlab-ci.yml + - gitlab-ci/static-analysis_gitlab-ci.yml - local: '.gitlab/ci/rules.yml' - local: '.gitlab/ci/docker-image-builds.yml' - local: '.gitlab/ci/trigger-image-builds.yml' - local: '.gitlab/ci/docs-build.yml' - - local: '.gitlab/ci/static-analysis.yml' - local: '.gitlab/ci/yocto-qa.yml' - local: '.gitlab/ci/qa-checks.yml' diff --git a/.gitlab/ci/lava-test.yml b/.gitlab/ci/lava-test.yml index ca6903d28b4d5196401bbeaace1f0b55d0b25ed0..cd574be043d381196aefb19d385b6e2151f74f0d 100644 --- a/.gitlab/ci/lava-test.yml +++ b/.gitlab/ci/lava-test.yml @@ -9,6 +9,8 @@ variables: DOCKER_IMAGE_NAME: lava-test-image KUBERNETES_EPHEMERAL_STORAGE_REQUEST: 5Gi + rules: + - if: $LAVA_URL script: - mkdir cassini-firmware - pushd cassini-firmware @@ -47,7 +49,6 @@ dotenv: build_data.env expire_in: '1 days' - .submit-cassini-lava-job: extends: .submit-lava-job variables: @@ -63,8 +64,6 @@ private_token=${CASSINI_CI_LAYERS_TOKEN} FLASH_ARTIFACT: ${FW_IMAGE_ARTIFACT_URL}? LAVA_JOB_TEMPLATE: .gitlab/lava/$MACHINE/$LAVA_JOB.j2 - rules: - - if: '$LAVA_URL != ""' .ptest-tests: extends: .submit-cassini-lava-job diff --git a/.gitlab/ci/qa-checks.yml b/.gitlab/ci/qa-checks.yml index dfd4b8161825e2ee8040ef85213c1a4792b34ad9..3ee4c8adce860b713272210c2850f3db97471c69 100644 --- a/.gitlab/ci/qa-checks.yml +++ b/.gitlab/ci/qa-checks.yml @@ -12,7 +12,9 @@ before_script: - mkdir -p ~/.ssh - eval "$(ssh-agent -s)" - - echo "${SSH_PRIVATE_GITLAB}" | tr -d '\r' | ssh-add - > /dev/null + - if [ -z "${SSH_PRIVATE_GITLAB}+x" ]; then + echo "${SSH_PRIVATE_GITLAB}" | tr -d '\r' | ssh-add - > /dev/null; + fi - ssh-keyscan -t rsa ${CI_SERVER_HOST} >> ~/.ssh/known_hosts # Ensure git is usable without prompts - git config --global url.ssh://git@${CI_SERVER_HOST}.insteadOf diff --git a/.gitlab/ci/static-analysis.yml b/.gitlab/ci/static-analysis.yml deleted file mode 100644 index e0975e3c7ca47084f190b80555cd14cebfc73a5b..0000000000000000000000000000000000000000 --- a/.gitlab/ci/static-analysis.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (c) 2022 Arm Limited or its affiliates. All rights reserved. -# -# SPDX-License-Identifier: MIT ---- -include: - - template: Security/SAST.gitlab-ci.yml - - template: Code-Quality.gitlab-ci.yml - -# Setup Security analyser -sast: - stage: Build - tags: - - x86_64 - -# Setup Code Quality Framework -code_quality: - stage: Build - tags: - - cq-sans-dind # Set this job to only run on our new specialized runner - services: # Shut off Docker-in-Docker - variables: - CODECLIMATE_PREFIX: "${MIRROR_DOCKER}/" - CODECLIMATE_DEV: --dev - CODECLIMATE_DEBUG: 1 - before_script: - - docker login - -u ${CI_REGISTRY_USER} - -p ${CI_REGISTRY_PASSWORD} - ${CI_REGISTRY} - - cc_plugins="${CI_REGISTRY}/${GITLAB_CODE_QUALITY_PLUGINS}/codeclimate" - - docker pull - --quiet - ${cc_plugins}/codeclimate-rustfmt:latest - - docker pull - --quiet - ${cc_plugins}/codeclimate-rust-clippy:latest - rules: - - if: '$CODE_QUALITY_DISABLED' - when: never - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - - if: '$CI_COMMIT_BRANCH' - - if: '$CI_COMMIT_TAG' - artifacts: - paths: [gl-code-quality-report.json] - -# Extra job to generate a html version of the report for easy viewing outside -# of merge requests -code_quality_html: - extends: code_quality - variables: - REPORT_FORMAT: html - artifacts: - expose_as: 'Code Quality Report' - paths: [gl-code-quality-report.html] - reports: - codequality: null diff --git a/.gitlab/ci/trigger-image-builds.yml b/.gitlab/ci/trigger-image-builds.yml index 9e828f0e5906994c08eb95be79f0f87e1c23c7cb..3e082006c1d8653170327f011fcea70343d7b89d 100644 --- a/.gitlab/ci/trigger-image-builds.yml +++ b/.gitlab/ci/trigger-image-builds.yml @@ -33,7 +33,7 @@ merge_jobs: cat << EOF > ${CI_JOB_FILE} include: - project: $PIPELINE_TEMPLATE_PROJECT - ref: v0.0.4 + ref: v0.0.7 file: - gitlab-ci/common_gitlab-ci.yml - gitlab-ci/lava-test-base_gitlab-ci.yml diff --git a/.gitlab/ci/yocto-build.yml b/.gitlab/ci/yocto-build.yml index c07077bfdbcdbdc48de79a60828cb7047a8b7c5a..a3459a50ffdf4bc44bd440c4721188f73507617a 100644 --- a/.gitlab/ci/yocto-build.yml +++ b/.gitlab/ci/yocto-build.yml @@ -17,7 +17,9 @@ before_script: - mkdir -p ~/.ssh - eval "$(ssh-agent -s)" - - echo "${SSH_PRIVATE_GITLAB}" | tr -d '\r' | ssh-add - > /dev/null + - if [ -z "${SSH_PRIVATE_GITLAB}+x" ]; then + echo "${SSH_PRIVATE_GITLAB}" | tr -d '\r' | ssh-add - > /dev/null; + fi - ssh-keyscan -t rsa ${CI_SERVER_HOST} >> ~/.ssh/known_hosts # Ensure git is usable without prompts - git config --global url.ssh://git@${CI_SERVER_HOST}.insteadOf diff --git a/.gitlab/ci/yocto-qa.yml b/.gitlab/ci/yocto-qa.yml index 2c6b1b87d90570bb2e61f8f526a00fcaff3ced6a..ce8857e466e59adac4bf4544d04e542c34c7322e 100644 --- a/.gitlab/ci/yocto-qa.yml +++ b/.gitlab/ci/yocto-qa.yml @@ -24,7 +24,9 @@ check-layers: fi - mkdir -p ~/.ssh - eval "$(ssh-agent -s)" - - echo "${SSH_PRIVATE_GITLAB}" | tr -d '\r' | ssh-add - > /dev/null + - if [ -z "${SSH_PRIVATE_GITLAB}+x" ]; then + echo "${SSH_PRIVATE_GITLAB}" | tr -d '\r' | ssh-add - > /dev/null; + fi - ssh-keyscan -t rsa ${CI_SERVER_HOST} >> ~/.ssh/known_hosts # Ensure git is usable without prompts - git config --global url.ssh://git@${CI_SERVER_HOST}.insteadOf