Skip to content

Commit

Permalink
Merge pull request #1 from fluent-ci-templates/fix/delete-plan-after-…
Browse files Browse the repository at this point in the history
…tf-apply

fix: delete `tfplan` file after applying changes
  • Loading branch information
tsirysndr authored Sep 1, 2023
2 parents c9a3fef + aadc29c commit 78cdd2b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dagger/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ export const apply = async (client: Client, src = ".") => {
const result = await ctr.stdout();

console.log(result);

await client
.pipeline("clear_plan")
.container()
.from("alpine")
.withMountedCache("/app/plan", client.cacheVolume("tfplan"))
.withExec(["sh", "-c", "rm -rf /app/plan/*"])
.stdout();
};

export type JobExec = (
Expand Down

0 comments on commit 78cdd2b

Please sign in to comment.