From 9422d5a100a048c7fbff102ba80a00aaef73f1d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfredo=20Espa=C3=B1a?= Date: Tue, 19 Dec 2023 20:39:06 +0000 Subject: [PATCH] small fixes in logic --- .../api/plugin/scheduler/job/tcl/executor/ExecutorService.java | 3 +++ .../java/org/terrakube/api/plugin/state/RemoteTfeService.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/terrakube/api/plugin/scheduler/job/tcl/executor/ExecutorService.java b/api/src/main/java/org/terrakube/api/plugin/scheduler/job/tcl/executor/ExecutorService.java index bd65e040b..78f94c647 100644 --- a/api/src/main/java/org/terrakube/api/plugin/scheduler/job/tcl/executor/ExecutorService.java +++ b/api/src/main/java/org/terrakube/api/plugin/scheduler/job/tcl/executor/ExecutorService.java @@ -106,6 +106,9 @@ public boolean execute(Job job, String stepId, Flow flow) { if(job.getOverrideBranch() == null) { executorContext.setBranch(job.getWorkspace().getBranch()); } else { + if (job.getOverrideBranch() == "remote-content") { + executorContext.setShowHeader(false); + } executorContext.setBranch(job.getOverrideBranch()); } executorContext.setFolder(job.getWorkspace().getFolder()); diff --git a/api/src/main/java/org/terrakube/api/plugin/state/RemoteTfeService.java b/api/src/main/java/org/terrakube/api/plugin/state/RemoteTfeService.java index 4762bac03..c7e005dc5 100644 --- a/api/src/main/java/org/terrakube/api/plugin/state/RemoteTfeService.java +++ b/api/src/main/java/org/terrakube/api/plugin/state/RemoteTfeService.java @@ -697,7 +697,7 @@ RunsData createRun(RunsData runsData) throws SchedulerException, ParseException if(workspace.getVcs() != null){ log.warn("Workspace is using VCS connection, overriding vcs source and branch to run job using a remote plan"); job.setOverrideBranch("remote-content"); - job.setOverrideBranch(sourceTarGz); + job.setOverrideSource(sourceTarGz); } job = jobRepository.save(job); log.info("Job Created");