Commit Graph

27 Commits

Author SHA1 Message Date
Thierry Carrez 50c3fb9f59 Fix release jobs to work with prepare-workspace-git
The prepare-workspace-git role recently replaced the use-cached-repos
role, but its behavior is slightly different. While use-cached-repos
removed the 'origin' remote, prepare-workspace-git replaces it with a
zuul fake origin.

Release jobs used to add an 'origin' remote to enable notes fetching.
Those jobs now fail because the 'origin' remote already exists. We
fix this by resetting the URL for the 'origin' remote, instead of
adding a new one.

Change-Id: Ifa80ff02dd06a65fd60189c97438554fc4100932
2019-10-21 13:58:14 +02:00
Andreas Jaeger fbc1f58c30 Move release-tools out of jenkins/scripts
To not install these on the images, create a new scripts directory to
hold them.

Create new copy-release-tools-scripts role to copy the files over,
we do not need using legacy-copy-project-config-scripts anymore since
everything is copied elsewhere.

Add the role to all playbooks that use release-tools scripts.

Change-Id: I36c458e297fec58023799f625739b341c4d403cf
2018-02-27 19:27:35 +01:00
Monty Taylor 09da196701 Remove explicit bindep parameters
All of these invocations of the bindep role are passing what amount to
the defaults. In zuul-jobs, doing bindep_dir: "{{ zuul_work_dir }}" is
important because it allows in-repo uses of those jobs to override how
they work for things like triggering from one repo but running on
another.

The publication jobs in project-config do not need that level of
flexibility, so just remove params and let defaults take over.

As a follow up, we could also add defaults for zuul_work_dir - and
honestly for bindep_dir - to the base job. That way we can always count
on them being set to a sane default value, and they're still
overrideable in a job.

Change-Id: I5bcda84aefa4726d0a904e8bc9698c21ca07f9a5
2018-01-05 22:17:17 +01:00
Ian Wienand 4995f042ea Convert back to zuul.projects
Zuul has transitioned zuul.projects to a dict that mirrors
zuul._projects.  Convert users back to zuul.projects so we can remove
the underscore version in zuul.

Change-Id: Ib71241a862cf29f6e542dc1d4a2c5cd554d5d7d8
Depends-On: I3c011f72933e98ccbf8badf0e9197c8659766c51
2017-12-01 14:59:29 +11:00
Andreas Jaeger e117d34e91 ansible-lint: Handle some git warnings
Ignore some places where ansible warns about git usage.

Change-Id: I9c5c19cca8c1c32ee0cde85e2ec66140364c14bc
2017-10-29 15:37:22 +00:00
Ian Wienand bccbc1b221 Move to dictionary list of projects zuul._projects (take 2)
This re-implements I430277369f9ecb2ecc0a31f795c72bba83bcecff (that had
to be reverted with commit c8628dd8f8).

The original change had a small syntax error using
"zuul.projects.values()" instead of "zuul._projects.values()".  This
is corrected here.

It also had a problem with_items: zuul._projects.values() -- in
python3 this returns a view, which doesn't work with "with_items:"
... so you need to "| list".

Integration test results (for use-cached-repos at least) in
I7828f78efd1d20031cf1c34629200f265576e7a7.

Change-Id: I9d88f405f34d1c5f75ebf4f52cedfaaab20c3bda
2017-10-26 08:13:43 +11:00
Zuul e4c65cfdf2 Merge "rewrite release jobs in python" 2017-10-24 20:32:48 +00:00
Doug Hellmann d1f62732ca rewrite release jobs in python
Merge the two release scripts into one python script.

Change-Id: Ic9832b58f10b0a8a7f2f11b9200f88913706aa3d
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-24 14:31:01 -04:00
Zuul e689c8dd4f Merge "Revert "Temporarily leave launchpad creds for release jobs"" 2017-10-24 18:29:34 +00:00
Jeremy Stanley 2db7071b10 Use shell.cmd with shell.executable
Rather than passing a string to the shell task and then using
shell.args.executable to choose an explicit executable, use
shell.cmd to set the actual script content so that shell.executable
can be used to choose the shell.

Change-Id: Ia24a21ce54746a486ba39c4eb7c32bc8470e32d4
2017-10-24 00:08:59 +00:00
Jeremy Stanley 39ddeb5144 Use bash for the release/tag playbook
The tag playbook used for the tag-releases job attempts to export a
variable containing a path relative to the user's homedir. This
works fine for tilde expansion in bash, but in vanilla sh ends up
passing a literal tilde into the consuming scripts at least some of
which do not perform their own os.path.expanduser() on the string.
Go ahead and explicitly use bash for the shell task in this playbook
to get the advance expansion it seems to assume.

Change-Id: Id10e37e5a2a32b7051c986f0541b1ed9f326e95c
2017-10-23 23:39:27 +00:00
Jeremy Stanley bc3f3f43e1 Revert "Temporarily leave launchpad creds for release jobs"
This reverts commit dc06e340d5.

Troubleshooting is complete, and secure removal of the credentials
can be safely restored now.

Change-Id: I18ab248bfd32f7588c7bf041e7b98e32e1db494e
2017-10-23 19:20:45 +00:00
Jeremy Stanley dc06e340d5 Temporarily leave launchpad creds for release jobs
The launchpadlib credential setup used by tag-releases to comment on
LP bugs is not yet working as expected. Temporarily stop shredding
and deleting the credential file so that a manually-held node can be
inspected for deeper investigation.

Change-Id: Id4cea87320f89b2c01d94616ee00019c7f69b0e8
2017-10-23 19:17:19 +00:00
Doug Hellmann ae2422adf6
move git configuration for release jobs to ansible tasks
Instead of scripting the git configuration, use tasks in pre playbooks
for the jobs. We use different settings for tag-releases and
propose-constraint-updates.

Change-Id: Id3713d89a8b2af821de41a146954be551337cf75
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-20 18:38:12 -04:00
James E. Blair ab8c641234 Merge "Revert "Move to dictionary list of projects zuul._projects"" 2017-10-20 17:11:52 +00:00
David Moreau Simard c8628dd8f8 Revert "Move to dictionary list of projects zuul._projects"
This is not working, let's figure it out after a revert.

This reverts commit a2767b225a.

Change-Id: Ib26e22f6285abfd06f85029a6b283b743c6cbd4a
2017-10-20 17:08:46 +00:00
Zuul 0ff6101663 Merge "Move to dictionary list of projects zuul._projects" 2017-10-20 16:34:46 +00:00
James E. Blair f1dbffce0a Add GPG key to tag-releases job
It uses this on the remote node in order to sign the git tags.
Remove it and the ssh private key from the remote node as well.

Change-Id: I89c58194905aec383af7b4c7d970b040ca4e55bb
Depends-On: I2f13f0c4de91808ba1bbdcc0fd20a547e43d602b
2017-10-19 13:36:35 -07:00
Doug Hellmann f6c0c32547 accumulate errors and fail tag-releases if we have any
Update the tag-releases job and the scripts it runs to accumulate
error exit codes and fail if there are any, but to continue to run as
many parts of the job as possible.

Change-Id: I5625e5f4b31af5d54d570581e9ef5000599fb035
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-19 11:33:03 -04:00
Ian Wienand a2767b225a Move to dictionary list of projects zuul._projects
Zuul exports the projects list as a dictionary in _projects in the
depends-on.  The idea is that we switch these jobs to that, and do
some testing.  When ready, we switch "projects" to be the dictionary
view, and revert "_project" calls here to "project".

Change-Id: I430277369f9ecb2ecc0a31f795c72bba83bcecff
2017-10-19 15:52:15 +11:00
Paul Belanger a36689c7e4
Fix typo in remove-launchpad-credentials role
Change-Id: I05385d949987508b8e6e5da3ad35f25123e51634
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-10-18 12:22:51 -04:00
Doug Hellmann bd8985648c have release functions script source its own requirements
The release-tools/functions script needs common.sh but has been
relying on the calling script to source it properly. Have the
functions script source its own dependency to ensure it is always done
properly.

Change-Id: I2f1b6c32cf2f454bdc3a9841891f464da07dc788
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-18 09:25:00 -04:00
Doug Hellmann c55d275259 add bindep step to release jobs
The tag-releases job now needs to run bindep to install some
dependencies on the dynamic nodes used for tagging releases that are
not present in the default image.

Change-Id: I8d0affa6eb8bc7d0fe1130b9968a0f88f7e4aa96
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-17 10:12:27 -04:00
Jeremy Stanley fce9887272 Correct grammar in tag-releases comment line
That should be "its" (possessive) not "it's" (contraction).

Also, ansible/jinja is overly confused by imbalanced quote marks of
any kind (single or double), even in comment lines within shell
tasks.

Change-Id: I422f30556b6d0fff5e8f36382cfd378013456bb2
2017-10-16 22:20:52 +00:00
Monty Taylor 110b3b5206
Add an origin remote for tag-releases for notes
tag-releases needs to fetch notes. To avoid touching the jenkins script
too much while v2 and v3 co-exist, just add the origin remote for all
projects in the pre-playbook.

Once v3 is rolled out fully and there is breathing room, this should be
reworked along with the contents of the script to meet all of the use
cases in a more native manner.

Change-Id: I8224ec098756874d5422fdb119d72ea1509b72a3
2017-10-10 15:12:58 -05:00
Paul Belanger 6464a00261 Fix typo in tag-release pre playbook
The correct role is add-launchpad-credentials.

Change-Id: I24e0dd0a37306822e9a1738e16e1da169d7062d0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-10-02 09:05:21 -04:00
Monty Taylor 46fdcd4f6f
Add tag-release job
Depends-On: I5bf80922026d9e68a396effe89bb2d6ea5cbdec0
Change-Id: Ic30b719d9fd147ed07f00fe0fc748a407c82d0af
2017-09-07 15:28:34 -05:00