Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-16 06:11:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-16 06:11:39 +0300
commit37d1a6b416a10e64ba9194aacf7da97a5e30140f (patch)
tree54494e4ddcc6e128e2a0e11dc874cced46308918 /spec/scripts
parent21fc10ad5a7c829e64112fac37727f31f072ef33 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/scripts')
-rw-r--r--spec/scripts/trigger-build_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/scripts/trigger-build_spec.rb b/spec/scripts/trigger-build_spec.rb
index ebf05167428..9032ba85b9f 100644
--- a/spec/scripts/trigger-build_spec.rb
+++ b/spec/scripts/trigger-build_spec.rb
@@ -319,6 +319,28 @@ RSpec.describe Trigger do
end
end
+ describe "GITLAB_ASSETS_TAG" do
+ context 'when CI_COMMIT_TAG is set' do
+ before do
+ stub_env('CI_COMMIT_TAG', 'v1.0')
+ end
+
+ it 'sets GITLAB_ASSETS_TAG to CI_COMMIT_REF_NAME' do
+ expect(subject.variables['GITLAB_ASSETS_TAG']).to eq(env['CI_COMMIT_REF_NAME'])
+ end
+ end
+
+ context 'when CI_COMMIT_TAG is nil' do
+ before do
+ stub_env('CI_COMMIT_TAG', nil)
+ end
+
+ it 'sets GITLAB_ASSETS_TAG to CI_COMMIT_SHA' do
+ expect(subject.variables['GITLAB_ASSETS_TAG']).to eq(env['CI_COMMIT_SHA'])
+ end
+ end
+ end
+
describe "CE_PIPELINE" do
context 'when Trigger.ee? is true' do
before do