Skip to content
Permalink
Browse files

Add pending_signing_tag

The idea is that instead of into pending_testing_tag, we tag into pending_signing_tag,
and then robosignatory will pick them up, sign them, and move them to pending_testing_tag.

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
  • Loading branch information...
puiterwijk committed Sep 14, 2016
1 parent d2f1ca8 commit 3fe3e21946d43d895e38df34b6626b531946676c
@@ -290,6 +290,7 @@ class Release(Base):
stable_tag = Column(UnicodeText, nullable=False)
testing_tag = Column(UnicodeText, nullable=False)
candidate_tag = Column(UnicodeText, nullable=False)
pending_signing_tag = Column(UnicodeText, nullable=False)
pending_testing_tag = Column(UnicodeText, nullable=False)
pending_stable_tag = Column(UnicodeText, nullable=False)
override_tag = Column(UnicodeText, nullable=False)
@@ -585,6 +586,9 @@ def unpush(self, koji):
log.info('Unpushing %s' % self.nvr)
release = self.update.release
for tag in self.get_tags(koji):
if tag == release.pending_signing_tag:
log.info('Removing %s tag from %s' % (tag, self.nvr))
koji.untagBuild(tag, self.nvr)
if tag == release.pending_testing_tag:
log.info('Removing %s tag from %s' % (tag, self.nvr))
koji.untagBuild(tag, self.nvr)
@@ -1129,7 +1133,7 @@ def set_request(self, db, action, username):
# Add the appropriate 'pending' koji tag to this update, so tools like
# AutoQA can mash repositories of them for testing.
if action is UpdateRequest.testing:
self.add_tag(self.release.pending_testing_tag)
self.add_tag(self.release.pending_signing_tag)
elif action is UpdateRequest.stable:
self.add_tag(self.release.pending_stable_tag)

@@ -1558,6 +1562,7 @@ def revoke(self):
# Remove the 'pending' koji tags from this update so taskotron stops
# evalulating them.
if self.request is UpdateRequest.testing:
self.remove_tag(self.release.pending_signing_tag)
self.remove_tag(self.release.pending_testing_tag)
elif self.request is UpdateRequest.stable:
self.remove_tag(self.release.pending_stable_tag)
@@ -301,6 +301,10 @@ class SaveReleaseSchema(CSRFProtectedSchema, colander.MappingSchema):
candidate_tag = colander.SchemaNode(
colander.String(),
)
pending_signing_tag = colander.SchemaNode(
colander.String(),
missing="",
)
pending_testing_tag = colander.SchemaNode(
colander.String(),
missing="",
@@ -149,6 +149,7 @@ def print_release(release):
print(" Stable Tag: %s" % release['stable_tag'])
print(" Testing Tag: %s" % release['testing_tag'])
print(" Candidate Tag: %s" % release['candidate_tag'])
print(" Pending Signing Tag: %s" % release['pending_signing_tag'])
print(" Pending Testing Tag: %s" % release['pending_testing_tag'])
print(" Pending Stable Tag: %s" % release['pending_stable_tag'])
print(" Override Tag: %s" % release['override_tag'])
@@ -73,13 +73,17 @@ def main(argv=sys.argv):
tags = build.get_tags()
stable_tag = release.dist_tag
testing_tag = release.testing_tag
pending_signing_tag = Release.pending_signing_tag
pending_testing_tag = Release.pending_testing_tag
if stable_tag not in tags:
log.error('%s not tagged as stable %s' % (build.nvr, tags))
continue
if testing_tag in tags:
log.info('Removing %s from %s' % (testing_tag, build.nvr))
koji.untagBuild(testing_tag, build.nvr)
if pending_signing_tag in tags:
log.info('Removing %s from %s' % (pending_signing_tag, build.nvr))
koji.untagBuild(pending_signing_tag, build.nvr)
if pending_testing_tag in tags:
log.info('Removing %s from %s' % (pending_testing_tag, build.nvr))
koji.untagBuild(pending_testing_tag, build.nvr)
@@ -66,6 +66,12 @@ <h2 class="pull-left">${release['long_name']}</h2>
${release['pending_stable_tag']}
</td>
</tr>
<tr>
<td>Pending signing tag</td>
<td>
${release['pending_signing_tag']}
</td>
</tr>
<tr>
<td>Pending testing tag</td>
<td>
@@ -128,6 +128,7 @@ def work(pkg, testing):
if testing:
koji.listTagged(release.testing_tag, **kwargs)
koji.listTagged(release.pending_testing_tag, **kwargs)
koji.listTagged(release.pending_signing_tag, **kwargs)

builds = koji.multiCall() or [] # Protect against None

0 comments on commit 3fe3e21

Please sign in to comment.
You can’t perform that action at this time.