diff --git a/charts/jarvis-project/templates/Job-project.yaml b/charts/jarvis-project/templates/Job-project.yaml index 75679d5b..b1fd4b50 100644 --- a/charts/jarvis-project/templates/Job-project.yaml +++ b/charts/jarvis-project/templates/Job-project.yaml @@ -40,10 +40,20 @@ spec: - sh - -cex - | - # Create gerrit repo - ssh -oStrictHostKeyChecking=accept-new -oUserKnownHostsFile=/dev/null -p 29418 -i /run/jarvis/secret/gerrit-ssh-key "${GERRIT_USERNAME}@${GERRIT_HOST}" gerrit ls-projects -r "^$JARVIS_PROJECT_NAME\$" | grep -q "^${JARVIS_PROJECT_NAME}\$" || \ - ssh -oStrictHostKeyChecking=accept-new -oUserKnownHostsFile=/dev/null -p 29418 -i /run/jarvis/secret/gerrit-ssh-key ${GERRIT_USERNAME}@${GERRIT_HOST} gerrit create-project "${JARVIS_PROJECT_NAME}" --submit-type MERGE_IF_NECESSARY --owner Administrators --empty-commit + ssh -oStrictHostKeyChecking=accept-new -oUserKnownHostsFile=/dev/null \ + -p 29418 \ + -i /run/jarvis/secret/gerrit-ssh-key "${GERRIT_USERNAME}@${GERRIT_HOST}" \ + gerrit ls-projects -r "^$JARVIS_PROJECT_NAME\$" | grep -q "^${JARVIS_PROJECT_NAME}\$" \ + || \ + ssh -oStrictHostKeyChecking=accept-new -oUserKnownHostsFile=/dev/null \ + -p 29418 \ + -i /run/jarvis/secret/gerrit-ssh-key ${GERRIT_USERNAME}@${GERRIT_HOST} \ + gerrit create-project "${JARVIS_PROJECT_NAME}" \ + --owner Administrators \ + {{ if eq $.Values.config.ci.verify true }} --parent Verified-Label-Projects {{ else }} --parent Non-Verified-Label-Projects {{ end }} \ + --submit-type MERGE_IF_NECESSARY \ + --empty-commit # Set up checks on the repo jarvis-connector --auth_file /run/jarvis/gerrit-authfile --gerrit $GERRIT_URL --update --repo "${JARVIS_PROJECT_NAME}" --prefix jarvispipeline || \ diff --git a/charts/jarvis-project/values.yaml b/charts/jarvis-project/values.yaml index 73f7091a..4d9c9f17 100644 --- a/charts/jarvis-project/values.yaml +++ b/charts/jarvis-project/values.yaml @@ -35,6 +35,8 @@ params: kind: ClusterIssuer config: + ci: + verify: true test: ldap_username: jarvis ldap_password: password diff --git a/tools/gate/jarvis/500-deploy-gerrit.sh b/tools/gate/jarvis/500-deploy-gerrit.sh index 26a97e06..62256ea9 100755 --- a/tools/gate/jarvis/500-deploy-gerrit.sh +++ b/tools/gate/jarvis/500-deploy-gerrit.sh @@ -127,17 +127,6 @@ function gerrit_bootstrap() { git fetch origin refs/meta/config:refs/remotes/origin/meta/config git checkout meta/config - # Configure Verified Label - tee --append project.config <