Skip to content

feat: coordinate phylum-ci Docker image releases with new CLI releases#466

Merged
maxrake merged 7 commits into
mainfrom
docker_stalker
Jun 15, 2022
Merged

feat: coordinate phylum-ci Docker image releases with new CLI releases#466
maxrake merged 7 commits into
mainfrom
docker_stalker

Conversation

@maxrake
Copy link
Copy Markdown
Contributor

@maxrake maxrake commented Jun 13, 2022

This PR adds a repository dispatch event trigger to the release workflow. It triggers the Docker workflow in the phylum-dev/phylum-ci repo to build and push Docker images containing the latest phylum Python package and the Phylum CLI version from the tag that caused the Release workflow to run. A curl command that POSTs to the dispatches endpoint with the expected payload is used instead of the actions/github-script action because this is a simple trigger. The trigger is further limited so that it will not fire for pre-releases of the CLI.

Checklist

maxrake added 2 commits June 13, 2022 17:49
Add a repository dispatch event trigger to the release workflow. It
triggers the Docker workflow in the `phylum-dev/phylum-ci` repo to build
and push Docker images containing the latest `phylum` Python package and
the Phylum CLI version from the tag that caused the Release workflow to
run. The trigger is a simple curl command that POSTs to the `dispatches`
endpoint with the expected payload. The trigger is further limited so
that it will not fire for pre-releases of the CLI.
@maxrake maxrake requested a review from a team June 13, 2022 23:14
@maxrake maxrake self-assigned this Jun 13, 2022
@maxrake maxrake requested a review from a team as a code owner June 13, 2022 23:14
@maxrake maxrake requested review from cd-work and janasheehan June 13, 2022 23:14
Comment thread .github/workflows/release.yml Outdated
* Indent long command line arguments to visually separate them
* Put the trigger step in it's own job, dependent on release
* Use the `ubuntu-22.04` runner to make use of newer `curl` options
* Add `--no-progress-meter` option to reduce output noise
@maxrake maxrake requested a review from cd-work June 14, 2022 16:40
Comment thread .github/workflows/release.yml
@maxrake maxrake requested a review from cd-work June 14, 2022 18:31
kylewillmon
kylewillmon previously approved these changes Jun 14, 2022
cd-work
cd-work previously approved these changes Jun 14, 2022
@maxrake maxrake dismissed stale reviews from cd-work and kylewillmon via 593e3ee June 14, 2022 20:19
@maxrake
Copy link
Copy Markdown
Contributor Author

maxrake commented Jun 14, 2022

It turns out the following syntax is invalid for a GitHub Actions workflow:

if: ! contains(github.ref, 'rc')

This was discovered after merging the new Docker workflow into the phylum-ci repository and attempting to trigger it

After searching the docs and coming up empty, a GitHub Community Forum post for this issue (but for startswith instead of contains) showed the way to go.

The same correction will be made in the phylum-ci repository.

@maxrake maxrake requested review from cd-work and kylewillmon June 14, 2022 20:25
cd-work
cd-work previously approved these changes Jun 15, 2022
kylewillmon
kylewillmon previously approved these changes Jun 15, 2022
Comment thread .github/workflows/release.yml Outdated
@maxrake maxrake dismissed stale reviews from kylewillmon and cd-work via 272d108 June 15, 2022 15:52
@maxrake maxrake requested a review from kylewillmon June 15, 2022 15:57
@maxrake maxrake merged commit df9f8d5 into main Jun 15, 2022
@maxrake maxrake deleted the docker_stalker branch June 15, 2022 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants