You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.
Hi, Is it possible to implement string interpolation via config / environment variables for the "image" property? This would be helpful with running different versions of containers in test pipelines.
The below is compatible with docker-compose, so thinking something similar can be implemented? image: my-repo/my-image:${IMAGE_TAG:-latest}
Describe the solution you'd like
To be able to use environment variables and/or config variables when specifying an image.
something like this: image: my-repo/my-image:${IMAGE_TAG:-latest}
and/or image: my-repo/my-image:<{image_tag}
Describe alternatives you've considered
An alternative I have found is to run docker in docker and have that start up the image using 'docker run' as the command property supports string interpolation
I'm trying to run cypress tests in a Jenkins pipeline against a docker image my company produces, I want to set up the batect task in a way that developers can use this in their local environments too. The ideal endpoint is for devs/pipelines to be able to run a batect task in the following format
./batect test:cypress --config-var test_img=0.5.7
or TEST_IMG=0.5.7 ./batect test:cypress
or ./batect test:cypress
with a .env file that specifies what image to test.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi @ryanb6920, thanks for the suggestion. Something I'm hoping to do soon* is support interpolation like this in almost every field in configuration files. Watch this space.
This issue has been automatically marked as stale because it has not had any activity in the last 60 days. It will automatically be closed if no further activity occurs in the next seven days to enable maintainers to focus on the most important issues.
If this issue is still affecting you, please comment below within the next seven days.
Thank you for your contributions.
Describe the problem you'd like to solve
Hi, Is it possible to implement string interpolation via config / environment variables for the "image" property? This would be helpful with running different versions of containers in test pipelines.
The below is compatible with docker-compose, so thinking something similar can be implemented?
image: my-repo/my-image:${IMAGE_TAG:-latest}
Describe the solution you'd like
To be able to use environment variables and/or config variables when specifying an image.
something like this:
image: my-repo/my-image:${IMAGE_TAG:-latest}
and/or
image: my-repo/my-image:<{image_tag}
Describe alternatives you've considered
An alternative I have found is to run docker in docker and have that start up the image using 'docker run' as the command property supports string interpolation
docker-my-app: image: docker:20.10.8 environment: IMAGE_VERSION: <{image_version} command: "sh -c \" docker run --rm my-repo/my-image:${IMAGE_VERSION} \""
Additional context
I'm trying to run cypress tests in a Jenkins pipeline against a docker image my company produces, I want to set up the batect task in a way that developers can use this in their local environments too. The ideal endpoint is for devs/pipelines to be able to run a batect task in the following format
./batect test:cypress --config-var test_img=0.5.7
or
TEST_IMG=0.5.7 ./batect test:cypress
or
./batect test:cypress
with a .env file that specifies what image to test.
Thanks!
The text was updated successfully, but these errors were encountered: