Commit d02d3e34 authored by Rémy Coutable's avatar Rémy Coutable

Fix MySQL CI jobs

[run mysql]
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 6145ddf5
...@@ -188,6 +188,27 @@ rspec system mysql: ...@@ -188,6 +188,27 @@ rspec system mysql:
<<: *only-schedules-master <<: *only-schedules-master
parallel: 24 parallel: 24
.rspec-mysql-on-demand: &rspec-mysql-on-demand
only:
variables:
- $CI_COMMIT_MESSAGE =~ /\[run mysql\]/i
- $CI_COMMIT_REF_NAME =~ /mysql/
rspec unit mysql on-demand:
<<: *rspec-metadata-mysql
<<: *rspec-mysql-on-demand
parallel: 20
rspec integration mysql on-demand:
<<: *rspec-metadata-mysql
<<: *rspec-mysql-on-demand
parallel: 6
rspec system mysql on-demand:
<<: *rspec-metadata-mysql
<<: *rspec-mysql-on-demand
parallel: 24
rspec-fast-spec-helper: rspec-fast-spec-helper:
<<: *rspec-metadata-pg <<: *rspec-metadata-pg
script: script:
...@@ -200,14 +221,15 @@ rspec-fast-spec-helper: ...@@ -200,14 +221,15 @@ rspec-fast-spec-helper:
- scripts/gitaly-test-spawn - scripts/gitaly-test-spawn
- bin/rspec --color --format documentation --tag quarantine -- spec/ - bin/rspec --color --format documentation --tag quarantine -- spec/
rspec-pg-quarantine: rspec quarantine pg:
<<: *rspec-metadata-pg <<: *rspec-metadata-pg
<<: *rspec-quarantine <<: *rspec-quarantine
allow_failure: true allow_failure: true
rspec-mysql-quarantine: rspec quarantine mysql:
<<: *rspec-metadata-mysql <<: *rspec-metadata-mysql
<<: *rspec-quarantine <<: *rspec-quarantine
<<: *only-schedules-master
allow_failure: true allow_failure: true
static-analysis: static-analysis:
......
...@@ -17,12 +17,10 @@ cp config/gitlab.yml.example config/gitlab.yml ...@@ -17,12 +17,10 @@ cp config/gitlab.yml.example config/gitlab.yml
sed -i 's/bin_path: \/usr\/bin\/git/bin_path: \/usr\/local\/bin\/git/' config/gitlab.yml sed -i 's/bin_path: \/usr\/bin\/git/bin_path: \/usr\/local\/bin\/git/' config/gitlab.yml
# Determine the database by looking at the job name. # Determine the database by looking at the job name.
# For example, we'll get pg if the job is `rspec-pg 19 20` # This would make the default database postgresql.
export GITLAB_DATABASE=$(echo $CI_JOB_NAME | cut -f1 -d' ' | cut -f2 -d-) if [[ "${CI_JOB_NAME#*mysql}" != "$CI_JOB_NAME" ]]; then
export GITLAB_DATABASE='mysql'
# This would make the default database postgresql, and we could also use else
# pg to mean postgresql.
if [ "$GITLAB_DATABASE" != 'mysql' ]; then
export GITLAB_DATABASE='postgresql' export GITLAB_DATABASE='postgresql'
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment