Skip to content
Snippets Groups Projects
Commit 6f0b6e2c authored by Matthew Clarkson's avatar Matthew Clarkson
Browse files

feat: allow `tag` in plugin config for default tag replacement

We previous defaulted the `tag` of an image to be `${nextRelease.version}`.
However, we may want to overide this default when doing tag replacement.

A common use case for this if the incoming tag has parts to it:

```json
tag: "${tag.split('-').slice(0,-1).join('-')}-${nextRelease.version}"
images:
  "${CI_REGISTRY_IMAGE}/node:16-${CI_COMMIT_SHA}"
  "${CI_REGISTRY_IMAGE}/node:18-${CI_COMMIT_SHA}"
```
parent 4249398f
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ export async function verifyConditions(pluginConfig, context) {
images = images.map(i => {
if (typeof i === 'string') {
// eslint-disable-next-line no-template-curly-in-string
i = {image: i, tag: '${nextRelease.version}'};
i = {image: i, tag: pluginConfig.tag ?? '${nextRelease.version}'};
}
let {image, tag} = i;
......
  • Congregate Migrate @congregate_migrate

    mentioned in commit dae6cdec

    By GITLAB_TOKEN on 2023-01-06T10:36:01

    · Imported

    mentioned in commit dae6cdec

    By GITLAB_TOKEN on 2023-01-06T10:36:01

    Toggle commit list
  • Congregate Migrate @congregate_migrate

    mentioned in commit cd3d1a1e

    By GITLAB_TOKEN on 2023-01-06T11:08:06

    · Imported

    mentioned in commit cd3d1a1e

    By GITLAB_TOKEN on 2023-01-06T11:08:06

    Toggle commit list
  • Congregate Migrate @congregate_migrate

    mentioned in commit 6c03a132

    By GITLAB_TOKEN on 2023-08-03T11:45:48

    · Imported

    mentioned in commit 6c03a132

    By GITLAB_TOKEN on 2023-08-03T11:45:48

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment