From b2c7c2c7de67de6f2014fe05d5215f32bce6d355 Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Wed, 19 Jan 2022 09:42:08 +0100 Subject: [PATCH] Move runner startup script under the right heredoc (#370) --- iterative/resource_runner.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iterative/resource_runner.go b/iterative/resource_runner.go index b5721a1e..52ee0e03 100644 --- a/iterative/resource_runner.go +++ b/iterative/resource_runner.go @@ -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 @@ -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}} \