Skip to content

Commit

Permalink
Move runner startup script under the right heredoc (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 authored Jan 19, 2022
1 parent 082cde9 commit b2c7c2c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions iterative/resource_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,6 @@ func renderScript(data map[string]interface{}) (string, error) {
sudo npm config set user 0 && sudo npm install --global @dvcorg/cml
{{- end}}
{{- if .runner_startup_script}}
{{.runner_startup_script}}
{{- end}}
{{- if not .container}}
sudo tee /usr/bin/cml.sh << 'EOF'
#!/bin/sh
Expand All @@ -331,6 +327,10 @@ export KUBERNETES_CONFIGURATION={{escape .KUBERNETES_CONFIGURATION}}
{{- end}}
{{- end}}
{{- if .runner_startup_script}}
{{.runner_startup_script}}
{{- end}}
HOME="$(mktemp -d)" exec cml-runner \
{{if .name}} --name {{escape .name}}{{end}} \
{{if .labels}} --labels {{escape .labels}}{{end}} \
Expand Down

0 comments on commit b2c7c2c

Please sign in to comment.