Skip to content

ci/cd: make workflow pipeline more robust #1961

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

Closed
lukpueh opened this issue Apr 20, 2022 · 0 comments · Fixed by #1971
Closed

ci/cd: make workflow pipeline more robust #1961

lukpueh opened this issue Apr 20, 2022 · 0 comments · Fixed by #1971
Assignees
Labels
backlog Issues to address with priority for current development goals github_actions Pull requests that update GitHub Actions code
Milestone

Comments

@lukpueh
Copy link
Member

lukpueh commented Apr 20, 2022

Description of issue or feature request:
#1946 adds a CD workflow to release build artifacts on PyPI and GH upon successful completion of the CI workflow for a pushed release tag.

Unfortunately, the information about CI that we can access from CD is vague and thus makes the workflow pipeline a bit brittle (see details below).

Current behavior:
CD triggers for each completed run of CI, regardless of the ref that triggered CI, but then skips execution if the CI run was not successful or the ref (branch or tag) that triggered CI does not start with a 'v'. In order to not trigger CD for a branch that starts with 'v', we rely on the configuration of CI, which currently does not trigger on other branches than 'develop'.

Expected behavior:
CD triggers for completed and successful run of CI but only if CI was triggered by a release tag, regardless of CIs trigger conditions.

Alternative solution:
Restructure workflows, so that all test logic from 'ci.yml' is moved to a separate workflow file '_test.yml', that can be included in both the CI workflow, which then only triggers on push to 'develop'-branch, and the CD workflow, which then only triggers on on push to 'v*'-tag.

@ivanayov ivanayov added the backlog Issues to address with priority for current development goals label Apr 20, 2022
@ivanayov ivanayov added this to the sprint 22 milestone Apr 20, 2022
@ivanayov ivanayov added the github_actions Pull requests that update GitHub Actions code label Apr 20, 2022
lukpueh added a commit to lukpueh/tuf that referenced this issue Apr 21, 2022
Implements suggestion from
theupdateframework#1961

Also adds permissions to CD workflow
(creating releases requires contents: write)

TODO:
- proof-read
- write commit message
- PR

Signed-off-by: Lukas Puehringer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issues to address with priority for current development goals github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants