Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

pipelines: Input variables at app stanza not overriding #4134

Closed
briancain opened this issue Oct 28, 2022 · 0 comments · Fixed by #4137
Closed

pipelines: Input variables at app stanza not overriding #4134

briancain opened this issue Oct 28, 2022 · 0 comments · Fixed by #4137
Labels
bug Something isn't working core/pipeline Issues related to the pipelines feature

Comments

@briancain
Copy link
Member

Describe the bug

When running waypoint pipeline run with an input var override defined on the CLI, it doesn't look like that input var gets set properly from the override:

brian@ubuntu:waypoint-tetris λ waypoint pipeline run -var="tag=1" marathon                                                                                 ±[main]

» Running pipeline "marathon" for application "tetris"
✓ Pipeline "marathon" has started running. Attempting to read job stream sequentially in order
✓ 1 steps detected, run sequence 2
...
...
» Building tetris...
✓ Running build v4
✓ Building Docker image with kaniko...
✓ Testing registry and uploading entrypoint layer
✓ Executing kaniko...
 │ INFO[0001] Retrieving image manifest nginx:stable
 │ INFO[0001] Returning cached image manifest
 │ INFO[0001] Executing 0 build triggers
 │ INFO[0001] Unpacking rootfs as cmd COPY ./public/ /var/www requires it.
 │ INFO[0004] COPY ./public/ /var/www
 │ INFO[0004] Taking snapshot of files...
 │ INFO[0004] COPY ./nginx.conf /etc/nginx/conf.d/default.conf
 │ INFO[0004] Taking snapshot of files...
 │ INFO[0004] Pushing image to localhost:38817/tetris:latest
 │ INFO[0005] Pushed image to 1 destinations
✓ Image pushed to '<contianer_registry>/tetris:latest'
...
...
# the variable used
 tag               | latest                                        | string    | default


Steps to Reproduce

Run a pipeline via the CLI with a CLI input var override for a variable defined inside an app {} stanza. See that it uses the default rather than the override.

variable "tag" {
  default     = "latest"
  type        = string
  description = "Image tag for the image"
}
app "tetris" {
  build {
    use "docker" {
    }

    registry {
      use "docker" {
        image    = var.image
        tag      = var.tag
        username = var.registry_username
        password = var.registry_password
        local    = var.registry_local
      }
    }
  }
...
...
}

Expected behavior

The override should be respected and used for the pipeline run.

Waypoint Platform Versions
Additional version and platform information to help triage the issue if
applicable:

  • Waypoint CLI Version: main at b7c98b1
  • Waypoint Server Platform and Version: n/a
  • Waypoint Plugin: n/a

Additional context
Add any other context about the problem here.

@briancain briancain added bug Something isn't working new core/pipeline Issues related to the pipelines feature labels Oct 28, 2022
briancain added a commit that referenced this issue Oct 31, 2022
Prior to this commit, when a pipeline was run, the CLI variables from
the job client were not included in the submitted job template that the
CLI would send to the server to run pipeline jobs. This means any CLI
variables would not be properly resolved when the job went to execute.
This commit fixes that by including those variables in the job template.

Fixes #4134
@evanphx evanphx removed the new label Nov 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working core/pipeline Issues related to the pipelines feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants