Skip to content

Commit 7b2b58b

Browse files
balasankarcAndrew Patterson
authored andcommitted
Ensure nightly pipelines are correctly detected in Canonical
Signed-off-by: Balasankar 'Balu' C <[email protected]>
1 parent e108dc7 commit 7b2b58b

File tree

5 files changed

+16
-36
lines changed

5 files changed

+16
-36
lines changed

gitlab-ci-config/dev-gitlab-org.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -433,37 +433,6 @@ Raspberry-Pi-2-Bookworm-branch:
433433
image: "${BUILDER_IMAGE_REGISTRY}/rpi_12:${BUILDER_IMAGE_REVISION}"
434434
extends: .rpi_branch_template
435435

436-
# This job runs only on nightly EE builds
437-
RAT-Nightly:
438-
stage: slow_jobs
439-
image: "${BUILDER_IMAGE_REGISTRY}/ubuntu_22.04:${BUILDER_IMAGE_REVISION}"
440-
script:
441-
- bundle exec rake qa:rat:nightly
442-
cache: !reference [.branch-cache]
443-
needs:
444-
- Ubuntu-22.04-branch
445-
allow_failure: true
446-
rules:
447-
- !reference [.default_rules, rules]
448-
- if: '$PIPELINE_TYPE == "EE_NIGHTLY_BUILD_PIPELINE"'
449-
450-
# This job runs only on nightly EE builds
451-
RAT-Nightly-FIPS:
452-
stage: slow_jobs
453-
image: "${BUILDER_IMAGE_REGISTRY}/almalinux_8_fips:${BUILDER_IMAGE_REVISION}"
454-
variables:
455-
USE_SYSTEM_SSL: "true"
456-
RAT_REFERENCE_ARCHITECTURE: "omnibus-gitlab-mrs-fips"
457-
script:
458-
- bundle exec rake qa:rat:nightly
459-
cache: !reference [.branch-cache]
460-
needs:
461-
- AlmaLinux-8-fips-branch
462-
allow_failure: true
463-
rules:
464-
- !reference [.default_rules, rules]
465-
- if: '$PIPELINE_TYPE == "EE_NIGHTLY_BUILD_PIPELINE"'
466-
467436
############################
468437
# Release pipeline #
469438
############################

gitlab-ci-config/gitlab-com.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,8 @@ RAT:
666666
- if: '$PIPELINE_TYPE == "TRIGGERED_EE_PIPELINE"'
667667
when: manual
668668
allow_failure: true
669+
- if: '$PIPELINE_TYPE == "EE_NIGHTLY_BUILD_PIPELINE"'
670+
allow_failure: true
669671
needs:
670672
- job: Trigger:package
671673
artifacts: false

gitlab-ci-config/workflow-rules.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ workflow:
4343
- if: '$PIPELINE_TYPE == null && $CI_PROJECT_PATH == $CANONICAL_PROJECT_PATH && $CI_PIPELINE_SOURCE == "merge_request_event"'
4444
variables:
4545
PIPELINE_TYPE: GITLAB_MR_PIPELINE
46-
- if: '$PIPELINE_TYPE == null && $CI_PROJECT_PATH == $CANONICAL_PROJECT_PATH && $CI_COMMIT_REF_PROTECTED == "true"'
47-
variables:
48-
PIPELINE_TYPE: PROTECTED_TEST_PIPELINE
4946
- if: '$PIPELINE_TYPE == null && $NIGHTLY && $CI_COMMIT_BRANCH && ($ee == "true" || $GITLAB_VERSION =~ /-ee$/)'
5047
variables:
5148
PIPELINE_TYPE: EE_NIGHTLY_BUILD_PIPELINE
@@ -94,6 +91,9 @@ workflow:
9491
PIPELINE_TYPE: EE_TAG_BUILD_PIPELINE
9592
CACHE_EDITION: "EE"
9693
GITLAB_EDITION: "Enterprise Edition"
94+
- if: '$PIPELINE_TYPE == null && $CI_PROJECT_PATH == $CANONICAL_PROJECT_PATH && $CI_COMMIT_REF_PROTECTED == "true"'
95+
variables:
96+
PIPELINE_TYPE: PROTECTED_TEST_PIPELINE
9797
- if: '$PIPELINE_TYPE == null && $CI_PROJECT_PATH == $SECURITY_PROJECT_PATH && $CI_PIPELINE_SOURCE == "merge_request_event"'
9898
variables:
9999
PIPELINE_TYPE: GITLAB_MR_PIPELINE

lib/gitlab/build/facts.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,17 @@ def get_component_shas(version_manifest_file = 'version-manifest.json')
3030
softwares = version_manifest['software']
3131
results = {}
3232
Gitlab::Version::COMPONENTS_ENV_VARS.keys.map do |component|
33-
next unless softwares.key?(component)
33+
# For both `gitlab-rails` and `gitlab-rails-ee`, the key in
34+
# version-manifest.json is `gitlab-rails`
35+
version_manifest_key = if component == 'gitlab-rails' || component == 'gitlab-rails-ee'
36+
'gitlab-rails'
37+
else
38+
component
39+
end
3440

35-
results[component] = softwares[component]['locked_version']
41+
next unless softwares.key?(version_manifest_key)
42+
43+
results[component] = softwares[version_manifest_key]['locked_version']
3644
end
3745

3846
results

spec/lib/gitlab/build/facts_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
let(:component_shas) do
7070
{
7171
'gitlab-rails' => '6f286d7717f419489a08a9918621f438256e397b',
72+
'gitlab-rails-ee' => '6f286d7717f419489a08a9918621f438256e397b',
7273
'gitaly' => 'b55578ec476e8bc8ecd9775ee7e9960b52e0f6e0',
7374
'gitlab-shell' => '264d63e81cbf08e3ae75e84433b8d09af15f351f',
7475
'gitlab-pages' => 'b0cb1f0c0783db2f5176301e6528fe41e1b42abf',

0 commit comments

Comments
 (0)