-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a workflow building nightlies #195
Add a workflow building nightlies #195
Conversation
e065c80
to
32fde41
Compare
It worked in my fork: https://webknjaz.github.io/antsibull/ |
The major question I have is where should the nightly artifacts live? They don't quite fit within antsibull since antsibull is more the build tool to create the artifacts. I think we have a generic need for "someplace where files, documentation, communication, tickets" related to the project as a whole should live and we should put everything there. Going to put this question on the community irc meeting agenda. |
32fde41
to
ca6265c
Compare
@abadger I suggest merging this as is and then changing when the decision is available. This way, we'll at least have some build flow smoke-testing. |
workflow_dispatch: | ||
inputs: | ||
ansible-base-slug: | ||
default: ansible/ansible | ||
description: The GitHub repo slug for pulling ansible-base from | ||
required: true | ||
ansible-base-ref: | ||
default: devel | ||
description: The GitHub repo ref for pulling ansible-base from | ||
required: true | ||
ansible-build-data-slug: | ||
default: ansible-community/ansible-build-data | ||
description: The GitHub repo slug for pulling ansible build data from | ||
required: true | ||
ansible-build-data-ref: | ||
default: main | ||
description: The GitHub repo ref for pulling ansible build data from | ||
required: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abadger look at this. This is experimental and is supposed to add a button allowing you to trigger a workflow from the GitHub UI. I haven't tested it but it should appear after the merge.
Ref: https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abadger this specific piece of setup could be used to automate generating (and potentially publishing) the stable releases to PyPI. Do you have any opinion on this? IIRC the build happens by manual runs locally, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do want to have a push button to make a release eventually. There's one piece of coordination involved in making a release right now, though, updating the docsite. Possibilities:
- Make the build one push button and publish a second one. That way the release manager can alert the docs team in between.
- Ask the docs team if they can update the docs after we've published. Now that the docs build is back down to ~ ten minutes I think they might be okay with that.
Note that building and publishing includes saving information about the build/release to the ansible-build-data repository. and has slightly different means of workflows depending on what type of release it is (alpha, beta, rc, patch release). So the script that generates the new release tarballs will need to take some input to tell what sort of release it was and also be able to commit to the ansible-build-data repo. I also found that I needed to make a special release today and so I ran a slightly different command to do that. Special things might just be special, though. It just means that we should make sure that it's easy for people to understand what the script does so that they can figure out how to do special, one-off things. The build instructions are here: https://github.com/ansible-community/antsibull/blob/main/docs/build-ansible.rst
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand how it's bound to docs: can't this happen asynchronously? Also, building the docs can happen automatically if it's something the docs team is up to: an automatic workflow can send notifications to other systems, in particular, it can trigger workflows in other repos. Does the publish strictly depend on docs?
ca6265c
to
191f3ef
Compare
This was mentioned in today's community irc meeting. There's a desire for an ansible tarball that can be used with devel builds of ansible-base. |
As agreed in yesterdays Community Meeting this will live in https://github.com/ansible-community/nightly-builds Thanks for doing this :) |
@gundalow @abadger we've decided that the static DumbPyPI website will live @ ansible-community/nightly-builds. But do you have any preferences wrt the CI/CD workflow itself? I'm pretty sure that I can set it up to push the GH Pages content to another repo while keeping the workflow in antsibull if that's what people want. |
I don't mind either way. |
pip setuptools wheel | ||
- name: Install antsibull dist from PyPI | ||
run: python -m pip install -U --user antsibull | ||
- name: Install antsibull dist from GitHub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that it should be put into the nightly-build repository (keep the artifacts and the tools close together) until this. I do wonder if the nightly build should use antsibull from git, though, or stick with the antsibull on pypi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After I gave it some thought, I decided to try having it here because the builder is here too. Also, when I was first trying to make it work, PyPI version didn't have all the necessary bits for some reason and I needed something unreleased. I think if we keep it here, it'll also test that antsibull's builder is healthy: it seems reasonable to ensure that it doesn't break with some random change to antsibull.
Of course, we can move it later if it proves to be too annoying.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would also support goals declared in #98 — how can we build a release automation if the tooling does not test this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think testing should be in integration and unit testing. Anything that results in artifacts that the public can access should be considered part of production infrastructure instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would agree for the regular tagged releases that are based on a human sign-off but nightlies are supposed to be made out of potentially broken things and I consider them a part of smoke and integration test infrastructure. OTOH if the tool breaks on nightlies, it's not the end of the world but is still a strong signal that something needs to be fixed... To me, it sounds better than finding out that it doesn't work right before making a release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, as long as we're using a git checkout of the antsibull git repo, I think it is good to host it here. I'm just not sure if we want to keep doing that down the road.
191f3ef
to
b64adf5
Compare
b64adf5
to
ffa9b71
Compare
Heh, if you wanted sign off from me, it would have been nice to wait until I was awake ;-) |
Sorry, I first wanted to ask for opinions but then did some thinking and realized that this change is non-destructive and would need follow-up updates anyway :-) |
A couple things for the followup:
|
Oh, and the title on https://ansible-community.github.io/nightly-builds/ should probably be changed from "My Private PyPi" as well. |
Makes sense, I'll keep that in mind for the next PR. |
This is a workflow roughly copied from https://github.com/webknjaz/ansinight.
Ref: #98