Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b57a4610
Commit
b57a4610
authored
Apr 14, 2021
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci: Use 'CI_DEFAULT_BRANCH' in 'scripts/' where possible
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
e20fd68c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
scripts/regenerate-schema
scripts/regenerate-schema
+1
-1
scripts/review_apps/review-apps.sh
scripts/review_apps/review-apps.sh
+1
-1
scripts/rspec_helpers.sh
scripts/rspec_helpers.sh
+2
-2
scripts/validate_migration_schema
scripts/validate_migration_schema
+1
-1
No files found.
scripts/regenerate-schema
View file @
b57a4610
...
...
@@ -194,7 +194,7 @@ class SchemaRegenerator
# Get source ref from CI environment variable, or read the +TARGET+
# environment+ variable, or default to +HEAD+.
def
target_branch
ENV
[
'CI_MERGE_REQUEST_TARGET_BRANCH_NAME'
]
||
ENV
[
'TARGET'
]
||
'master'
ENV
[
'CI_MERGE_REQUEST_TARGET_BRANCH_NAME'
]
||
ENV
[
'TARGET'
]
||
ENV
[
'CI_DEFAULT_BRANCH'
]
||
'master'
end
##
...
...
scripts/review_apps/review-apps.sh
View file @
b57a4610
...
...
@@ -310,7 +310,7 @@ function parse_gitaly_image_tag() {
function
deploy
()
{
local
namespace
=
"
${
KUBE_NAMESPACE
}
"
local
release
=
"
${
CI_ENVIRONMENT_SLUG
}
"
local
base_config_file_ref
=
"
master
"
local
base_config_file_ref
=
"
${
CI_DEFAULT_BRANCH
}
"
if
[[
"
$(
base_config_changed
)
"
==
"true"
]]
;
then
base_config_file_ref
=
"
${
CI_COMMIT_SHA
}
"
;
fi
local
base_config_file
=
"https://gitlab.com/gitlab-org/gitlab/raw/
${
base_config_file_ref
}
/scripts/review_apps/base-config.yaml"
...
...
scripts/rspec_helpers.sh
View file @
b57a4610
...
...
@@ -7,7 +7,7 @@ function retrieve_tests_metadata() {
local
test_metadata_job_id
# Ruby
test_metadata_job_id
=
$(
scripts/api/get_job_id.rb
--project
"
${
project_path
}
"
-q
"status=success"
-q
"ref=
master
"
-q
"username=gitlab-bot"
-Q
"scope=success"
--job-name
"update-tests-metadata"
)
test_metadata_job_id
=
$(
scripts/api/get_job_id.rb
--project
"
${
project_path
}
"
-q
"status=success"
-q
"ref=
${
CI_DEFAULT_BRANCH
}
"
-q
"username=gitlab-bot"
-Q
"scope=success"
--job-name
"update-tests-metadata"
)
if
[[
!
-f
"
${
KNAPSACK_RSPEC_SUITE_REPORT_PATH
}
"
]]
;
then
scripts/api/download_job_artifact.rb
--project
"
${
project_path
}
"
--job-id
"
${
test_metadata_job_id
}
"
--artifact-path
"
${
KNAPSACK_RSPEC_SUITE_REPORT_PATH
}
"
||
echo
"{}"
>
"
${
KNAPSACK_RSPEC_SUITE_REPORT_PATH
}
"
...
...
@@ -42,7 +42,7 @@ function retrieve_tests_mapping() {
local
project_path
=
"gitlab-org/gitlab"
local
test_metadata_with_mapping_job_id
test_metadata_with_mapping_job_id
=
$(
scripts/api/get_job_id.rb
--project
"
${
project_path
}
"
-q
"status=success"
-q
"ref=
master
"
-q
"username=gitlab-bot"
-Q
"scope=success"
--job-name
"update-tests-metadata"
--artifact-path
"
${
RSPEC_PACKED_TESTS_MAPPING_PATH
}
.gz"
)
test_metadata_with_mapping_job_id
=
$(
scripts/api/get_job_id.rb
--project
"
${
project_path
}
"
-q
"status=success"
-q
"ref=
${
CI_DEFAULT_BRANCH
}
"
-q
"username=gitlab-bot"
-Q
"scope=success"
--job-name
"update-tests-metadata"
--artifact-path
"
${
RSPEC_PACKED_TESTS_MAPPING_PATH
}
.gz"
)
if
[[
!
-f
"
${
RSPEC_PACKED_TESTS_MAPPING_PATH
}
"
]]
;
then
(
scripts/api/download_job_artifact.rb
--project
"
${
project_path
}
"
--job-id
"
${
test_metadata_with_mapping_job_id
}
"
--artifact-path
"
${
RSPEC_PACKED_TESTS_MAPPING_PATH
}
.gz"
&&
gzip
-d
"
${
RSPEC_PACKED_TESTS_MAPPING_PATH
}
.gz"
)
||
echo
"{}"
>
"
${
RSPEC_PACKED_TESTS_MAPPING_PATH
}
"
...
...
scripts/validate_migration_schema
View file @
b57a4610
...
...
@@ -72,7 +72,7 @@ class MigrationSchemaValidator
end
def
target_branch
ENV
[
'CI_MERGE_REQUEST_TARGET_BRANCH_NAME'
]
||
ENV
[
'TARGET'
]
||
'master'
ENV
[
'CI_MERGE_REQUEST_TARGET_BRANCH_NAME'
]
||
ENV
[
'TARGET'
]
||
ENV
[
'CI_DEFAULT_BRANCH'
]
||
'master'
end
def
source_ref
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment