-
Notifications
You must be signed in to change notification settings - Fork 121
Issue when sourcing shipyard.envlist
#314
Comments
The envlist file is an internal implementation detail. Why do you need to source it when it is "sourced" by the container runtime? |
At the time we were using 3.5.0, we were having issues with using environment variables using Shipyard variables (like
Basically we need the Shipyard variables to be evaluated in the environment variables. Do you have any workaround for this purpose? |
I believe starting with Also, notabene, |
Are you using a I cannot repro this error in my local env var expansion test. job_specifications:
- id: test
tasks:
- environment_variables:
exptest: $AZ_BATCH_TASK_WORKING_DIR/hello/world
docker_image: busybox
command: /bin/sh -c "echo $exptest" This returns:
Also, it's recommended to rotate your credentials (Docker login password, storage accounts) referenced in the envlist output above. I redacted and deleted the history, but they have been leaked. |
We are using non-native pool, should we set the attribute to |
It should not matter in this case, but I wanted to eliminate a potential possible side-effect. In the case of non- The differences are explained here: https://github.com/Azure/batch-shipyard/blob/master/docs/97-faq.md#what-is-native-under-pool-platform_image-and-custom_image |
The issue is that we are using Shipyard environment variables (like In your example your are writing the environment variable in a shell command |
All values in the
If you still believe that you need to source the envlist, then you can simply strip the export $(grep -v "^SHIPYARD_" .shipyard.envlist | xargs) |
- Environment variables are already sourced. Further expansion of environment variables should be performed by shell invocation or typical conventions by the invoking program (#314)
Thanks for your help, we decided to change it like this at the end:
- id: task1
docker_image: ***********/**:{version}
environment_variables:
SUBJECT_NAME: foobar
INPUT_DICOM_DIR: $AZ_BATCH_TASK_WORKING_DIR/foo/bar
OUTPUT_DIR: $AZ_BATCH_TASK_WORKING_DIR
entrypoint: /bin/bash
command: -c "source $AZ_BATCH_TASK_WORKING_DIR/.shipyard.envlist &&
run.sh {options}"
- id: task1
docker_image: ***********/**:{version}
environment_variables:
SUBJECT_NAME: foobar
entrypoint: /bin/bash
command: -c "export INPUT_DICOM_DIR=$AZ_BATCH_TASK_WORKING_DIR/foo/bar &&
export OUTPUT_DIR=$AZ_BATCH_TASK_WORKING_DIR &&
run.sh {options}" We are using the shell to do the expansion before assigning environment variables. |
I am a newer for develop batch shipyard, can you tell me where the {version} is defined? |
Problem Description
When sourcing the
.shipyard.envlist
, I got an the following errors :Batch Shipyard Version
We recently upgraded from batch-shipyard 3.5.0 to batch-shipyard 3.8.1
Steps to Reproduce
Submit a job with batch-shipyard 3.8.1 with a task sourcing the
shipyard.envlist
Expected Results
No errorwhen sourcing the
shipyard.envlist
Actual Results
Error when sourcing the
shipyard.envlist
Redacted Configuration
Additional Logs
Content of the
shipard.envlist
on the nodeAdditonal Comments
Thank you for your help
The text was updated successfully, but these errors were encountered: