From 0beb850194f446c01c5c4a9cfdb05f5d35348a90 Mon Sep 17 00:00:00 2001 From: Mahmoud Elsabbagh Date: Wed, 15 Jan 2025 13:39:38 +0000 Subject: [PATCH] CI: Add docker tag variable. Change SCP CI script to allow user to specify the docker tag if they would like to run with different docker image. Signed-off-by: Mahmoud Elsabbagh --- .gitlab/.gitlab-ci.yml | 4 ++++ .gitlab/templates/beetle-security-test.yml | 4 ++-- .gitlab/templates/blackduck_scanner.yml | 4 ++-- .gitlab/templates/build-test.yml | 6 +++--- .gitlab/templates/linting.yml | 10 +++++----- .gitlab/templates/merge-report.yml | 4 ++-- .gitlab/templates/platform-test.yml | 4 ++-- .gitlab/templates/scmi-test.yml | 4 ++-- .gitlab/templates/setup-workspace.yml | 4 ++-- .gitlab/templates/static-analysis.yml | 4 ++-- .gitlab/templates/status-report.yml | 4 ++-- .gitlab/templates/test-count.yml | 4 ++-- .gitlab/templates/unit-test.yml | 4 ++-- 13 files changed, 32 insertions(+), 28 deletions(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 06716703a..7b039668a 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -24,6 +24,10 @@ variables: FETCH_PUBLIC_MR_NUMBER: description: "MR number to fetch" + DOCKER_IMAGE_TAG: + description: "Docker Tag to use for this pipeline" + value: "latest" + default: tags: - arm64 diff --git a/.gitlab/templates/beetle-security-test.yml b/.gitlab/templates/beetle-security-test.yml index e76932048..cf1b5b6cc 100644 --- a/.gitlab/templates/beetle-security-test.yml +++ b/.gitlab/templates/beetle-security-test.yml @@ -1,12 +1,12 @@ # # Arm SCP/MCP Software -# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # .beetle-security-test: - image: ${CI_REGISTRY_IMAGE}/scp-tester-amd64 + image: ${CI_REGISTRY_IMAGE}/scp-tester-amd64:${DOCKER_IMAGE_TAG} tags: - amd64 variables: diff --git a/.gitlab/templates/blackduck_scanner.yml b/.gitlab/templates/blackduck_scanner.yml index f4ec1a65e..aead7d423 100644 --- a/.gitlab/templates/blackduck_scanner.yml +++ b/.gitlab/templates/blackduck_scanner.yml @@ -1,12 +1,12 @@ # # Arm SCP/MCP Software -# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # .blackduck-scan: - image: ${CI_REGISTRY_IMAGE}/blackduck-scanner-amd64 + image: ${CI_REGISTRY_IMAGE}/blackduck-scanner-amd64:${DOCKER_IMAGE_TAG} tags: - amd64 variables: diff --git a/.gitlab/templates/build-test.yml b/.gitlab/templates/build-test.yml index 2b7e54e9f..5c27a591a 100644 --- a/.gitlab/templates/build-test.yml +++ b/.gitlab/templates/build-test.yml @@ -1,12 +1,12 @@ # # Arm SCP/MCP Software -# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # .build-products: - image: ${CI_REGISTRY_IMAGE}/ci-base:latest + image: ${CI_REGISTRY_IMAGE}/ci-base:${DOCKER_IMAGE_TAG} variables: GIT_SUBMODULE_STRATEGY: recursive GIT_DEPTH: 1 @@ -51,7 +51,7 @@ [DEBUG, INFO, WARN, ERROR, CRIT, DISABLED] .build-optee: - image: ${CI_REGISTRY_IMAGE}/optee-build:latest + image: ${CI_REGISTRY_IMAGE}/optee-build:${DOCKER_IMAGE_TAG} variables: GIT_SUBMODULE_STRATEGY: recursive GIT_DEPTH: 1 diff --git a/.gitlab/templates/linting.yml b/.gitlab/templates/linting.yml index b154fc04d..e7d8f97da 100644 --- a/.gitlab/templates/linting.yml +++ b/.gitlab/templates/linting.yml @@ -1,12 +1,12 @@ # # Arm SCP/MCP Software -# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # .check-lint: - image: ${CI_REGISTRY_IMAGE}/ci-base:latest + image: ${CI_REGISTRY_IMAGE}/ci-base:${DOCKER_IMAGE_TAG} script: - python3 tools/${CHECK_SCRIPT}.py parallel: @@ -18,12 +18,12 @@ - check_tabs .check-copyright: - image: ${CI_REGISTRY_IMAGE}/ci-base:latest + image: ${CI_REGISTRY_IMAGE}/ci-base:${DOCKER_IMAGE_TAG} script: - python3 tools/check_copyright.py -c "${CI_MERGE_REQUEST_DIFF_BASE_SHA}" .check-style: - image: ${CI_REGISTRY_IMAGE}/ci-base:latest + image: ${CI_REGISTRY_IMAGE}/ci-base:${DOCKER_IMAGE_TAG} script: - python3 tools/check_style.py -c "${CI_MERGE_REQUEST_DIFF_BASE_SHA}" artifacts: @@ -33,7 +33,7 @@ - code-style.patch .check-for-merge-commits: - image: ${CI_REGISTRY_IMAGE}/ci-base:latest + image: ${CI_REGISTRY_IMAGE}/ci-base:${DOCKER_IMAGE_TAG} script: - | merge_count=$(git log --merges --oneline \ diff --git a/.gitlab/templates/merge-report.yml b/.gitlab/templates/merge-report.yml index 66e21eec9..88d8bba1e 100644 --- a/.gitlab/templates/merge-report.yml +++ b/.gitlab/templates/merge-report.yml @@ -1,12 +1,12 @@ # # Arm SCP/MCP Software -# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # .merge-report: - image: ${CI_REGISTRY_IMAGE}/ci-base:latest + image: ${CI_REGISTRY_IMAGE}/ci-base:${DOCKER_IMAGE_TAG} before_script: - rm -rf artifacts/coverage_reports/merge_report - mkdir -p artifacts/coverage_reports/merge_report diff --git a/.gitlab/templates/platform-test.yml b/.gitlab/templates/platform-test.yml index 11bce63ee..7f984a8d2 100644 --- a/.gitlab/templates/platform-test.yml +++ b/.gitlab/templates/platform-test.yml @@ -1,12 +1,12 @@ # # Arm SCP/MCP Software -# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # .platform-test: - image: ${CI_REGISTRY_IMAGE}/plat-test-amd64 + image: ${CI_REGISTRY_IMAGE}/plat-test-amd64:${DOCKER_IMAGE_TAG} tags: - amd64 variables: diff --git a/.gitlab/templates/scmi-test.yml b/.gitlab/templates/scmi-test.yml index 783fc36d2..01bc23728 100644 --- a/.gitlab/templates/scmi-test.yml +++ b/.gitlab/templates/scmi-test.yml @@ -1,12 +1,12 @@ # # Arm SCP/MCP Software -# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # .scmi-test: - image: ${CI_REGISTRY_IMAGE}/scp-tester-amd64 + image: ${CI_REGISTRY_IMAGE}/scp-tester-amd64:${DOCKER_IMAGE_TAG} tags: - amd64 variables: diff --git a/.gitlab/templates/setup-workspace.yml b/.gitlab/templates/setup-workspace.yml index 146ba07c3..9e3b08b59 100644 --- a/.gitlab/templates/setup-workspace.yml +++ b/.gitlab/templates/setup-workspace.yml @@ -1,13 +1,13 @@ # # Arm SCP/MCP Software -# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # .pull-mr: - image: ${CI_REGISTRY_IMAGE}/ci-base:latest + image: ${CI_REGISTRY_IMAGE}/ci-base:${DOCKER_IMAGE_TAG} variables: GIT_STRATEGY: clone GIT_CHECKOUT: "false" diff --git a/.gitlab/templates/static-analysis.yml b/.gitlab/templates/static-analysis.yml index 48f18aa6b..3e4316456 100644 --- a/.gitlab/templates/static-analysis.yml +++ b/.gitlab/templates/static-analysis.yml @@ -1,11 +1,11 @@ # # Arm SCP/MCP Software -# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # .banned-api: - image: ${CI_REGISTRY_IMAGE}/ci-base:latest + image: ${CI_REGISTRY_IMAGE}/ci-base:${DOCKER_IMAGE_TAG} script: - python3 tools/check_api.py diff --git a/.gitlab/templates/status-report.yml b/.gitlab/templates/status-report.yml index 09ca24803..7c994f8f7 100644 --- a/.gitlab/templates/status-report.yml +++ b/.gitlab/templates/status-report.yml @@ -1,12 +1,12 @@ # # Arm SCP/MCP Software -# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # .report-status: - image: ${CI_REGISTRY_IMAGE}/ci-base:latest + image: ${CI_REGISTRY_IMAGE}/ci-base:${DOCKER_IMAGE_TAG} script: - | curl --fail --location --request POST \ diff --git a/.gitlab/templates/test-count.yml b/.gitlab/templates/test-count.yml index 1804837f5..4deef9348 100644 --- a/.gitlab/templates/test-count.yml +++ b/.gitlab/templates/test-count.yml @@ -1,12 +1,12 @@ # # Arm SCP/MCP Software -# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # .test-count: - image: ${CI_REGISTRY_IMAGE}/ci-base + image: ${CI_REGISTRY_IMAGE}/ci-base:${DOCKER_IMAGE_TAG} script: - | - /test_count_entrypoint.sh " diff --git a/.gitlab/templates/unit-test.yml b/.gitlab/templates/unit-test.yml index 0899eacf9..0e7066d10 100644 --- a/.gitlab/templates/unit-test.yml +++ b/.gitlab/templates/unit-test.yml @@ -1,12 +1,12 @@ # # Arm SCP/MCP Software -# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # .check-ut: - image: ${CI_REGISTRY_IMAGE}/ci-base:latest + image: ${CI_REGISTRY_IMAGE}/ci-base:${DOCKER_IMAGE_TAG} variables: GIT_SUBMODULE_STRATEGY: recursive GIT_DEPTH: 1 -- GitLab