diff --git a/Dockerfile b/Dockerfile index 0442e5e6..39f19a9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -78,7 +78,7 @@ RUN addgroup \ # Copy the binary to the production image from the builder stage COPY --from=builder /workspace/bin/burrito /usr/local/bin/burrito -RUN mkdir -p /runner +RUN mkdir -p /runner/bin RUN chmod +x /usr/local/bin/burrito RUN chown -R burrito:burrito /runner diff --git a/internal/runner/terragrunt/terragrunt.go b/internal/runner/terragrunt/terragrunt.go index 1aa70703..f49dbfda 100644 --- a/internal/runner/terragrunt/terragrunt.go +++ b/internal/runner/terragrunt/terragrunt.go @@ -13,6 +13,10 @@ import ( "github.com/padok-team/burrito/internal/runner/terraform" ) +const ( + BinWorkDir = "/runner/bin" +) + type Terragrunt struct { execPath string planArtifactPath string @@ -122,7 +126,7 @@ func downloadTerragrunt(version string) (string, error) { } defer response.Body.Close() - filename := fmt.Sprintf("terragrunt_%s", cpuArch) + filename := fmt.Sprintf("%s/terragrunt_%s", BinWorkDir, cpuArch) file, err := os.Create(filename) if err != nil { return "", err