Remote operations multiple -remote-source flags

Can the -remote-source flag be specified more than once during a remote operation? I’m trying to set the ref as well as the path during a “waypoint build” and the correct ref is definitely being pulled but it seems like the custom path is not.

Related code: waypoint/base.go at main · hashicorp/waypoint · GitHub

Waypoint command:

waypoint build -remote-source=ref=feature/new-feature -remote-source=path=configs/dev -workspace=dev -var-file=./my-project.wpvars my-project/my-app

Hey @paladin-devops - No, at the moment you do not specify multiple remote source flags. We only have one configurable remote source per Project.

1 Like

Gotcha, thanks for clarifying @briancain. I was seeking to use a feature like this because of the way I currently have promotions working. I have a waypoint.hcl file for the same project in multiple subdirectories in my repo. I have the waypoint.hcl for dev using the Docker build plugin, and my higher envs using Docker pull (to pull the image that was built and tested in dev). This relates to remote runners because I wanted to use the waypoint.hcl file in the directory in my repo based on the workspace from the same remote-runner execution environment without having to do a project apply to update the source path:

For dev:

waypoint build -remote-source=ref=feature/new-feature -remote-source=path=configs/dev -workspace=dev -var-file=./my-project.wpvars my-project/my-app

For test:

waypoint build -remote-source=ref=feature/new-feature -remote-source=path=configs/test -workspace=test -var-file=./my-project.wpvars my-project/my-app

I know this will likely be moot soon though as this PR is coming and I’ll be able to manipulate the behavior of my build in a single waypoint.hcl file so I’ll be looking out for that!

1 Like

Hey there @paladin-devops - Yep, I’d say your use-case is going to be a lot smoother to accomplish once we finish up and get workspace settings properly in place. One of the main focuses there is making sure people can specify different targets in their remote data source for various workspaces inside a waypoint.hcl like a dev/test/prod per lifecycle operation. Be on the lookout for this! :slight_smile:

1 Like