Skip to content

Update target references to use ${bundle.target} - #1935

Merged
pietern merged 1 commit into
mainfrom
template-target
Nov 27, 2024
Merged

Update target references to use ${bundle.target}#1935
pietern merged 1 commit into
mainfrom
template-target

Conversation

@pietern

Copy link
Copy Markdown
Contributor

Changes

The built-in template contains a reference to ${bundle.environment}.

This property has been deprecated in favor of ${bundle.target} a long time ago (#670), so we should no longer emit it. The environment field will continue to be usable until we cut a new major version in some far away future.

Tests

  • Unit tests
  • The test TestInterpolationWithTarget still covers correct interpolation of ${bundle.environment}

@github-actions

Copy link
Copy Markdown
Contributor

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 1935
  • Commit SHA: 96feb14d467e8f4a9f87f8c78e84d9c1d3b465d8

Checks will be approved automatically on success.

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Test Details: go/deco-tests/12048444439

@pietern

Copy link
Copy Markdown
ContributorAuthor

Existing test:

funcTestInterpolationWithTarget(t*testing.T) {
b:=loadTarget(t, "./interpolation_target", "development")
diags:=bundle.Apply(context.Background(), b, mutator.ResolveVariableReferences(
"bundle",
"workspace",
))
require.NoError(t, diags.Error())
assert.Equal(t, "foo bar", b.Config.Bundle.Name)
assert.Equal(t, "foo bar | bar | development | development", b.Config.Resources.Jobs["my_job"].Name)
}

Configuration:

resources:
jobs:
my_job:
name: "${bundle.name} | ${workspace.profile} | ${bundle.environment} | ${bundle.target}"

@pietern
pietern added this pull request to the merge queueNov 27, 2024
Merged via the queue into main with commit fae1b67Nov 27, 2024
@pietern
pietern deleted the template-target branch November 27, 2024 11:55
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
The built-in template contains a reference to `${bundle.environment}`.
This property has been deprecated in favor of `${bundle.target}` a long
time ago (#670), so we should no longer emit it. The environment field
will continue to be usable until we cut a new major version in some far
away future.
## Tests
* Unit tests
* The test `TestInterpolationWithTarget` still covers correct
interpolation of `${bundle.environment}`
Sign up for freeto 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.

3 participants

@pietern@eng-dev-ecosystem-bot@andrewnester