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 ability to use find and replace interpolation #8

Open
Harrisonbro opened this issue Aug 22, 2022 · 0 comments
Open

Add ability to use find and replace interpolation #8

Harrisonbro opened this issue Aug 22, 2022 · 0 comments

Comments

@Harrisonbro
Copy link

Harrisonbro commented Aug 22, 2022

It would be very helpful to be able to do simple find and replace with interpolation. My use case, for example, would be to use the Git branch name as a Docker image tag but to do so I need to replace certain characters that are valid in Git but not in Docker — e.g., replace forward slashes with dashes.

It would be great to be able to do something like this:

- label: "Push images tagged with Git branch"
  plugins:
    - docker-compose#v3.7.0:
        config: buildkite/docker/compose.yml
        push:
          - foo:123456789.dkr.ecr.eu-west-2.amazonaws.com/foo:${BUILDKITE_BRANCH//\\//--}

There you can see the desired interpolation that converts a / character to --

I'm afraid I don't know Go so can't offer a PR.

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

No branches or pull requests

1 participant