-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where should I set the skaffold.env to load my parameter to the skaffold.yaml? #9567
Comments
Try this one: |
Thank you for quick replying, but no luck it still error like |
@IcewaveLJW it's a different error, have you passed the |
@idsulik I saw this on the page mkdir dist || true
skaffold config set --global collect-metrics false
skaffold build --profile=jenkins --default-repo=${REPO} --file-output=${env.SKAFFOLD_BUILD_ARTIFACTS} ${SH_SKAFFOLD_DRY_RUN} ${SKAFFOLD_OPTIONS}
skaffold deploy --profile=${params.ENV} --build-artifacts=${env.SKAFFOLD_BUILD_ARTIFACTS} ${SKAFFOLD_OPTIONS} , shall I do something here? |
put this before the skaffold command: |
Hi @idsulik I add these two new command [2024-11-14T07:54:50.249Z] + export WORKSPACE=/var/lib/jenkins/workspace/mono_Skaffold
[2024-11-14T07:54:50.249Z] + echo /var/lib/jenkins/workspace/mono_Skaffold/dist/
[2024-11-14T07:54:50.249Z] /var/lib/jenkins/workspace/mono_Skaffold/dist/
[2024-11-14T07:54:50.249Z] + ls /var/lib/jenkins/workspace/mono_Skaffold/dist/
[2024-11-14T07:54:50.249Z] + skaffold config set --global collect-metrics false
[2024-11-14T07:54:50.249Z] set global value collect-metrics to false
[2024-11-14T07:54:50.249Z] + skaffold build --profile=jenkins --default-repo=xxx --file-output=skaffold-build.json --filename=xxx --namespace=xxx
[2024-11-14T07:54:50.504Z] image "myservice" context "/${WORKSPACE}/dist/" does not exist``` |
It seems to me that the |
Thank you for checking, I mean does there some way can help me to deal with that? Why we need to use env variable here is that we may have lots of task running in the same time which be assigned different |
Expected behavior
skaffold.yaml can read the env variable
WORKSPACE
and worked as expexted.Actual behavior
Error:
parsing skaffold config: error parsing skaffold configuration file: parsing api version: yaml: line 13: did not find expected key
Information
I built like this
WORKSPACE=/var/lib/jenkins/workspace/my_target_value
I saw the page here, https://skaffold.dev/docs/environment/env-file/, but seems it didn't work.
The text was updated successfully, but these errors were encountered: