aboutsummaryrefslogtreecommitdiffstats
path: root/.cirrus.yml
diff options
context:
space:
mode:
authorJulien Carsique <julien.carsique@sonarsource.com>2023-02-01 15:52:22 +0100
committersonartech <sonartech@sonarsource.com>2023-02-02 20:03:40 +0000
commit609d2d03d1624a3bf162e6c2d56f6374ce4d438e (patch)
treeec3b5d3d3b03d1d72c4540b7ef0d4e86506ff257 /.cirrus.yml
parent2d60913db1dc3a499ab5d681b7b2ad324b3ac19d (diff)
downloadsonarqube-609d2d03d1624a3bf162e6c2d56f6374ce4d438e.tar.gz
sonarqube-609d2d03d1624a3bf162e6c2d56f6374ce4d438e.zip
BUILD-2482 setup gitlab on runtime
Diffstat (limited to '.cirrus.yml')
-rw-r--r--.cirrus.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 032216ea4fe..1d5b7ec74d3 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -410,6 +410,23 @@ qa_gitlab_task:
matrix:
- image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/gitlab:latest
- image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/gitlab:15.6.2-ce.0
+ env:
+ - GITLAB_POST_RECONFIGURE_SCRIPT: |-
+ { cat >/tmp/setup.rb <<-'EOF'
+ token = User.find_by_username('root').personal_access_tokens.create(scopes: [:api], name: 'token');
+ token.set_token('token-here-456');
+ token.save!;
+ token_read = User.find_by_username('root').personal_access_tokens.create(scopes: [:read_user], name: 'token_read');
+ token_read.set_token('token-read-123');
+ token_read.save!;
+ user = User.find_by_username('root');
+ user.password = 'eng-YTU1ydh6kyt7tjd';
+ user.password_confirmation = 'eng-YTU1ydh6kyt7tjd';
+ user.save!;
+ EOF
+ } && gitlab-rails runner /tmp/setup.rb && \
+ echo 'from_file "/etc/gitlab/external_gitlab.rb"' >> /etc/gitlab/gitlab.rb && \
+ gitlab-ctl reconfigure
env:
QA_CATEGORY: GITLAB
script: