This commit is contained in:
3 files changed
+17
-14
No files matched your search
@@ -1,11 +1,9 @@
|
||||
local pipeline = import '../drone/pipeline.jsonnet';
|
||||
local build = import '../steps/buildContainerImage.jsonnet';
|
||||
local push = import '../steps/pushContainerImage.jsonnet';
|
||||
local build = import '../steps/buildPushContainerImage.jsonnet';
|
||||
{
|
||||
new(registry,name,tag,dir):: pipeline.new()
|
||||
.withName("Build-Push-Container")
|
||||
.withSteps([
|
||||
build.new(registry,name,tag,dir),
|
||||
push.new(registry,name,tag)
|
||||
build.new(registry,name,tag,dir,true),
|
||||
])
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
local step = import '../drone/step.jsonnet';
|
||||
|
||||
{
|
||||
new(registry,name,tag,dir):: step.new("Build and Push Container Image", "quay.io/buildah/stable")
|
||||
.withPrivileged()
|
||||
.withCommands([
|
||||
"cd " + dir + ";" + "buildah bud -t " + registry.hostname + "/" + name + ":" + tag,
|
||||
])
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
local step = import '../drone/step.jsonnet';
|
||||
|
||||
{
|
||||
new(registry,name,tag,dir,push=false):: step.new("Build and Push Container Image", "quay.io/buildah/stable")
|
||||
.withPrivileged()
|
||||
.withCommands([
|
||||
"cd " + dir + ";" + "buildah bud -t " + registry.hostname + "/" + name + ":" + tag,
|
||||
] +
|
||||
if push then [
|
||||
"buildah push --all " + registry.hostname + "/" + name + ":" + tag + " docker://" + registry.hostname + "/" + name + ":" + tag
|
||||
] else []
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user