Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions iterative/resource_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,19 +327,23 @@ sudo tee /usr/bin/cml.sh << 'EOF'
export AWS_SECRET_ACCESS_KEY={{escape .AWS_SECRET_ACCESS_KEY}}
export AWS_ACCESS_KEY_ID={{escape .AWS_ACCESS_KEY_ID}}
export AWS_SESSION_TOKEN={{escape .AWS_SESSION_TOKEN}}
export CML_RUNNER_SENSITIVE_ENV=AWS_SECRET_ACCESS_KEY:AWS_ACCESS_KEY_ID:AWS_SESSION_TOKEN
{{- end}}
{{- if eq .cloud "azure"}}
export AZURE_CLIENT_ID={{escape .AZURE_CLIENT_ID}}
export AZURE_CLIENT_SECRET={{escape .AZURE_CLIENT_SECRET}}
export AZURE_SUBSCRIPTION_ID={{escape .AZURE_SUBSCRIPTION_ID}}
export AZURE_TENANT_ID={{escape .AZURE_TENANT_ID}}
export CML_RUNNER_SENSITIVE_ENV=AZURE_CLIENT_ID:AZURE_CLIENT_SECRET:AZURE_SUBSCRIPTION_ID:AZURE_TENANT_ID
{{- end}}
{{- if eq .cloud "gcp"}}
export GOOGLE_APPLICATION_CREDENTIALS_DATA={{escape .GOOGLE_APPLICATION_CREDENTIALS_DATA}}
export CML_GCP_ACCESS_TOKEN={{escape .CML_GCP_ACCESS_TOKEN}}
export CML_RUNNER_SENSITIVE_ENV=GOOGLE_APPLICATION_CREDENTIALS_DATA:CML_GCP_ACCESS_TOKEN
{{- end}}
{{- if eq .cloud "kubernetes"}}
export KUBERNETES_CONFIGURATION={{escape .KUBERNETES_CONFIGURATION}}
export CML_RUNNER_SENSITIVE_ENV=KUBERNETES_CONFIGURATION
{{- end}}
{{- end}}

Expand Down
1 change: 1 addition & 0 deletions iterative/testdata/script_template_cloud_aws.golden
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ sudo tee /usr/bin/cml.sh << 'EOF'
export AWS_SECRET_ACCESS_KEY='0 value with "quotes" and spaces'
export AWS_ACCESS_KEY_ID='1 value with "quotes" and spaces'
export AWS_SESSION_TOKEN='2 value with "quotes" and spaces'
export CML_RUNNER_SENSITIVE_ENV=AWS_SECRET_ACCESS_KEY:AWS_ACCESS_KEY_ID:AWS_SESSION_TOKEN

while lsof /var/lib/dpkg/lock; do sleep 1; done

Expand Down
1 change: 1 addition & 0 deletions iterative/testdata/script_template_cloud_azure.golden
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export AZURE_CLIENT_ID='3 value with "quotes" and spaces'
export AZURE_CLIENT_SECRET='4 value with "quotes" and spaces'
export AZURE_SUBSCRIPTION_ID='5 value with "quotes" and spaces'
export AZURE_TENANT_ID='6 value with "quotes" and spaces'
export CML_RUNNER_SENSITIVE_ENV=AZURE_CLIENT_ID:AZURE_CLIENT_SECRET:AZURE_SUBSCRIPTION_ID:AZURE_TENANT_ID

while lsof /var/lib/dpkg/lock; do sleep 1; done

Expand Down
1 change: 1 addition & 0 deletions iterative/testdata/script_template_cloud_gcp.golden
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ sudo tee /usr/bin/cml.sh << 'EOF'
#!/bin/sh
export GOOGLE_APPLICATION_CREDENTIALS_DATA=''
export CML_GCP_ACCESS_TOKEN=''
export CML_RUNNER_SENSITIVE_ENV=GOOGLE_APPLICATION_CREDENTIALS_DATA:CML_GCP_ACCESS_TOKEN

while lsof /var/lib/dpkg/lock; do sleep 1; done

Expand Down
1 change: 1 addition & 0 deletions iterative/testdata/script_template_cloud_kubernetes.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
sudo systemctl is-enabled cml.service && return 0
export KUBERNETES_CONFIGURATION='8 value with "quotes" and spaces'
export CML_RUNNER_SENSITIVE_ENV=KUBERNETES_CONFIGURATION

while lsof /var/lib/dpkg/lock; do sleep 1; done

Expand Down