nextclade icon indicating copy to clipboard operation
nextclade copied to clipboard

Rebuild `nextstrain/base` Docker image automatically?

Open fanninpm opened this issue 2 years ago • 5 comments

I noticed that every time augur and auspice get updated, it triggers a rebuild of the nextstrain/base Docker image. Would it be reasonable to add a trigger to this repository such that the nextstrain/base Docker image gets updated every time Nextalign and/or the Nextclade CLI gets updated?

fanninpm avatar Dec 13 '21 22:12 fanninpm

This sounds like a good idea. This can be easily incorporated into a GitHub actions workflow like how it's currently done in Augur.

This can be accomplished in a few ways:

  1. Create a new workflow that runs after GitHub release, similar to .github/workflows/bioconda.yml.
  2. Repurpose .github/workflows/bioconda.yml into .github/workflows/post-release.yml and add a new job rebuild-nextstrain-docker-image
  3. Add a new job in .github/workflows/cli.yml that needs: [publish-to-github-releases]

Which sounds best to you @ivan-aksamentov?

victorlin avatar Dec 13 '22 19:12 victorlin

@victorlin If I chose among the 3 options, I'd say 3 is the easiest.

But I find it strange that the job from docker-base is running as a step in augur repo. It does not seem to be shown in the list of actions in docker-base. Impossible to find. I think it would be more logical to instead run some sort of a trigger which starts the job in the docker-base repo proper?

ivan-aksamentov avatar Dec 13 '22 20:12 ivan-aksamentov

Actually, it does run in the docker-base repo. You were probably looking for something distinctly named like "rebuild image", but what happens is the step in Augur triggers a run of the CI workflow. You can filter by actor:nextstrain-bot to see workflow runs that were triggered this way.

victorlin avatar Dec 13 '22 21:12 victorlin

I also think 3 is the easiest, though to be consistent, bioconda.yml should be removed in favor of a job publish-to-bioconda in cli.yml that needs: [publish-to-github-releases]. So it'd look like:

jobs:
  …

  publish-to-github-releases:
    needs: [ build-cli, run-unit-tests, run-lints, run-smoke-tests, run-linux-distros-test ]

  publish-to-bioconda:
    needs: [ publish-to-github-releases ]

  rebuild-nextstrain-docker-image:
    needs: [ publish-to-github-releases ]

This way there's no need to worry about the release trigger and everything can be seen in one place.

victorlin avatar Dec 13 '22 21:12 victorlin

@victorlin I see. My worry is that CLI workflow file is already quite long. And both bioconda and docker-rebuild jobs are of much lesser importance and don't deal with build artifacts directly, so now I think maybe having a separate file for docker rebuild is better.

ivan-aksamentov avatar Dec 13 '22 22:12 ivan-aksamentov