Commit Graph

25 Commits

Author SHA1 Message Date
Ian Wienand 76037c434e linter: add name to blocks
A later version of ansible-lint enforces names on blocks.  This is
generally a good rule; fix a few missing blocks here.

Change-Id: Ia87a0c21ec0ed1662e37cbc9e17a0df344b54e57
2022-07-28 12:03:23 +10:00
Ian Wienand 8cdf719bb3 linter: update some YAML whitespace issues
These were found by a later version of ansible-lint.  This should have
no effect, but just fixes some inconsistent whitespace issues.

Change-Id: I7bcde4942c97cfe743e8aba74833aeb5844c8290
2022-07-28 12:02:45 +10:00
Andreas Jaeger 0aedb7733c Use ensure-* roles
The install- roles have been renamed to ensure-*, follow the rename.

Depends-On: https://review.opendev.org/716698/
Change-Id: I2522028e9091efdbe292529474de7cce2cf29039
2020-04-06 19:49:19 +02:00
Andreas Jaeger 15e763dc6a Move stackviz publish in-tree
The new job publish-openstack-stackviz-element is working now,
move the trigger in-tree and change the publish location, we do not need
the "-new" in the name anymore.

Content is published at:
https://tarballs.opendev.org/openstack/stackviz/dist/
The tarballs are equal, only difference is filenames of sources.

Mark the job to run only on master, since it publishes always to the
same location and each invocation overrides the file. This is a
safety measure.

Depends-On: https://review.opendev.org/710754
Change-Id: If9488d7c60b58f51a7a0a4bdf0740d16f61c241e
2020-03-03 16:03:24 +01:00
Andreas Jaeger 8cadacce53 Don't use zuul_work_dir in post-stackviz
The stackviz publish job fails with
"The task includes an option with an undefined variable. The error was:
'zuul_work_dir' is undefined"

Use zuul.project.src.dir instead of zuul_work_dir.

Change-Id: I443d0b4bfb30a06d68321d402802ae1b433bab6b
2020-03-02 10:43:46 +01:00
Andreas Jaeger 14ccbb2e84 Rework post-stackviz to fix uploading
The fetch-javascript-output does not work with the artifact uploading,
it does not create an artifact directory on the server.

Remove use of the role and instead copy the needed bits of
fetch-javascript-content-tarball into the playbook.

Change-Id: I3ed46c1acf023b6d2b323f56ce6bdfe07f70775f
2020-02-29 09:57:45 +01:00
Andreas Jaeger 41e5721d38 Rework stackviz elements publishing
We cannot change the javascript-content job as desired, use
specific post job to rename and fetch the tarball.

Change-Id: I63872db707bd674ebfaa9bd49a1cdf3ae6906a60
2020-02-28 17:56:04 +01:00
Andreas Jaeger aafb5cbee7 fix stackviz publishing
Move setting of npm_command from playbook to job so that it can
be overriden for stackviz.

Change-Id: I4992584cb88ba715ddc7727bba65b7e853a6c7f5
2020-02-27 12:58:43 +01:00
Andreas Jaeger d2ed9a0df7 Fix stackviz periodic job
Fix typo in zuul variable.
Use prod, not build as npm command.

Change-Id: I89d408f1ebed8f0051a735883ab40ade5e2c07df
2020-02-27 11:03:17 +01:00
Andreas Jaeger a0cf998b39 Add publish job for stackviz
stackviz gets published daily to:
https://tarballs.opendev.org/openstack/stackviz/dist/stackviz-latest.tar.gz

The current job periodic-package-stackviz-element is a legacy job,
create a new job publish-openstack-javascript-latest-content that can be
run instead.

The stackviz-element is backed into our images and thus we have to be
extra careful not to break it and test.

The new job is publishing temporarily under a different filename to
check that it's working correctly.

Order of changes:
* Merge this change, so we run both periodic-package-stackviz-element and
  publish-openstack-javascript-latest-content in stackviz.
* Change new job to publish under correct name and remove setup in
  project-config.
* Switch to new job in stackviz repo.

Change-Id: I81ac0975f03756da673ae12e7e11cd5686a0f2d6
2020-02-26 17:52:46 +01:00
Monty Taylor 5ad44f84d4 Wrap upload-npm invocation in a block
Before ansible 2.7 this is needed for the delegate_to to apply.

Change-Id: Icf0c36f94e55a9d8ef8ac123fde441af48303b25
2019-03-14 20:55:23 +00:00
Monty Taylor e72b12822f Use include_role and delegate_to for upload-npm
Change-Id: I92fe1a3d2fe7e886723cdbc6495933795040e8b3
2019-03-14 16:12:01 +00:00
Jeremy Stanley 087ef3dc7d Revert "add signing steps to javascript publishing job"
Turns out playbooks/javascript/publish.yaml is also used in
generating branch tarballs, which we don't want to sign. This has
resulted in the publish-openstack-javascript-content job, e.g. for
the openstack-infra/storyboard-webclient project which runs it after
every commit, to fail with:

The task includes an option with an undefined variable. The error
was: 'gpg_key' is undefined

We probably need to switch to running separate versions of this job
for tags and branch updates so that we can exclusively sign the
former.

This reverts commit 7244f69975.

Change-Id: I77fd1bd315d96f8fe082b3e50a430cd8602c4d71
2018-09-07 19:14:22 +00:00
Doug Hellmann 7244f69975 add signing steps to javascript publishing job
Change-Id: I7fc9e5100c5cc68bbd5385046377fd30f456534c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-08-27 17:56:20 -04:00
Monty Taylor 0a9e4e59ee Use fetch-javascript-content-tarball role
There is a substantive difference between a content tarball and a source
tarball that was getting missed. Update the docs to indicate what a
'content' tarball is, and then update the
publish-openstack-javascript-content job to use the
fetch-javascript-content-tarball role.

Change-Id: I055ed8248f8243926601c0445ab7c911054fdeb0
Depends-On: https://review.openstack.org/550223
2018-03-06 20:03:10 +00:00
Adam Coldrick 4a6bdbfdd2 Remove version-from-git from javascript publishing playbook
The `version-from-git` role doesn't serve a purpose in this playbook,
and seems to cause issues when there are no tags in the project's
repository to get the version from.

Change-Id: I04ed1e172eb795843c9ef58b97611edb4ebb41aa
2018-02-17 12:35:07 +00:00
Adam Coldrick c2a5d24982 Add a playbook for publishing javascript tarballs
The publish-openstack-javascript-content job specifies
`playbooks/javascript/publish.yaml` as a post-run playbook,
but this playbook doesn't exist. This commit adds this
missing playbook, which fetches the javascript output and
tarball for publishing to tarballs.o.o.

Change-Id: I6c0ad5e2e0d35f3d331e4dd18edca79a4649b79a
2018-02-12 21:58:05 +00:00
Adam Coldrick ea2a4c97f6 Install yarn in javascript pre-run playbook
Change-Id: Ie6851f065dda1dd1376c4685d29babb9278c757e
2018-02-11 16:08:35 +00:00
Monty Taylor e63337cfe1
Fetch javascript output on publish jobs too
We were only fetching the tarballs on the release jobs, not on the
publish jobs. That makes the publish job not so much of a publish job.

Change-Id: I8e6b12e61bcc42d2896c4fb574aaf6f1718e1bdb
2018-01-23 13:47:14 -06: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
Monty Taylor 8110e15f57
Add job for publishing built javascript content
There are two different types of tarballs we want to publish, a source
tarball to npm, and a built tarball intended for deployment. We have a
job for dealing with tarballs to npm, but we're lacking a new-style job
for publishing built artifacts to tarballs.o.o.

Add one, and switch storyboard to using it.

Change-Id: I19607d14facb93d1f46ea68feba563badfbbb5a2
2017-12-17 13:21:43 -06:00
Monty Taylor b206db4a2e
Grab package_ver from remote host
Ansible set_fact sets variables into the hostvars of the host they are
running on. We need to consume the remote hostvar for package_ver in the
context of localhost. So reach in to hostvars.

Set the host to ubuntu-xenial rather than all to be explicit.

Change-Id: I5a5c593cdf80d721a36187e1c552db21f4794b37
2017-12-08 16:04:22 -06:00
Jeremy Stanley d1dd1091c8 Run upload-npm role on executor
The upload-npm role seems to expect to upload files from the
executor, so in the javascript post playbook we should tell it to
run on localhost rather than the job node.

Change-Id: Iee176655108362545029f87134e9f150e0e35c17
2017-12-08 19:02:43 +00:00
Andreas Jaeger 9c468626aa Fix typo in role
Fix typo, so that role can be found in zuul-jobs.

Change-Id: Ieb669fd7904155b59357cf7e799860911878a63c
2017-10-13 15:16:17 +02:00
Monty Taylor 6455775623
Add release-openstack-javascript job
The current legacy javascript publish jobs are super broken. This adds
one that will use the roles from zuul-jobs and then will publish the
contents to npm.

Depends-On: I7f7c031ce754838776043325025fe5928cd36135
Change-Id: Ib361ee2880be77eff3ef905726b032777d0b807a
2017-10-10 13:10:38 -05:00