Skip to content

Commit

Permalink
added JetBrains Space pipeline config
Browse files Browse the repository at this point in the history
  • Loading branch information
kamikaze committed Dec 23, 2022
1 parent 53f73b4 commit 4ca297d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .space.kts
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}

0 comments on commit 4ca297d

Please sign in to comment.