47 lines
1.1 KiB
Groovy
47 lines
1.1 KiB
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Checkout'){
|
|
steps {
|
|
git credentialsId: '3e336704-7d58-4dcb-88b6-1ef7b5392576', url: 'https://git.fet.at/andis/triton2_config.git'
|
|
}
|
|
|
|
}
|
|
stage('build') {
|
|
steps{
|
|
script {
|
|
app = docker.build("openrestyfetfull")
|
|
}
|
|
}
|
|
}
|
|
stage('Test Inside') {
|
|
steps{
|
|
script {
|
|
app.inside("-u root:root") {
|
|
sh '/usr/local/openresty/bin/openresty -t'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
stage('Deploy Image') {
|
|
steps{
|
|
script {
|
|
docker.withRegistry( 'https://docker.fet.at', '3e336704-7d58-4dcb-88b6-1ef7b5392576') {
|
|
app.push("$BUILD_NUMBER")
|
|
app.push('latest')
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
tage('Recreate Live System') {
|
|
steps{
|
|
script {
|
|
httpRequest httpMode: 'POST', ignoreSslErrors: true, responseHandle: 'NONE', url: 'https://portainer.luna.fet.at/api/webhooks/42fc5252-796d-4bc5-b788-05e209bde44a', wrapAsMultipart: false
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}} |