From 4ca297d6e39d5cf1c390e51aef3bac49b16ee849 Mon Sep 17 00:00:00 2001 From: Oleg Korsak Date: Fri, 23 Dec 2022 20:51:43 +0200 Subject: [PATCH] added JetBrains Space pipeline config --- .space.kts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .space.kts diff --git a/.space.kts b/.space.kts new file mode 100644 index 0000000..fb7b609 --- /dev/null +++ b/.space.kts @@ -0,0 +1,24 @@ +job("Build") { + kaniko { + beforeBuildScript { + // Create an env variable BRANCH, + // use env var to get full branch name, + // leave only the branch name without the 'refs/heads/' path + content = """ + export BRANCH=${'$'}(echo ${'$'}JB_SPACE_GIT_BRANCH | cut -d'/' -f 3) + export REVISION=${'$'}(echo ${'$'}JB_SPACE_GIT_REVISION | cut -c0-8) + """ + } + build { + context = "." + dockerfile = "Dockerfile" + labels["vendor"] = "bixority" + } + + push("bixority.registry.jetbrains.space/p/ok/containers/${"$"}JB_SPACE_GIT_REPOSITORY_NAME") { + tags { + +"${"$"}BRANCH-${"$"}REVISION" + } + } + } +}