switches to declarative syntax

This commit is contained in:
Hyatt 2023-10-29 11:47:50 -05:00
parent a45a7dd617
commit 4e247ed59e
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -3,14 +3,15 @@ def repositoryCreds = "harbor-repository-creds"
def workspace
def latestTag
def label = "kubernetes-${UUID.randomUUID().toString()}"
def templateName = "pipeline-worker"
def outputFile
podTemplate(
label: label,
name: templateName,
yaml: functions.podYaml(
def label = "kubernetes-${UUID.randomUUID().toString()}"
def templateName = "pipeline-worker"
pipeline {
agent {
kubernetes{
yaml functions.podYaml(
repo: repository,
templateName: templateName,
alpine: true,
@ -22,8 +23,10 @@ podTemplate(
]
]
)
) {
node (label) {
}
}
stages {
stage ('Initalize Jenkins') {
steps {
script {
@ -63,6 +66,7 @@ podTemplate(
}
stage ("Clone Signal") {
steps {
dir("signal-desktop") {
checkout ([
$class: "GitSCM",
@ -90,8 +94,10 @@ podTemplate(
])
}
}
}
stage ("Build Signal") {
steps {
container ("node-18") {
writeFile(file: workspace + "/test-chamber-13.lan.root.crt", text: functions.getCurrentRootCA())
sh """
@ -113,7 +119,10 @@ podTemplate(
).trim()
}
}
}
stage ('Push Artifacts') {
steps {
functions.pushArtifact(
repoCreds: "nexus-generic-upload-bot",
fileName: outputFile,
@ -121,4 +130,6 @@ podTemplate(
fileURL: "https://nexus.c.test-chamber-13.lan/repository/generic/signal/"
)
}
}
}
}