Skip to content

Commit e92b52a

Browse files
Merge pull request #1261 from jkopriva/RHTAP-5387
RHTAP-5387 Change authProvider when using GitLab
2 parents 21f9aa1 + 6b750ad commit e92b52a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

integration-tests/scripts/.ci-env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export GITHUB__APP__WEBHOOK__SECRET=
1414
#### Gitlab
1515
# https://docs.redhat.com/en/documentation/red_hat_trusted_application_pipeline/1.2/html-single/installing_red_hat_trusted_application_pipeline/index#optional_integrating_gitlab
1616
export GITLAB__TOKEN=
17-
# When using gitlab as auth provider(auth_config="github"), you also need to set the following values
17+
# When using gitlab as auth provider(auth_config="gitlab"), you also need to set the following values
1818
export GITLAB__APP__ID=
1919
export GITLAB__APP_SECRET=
2020
export GITLAB__GROUP=

integration-tests/scripts/.env.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export GITHUB__APP__WEBHOOK__SECRET=
2020
#### Gitlab
2121
# https://docs.redhat.com/en/documentation/red_hat_trusted_application_pipeline/1.2/html-single/installing_red_hat_trusted_application_pipeline/index#optional_integrating_gitlab
2222
export GITLAB__TOKEN=
23-
# When using gitlab as auth provider(auth_config="github"), you also need to set the following values
23+
# When using gitlab as auth provider(auth_config="gitlab"), you also need to set the following values
2424
export GITLAB__APP__ID=
2525
export GITLAB__APP_SECRET=
2626
export GITLAB__GROUP=

integration-tests/scripts/install.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ update_dh_catalog_url() {
7878
fi
7979
}
8080

81+
update_dh_auth_config() {
82+
# if SCM is set to Gielab, update auth config, otherwise keep it to default - github
83+
if [[ " ${scm_config[*]} " =~ " gitlab " ]]; then
84+
echo "[INFO] Change Developer Hub auth to gitlab"
85+
yq -i '.tssc.products[] |= select(.name == "Developer Hub").properties.authProvider = "gitlab"' "${config_file}"
86+
fi
87+
}
88+
8189
# Workaround: This function has to be called before tssc import "installer/config.yaml" into cluster.
8290
# Currently, the tssc `config` subcommand lacks the ability to modify property values stored in config.yaml.
8391
github_integration() {
@@ -240,6 +248,7 @@ nexus_integration() {
240248
create_cluster_config() {
241249
echo "[INFO] Creating the installer's cluster configuration"
242250
update_dh_catalog_url
251+
update_dh_auth_config
243252
disable_acs
244253
disable_tpa
245254

0 commit comments

Comments
 (0)