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 replace rules in source definition #82

Merged
merged 4 commits into from
Jul 24, 2020
Merged

Add replace rules in source definition #82

merged 4 commits into from
Jul 24, 2020

Conversation

olblak
Copy link
Member

@olblak olblak commented Jul 24, 2020

Sometimes it happens that a source returns unwanted strings and we want to remove a sub part.
An example, the release tag from https://github.com/Azure/azure-cli/releases prefix 'azure-cli-' to version name like azure-cli-2.9.1 but the docker image tag doesn't contain that 'azure-cli-'

So to automated tag update, we need to be able to remove such strings

source:
  kind: githubRelease
  replaces: 
    - from: "string"
      to: ""
    - from: "substring1"
      to: "substring2"
  spec:
    owner: "Github Owner"
    repository: "Github Repository"
    token: "Don't commit your secrets!"
    url: "Github Url"
    version: "Version to fetch"

Signed-off-by: Olivier Vernin olivier@vernin.me

Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak olblak added the enhancement New feature or request label Jul 24, 2020
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak olblak self-assigned this Jul 24, 2020
@olblak olblak merged commit c5fbdeb into master Jul 24, 2020
@olblak olblak deleted the replacer branch July 24, 2020 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant