Skip to content
Snippets Groups Projects
Commit 1a58de7e authored by Albert Salim's avatar Albert Salim
Browse files

Pass through TOP_UPSTREAM_SOURCE_REF in QATrigger

parent 322b539d
No related branches found
No related tags found
No related merge requests found
......@@ -135,8 +135,8 @@
- '/gitlab-ci-config/gitlab-com.yml'
- '/gitlab-ci-config/dev-gitlab-org.yml'
notify:slack-fail:
.notify:
before_script:
- apk update && apk add git curl bash
image: "alpine"
stage: notification_fail
......@@ -139,7 +139,11 @@
before_script:
- apk update && apk add git curl bash
image: "alpine"
stage: notification_fail
notify:slack-fail:
extends:
- .notify
script:
- ./support/notify_slack.sh "#g_distribution" "Build on \`$CI_COMMIT_REF_NAME\` failed! See <https://dev.gitlab.org/gitlab/omnibus-gitlab/pipelines/"$CI_PIPELINE_ID">"
when: on_failure
......@@ -151,3 +155,15 @@
tags:
- promotion
dependencies: []
notify:slack-fail:scheduled-master:
extends:
- .notify
script:
- ./support/notify_slack.sh "#qa-master" "☠️ Scheduled omnibus-build against master failed! ☠️ See $CI_PIPELINE_URL (triggered from $TOP_UPSTREAM_SOURCE_JOB)"
only:
refs:
- pipelines@gitlab-org/build/omnibus-gitlab-mirror
variables:
- $TOP_UPSTREAM_SOURCE_JOB && $TOP_UPSTREAM_SOURCE_REF == 'master'
when: on_failure
......@@ -20,7 +20,8 @@
"variables[TRIGGER_SOURCE]" => Gitlab::Util.get_env('CI_JOB_URL'),
"variables[TOP_UPSTREAM_SOURCE_PROJECT]" => Gitlab::Util.get_env('TOP_UPSTREAM_SOURCE_PROJECT'),
"variables[TOP_UPSTREAM_SOURCE_JOB]" => Gitlab::Util.get_env('TOP_UPSTREAM_SOURCE_JOB'),
"variables[TOP_UPSTREAM_SOURCE_SHA]" => Gitlab::Util.get_env('TOP_UPSTREAM_SOURCE_SHA')
"variables[TOP_UPSTREAM_SOURCE_SHA]" => Gitlab::Util.get_env('TOP_UPSTREAM_SOURCE_SHA'),
'variables[TOP_UPSTREAM_SOURCE_REF]' => Gitlab::Util.get_env('TOP_UPSTREAM_SOURCE_REF')
}
end
......
......@@ -126,6 +126,7 @@
allow(ENV).to receive(:[]).with('TOP_UPSTREAM_SOURCE_PROJECT').and_return("https://gitlab.com/gitlab-org/gitlab-foss")
allow(ENV).to receive(:[]).with('TOP_UPSTREAM_SOURCE_JOB').and_return("https://gitlab.com/gitlab-org/gitlab-foss/-/jobs/67890")
allow(ENV).to receive(:[]).with('TOP_UPSTREAM_SOURCE_SHA').and_return("abc123")
allow(ENV).to receive(:[]).with('TOP_UPSTREAM_SOURCE_REF').and_return("master")
allow(DockerOperations).to receive(:build).and_return(true)
allow(Build::QA).to receive(:get_gitlab_repo).and_return("/tmp/gitlab.1234/qa")
allow(Build::GitlabImage).to receive(:gitlab_registry_image_address).and_return("registry.gitlab.com/gitlab-ce:latest")
......@@ -145,7 +146,8 @@
"variables[TRIGGER_SOURCE]" => "https://gitlab.com/gitlab-org/omnibus-gitlab/-/jobs/12345",
"variables[TOP_UPSTREAM_SOURCE_PROJECT]" => "https://gitlab.com/gitlab-org/gitlab-foss",
"variables[TOP_UPSTREAM_SOURCE_JOB]" => "https://gitlab.com/gitlab-org/gitlab-foss/-/jobs/67890",
"variables[TOP_UPSTREAM_SOURCE_SHA]" => "abc123"
"variables[TOP_UPSTREAM_SOURCE_SHA]" => "abc123",
"variables[TOP_UPSTREAM_SOURCE_REF]" => "master"
}
allow_any_instance_of(Build::QATrigger).to receive(:invoke!).and_call_original
allow_any_instance_of(Build::QATrigger).to receive(:get_projct_path).and_return("gitlab-org/gitlab-qa")
......
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