From 5f22823d2a31cfd6b2b9c3dfd76eb4a4908709e2 Mon Sep 17 00:00:00 2001 From: Nikolay Mahotkin Date: Tue, 21 Jun 2016 17:14:56 +0300 Subject: [PATCH] [Gerrit] Adding a new label - 'Workflow' * label 'Workflow' is required by Zuul for launching gate pipeline * Zuul should be able to vote Verified +2 as a response to successful gate pipeline (extending Verified label by -2..+2) * The change requires merging https://review.fuel-infra.org/#/c/22331/ Change-Id: Ie0ec110f09edf0069b6754f123e66f9532cfd937 --- murano-apps/Gerrit/package/Classes/Gerrit.yaml | 4 ++-- ...reate_verified.sh => create_gerrit_labels.sh} | 16 ++++++++++++---- murano-apps/Jenkins/package/Classes/Jenkins.yaml | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) rename murano-apps/Gerrit/package/Resources/{create_verified.sh => create_gerrit_labels.sh} (68%) diff --git a/murano-apps/Gerrit/package/Classes/Gerrit.yaml b/murano-apps/Gerrit/package/Classes/Gerrit.yaml index 344d3b5..f5e4cf9 100644 --- a/murano-apps/Gerrit/package/Classes/Gerrit.yaml +++ b/murano-apps/Gerrit/package/Classes/Gerrit.yaml @@ -196,13 +196,13 @@ Methods: name => $name)) - $.instance.agent.call($template, $resources) - createLabelVerified: + createLabels: Body: - $._environment.reporter.report($this, 'Creating label "Verified" in Gerrit...') - $linux: new(conf:Linux) - $resource: new(sys:Resources) - - $script: $resource.string('create_verified.sh') + - $script: $resource.string('create_gerrit_labels.sh') - $linux.runCommand($.instance.agent, $script) - $._environment.reporter.report($this, 'Label "Verified" is successfully created.') diff --git a/murano-apps/Gerrit/package/Resources/create_verified.sh b/murano-apps/Gerrit/package/Resources/create_gerrit_labels.sh similarity index 68% rename from murano-apps/Gerrit/package/Resources/create_verified.sh rename to murano-apps/Gerrit/package/Resources/create_gerrit_labels.sh index afb2f39..661639f 100644 --- a/murano-apps/Gerrit/package/Resources/create_verified.sh +++ b/murano-apps/Gerrit/package/Resources/create_gerrit_labels.sh @@ -25,10 +25,18 @@ fi cat >> project.config << CONFIG [label "Verified"] - function = MaxWithBlock - value = -1 Fails - value = 0 No score - value = +1 Verified + function = MaxWithBlock + value = -2 Fails + value = -1 Doesn't seem to work + value = 0 No score + value = +1 Works for me + value = +2 Verified +[label "Workflow"] + function = MaxWithBlock + value = -1 Work in progress + value = 0 Ready for reviews + value = +1 Approved + CONFIG git commit -am "Adding label 'Verified' to All-projects" diff --git a/murano-apps/Jenkins/package/Classes/Jenkins.yaml b/murano-apps/Jenkins/package/Classes/Jenkins.yaml index d0c76d2..ffc1239 100644 --- a/murano-apps/Jenkins/package/Classes/Jenkins.yaml +++ b/murano-apps/Jenkins/package/Classes/Jenkins.yaml @@ -99,7 +99,7 @@ Methods: - $._environment.reporter.report($this, 'Creating "jenkins" account in Gerrit...') - $.createGerritAccount() - $.configureGerritPlugin() - - $.gerrit.createLabelVerified() + - $.gerrit.createLabels() - $._upgradeGitPlugin() - $.configureUser()