Skip to content
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 skip-pull support to build phase #384

Merged
merged 1 commit into from
Apr 10, 2023

Conversation

supaspoida
Copy link
Contributor

Reuses the existing skip-pull option to conditionally remove the --pull flag from the generated docker compose command.

I have a use case where I am pre-building images outside the docker-compose plugin and wanted to use those images in the FROM tag of a Dockerfile to be built via the plugin. With the --pull flag docker compose tries to fetch from docker hub and fails. This change puts the flag behind the same SKIP_PULL conditional currently used by
the run phase.

I verified that this works as expected for my own pipelines but those are very simple at the moment and not exercising much of the plugin's surface area. If there are explicit reasons why this was unsupported previously I'm happy to revisit this approach or come up with another workaround.

@supaspoida supaspoida force-pushed the skip-pull-build branch 2 times, most recently from 33efad9 to f1491b4 Compare April 7, 2023 20:30
Copy link
Contributor

@toote toote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Only one thing missing: adding build to the dependency for the new option

README.md Outdated
@@ -486,7 +486,7 @@ Whether to skip the repository checkout phase. This is useful for steps that use

**Important**: as the code repository will not be available in the step, you need to ensure that the docker compose file(s) are present in some way (like using artifacts)

### `skip-pull` (optional, run only)
### `skip-pull` (optional)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be build and run only (as it wouldn't apply to the push)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks, fixed in latest!

Reuses the existing `skip-pull` option to conditionally remove the
`--pull` flag from the generated docker compose command.
@pzeballos pzeballos merged commit ebd8d8f into buildkite-plugins:master Apr 10, 2023
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.

None yet

3 participants