Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 52 additions & 30 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,69 +1,78 @@


pipeline {
agent {
label ("node1 || node2 || node3 || node4 || node5 || branch || main || jenkins-node || docker-agent || jenkins-docker2 || preproduction || production")
}

agent {
label ("node1 || node2 || node3 || node4 || node5 || branch || main || jenkins-node || docker-agent || jenkins-docker2 || preproduction || production")
}

options {
buildDiscarder(logRotator(numToKeepStr: '20'))
buildDiscarder(logRotator(numToKeepStr: '2'))
disableConcurrentBuilds()
timeout (time: 60, unit: 'MINUTES')
timestamps()
}
}

stages {
stage('Setup parameters') {

stage('Setup parameters') {
steps {
script {
properties([
parameters([
parameters([

choice(
choices: ['Dev', 'Sanbox','Prod'],
name: 'Environment'
),
choices: ['dev', 'sanbox', 'prod'],
name: 'Environment'

),


string(
defaultValue: 's4user',
name: 'User',
description: 'Required to enter your name',
defaultValue: 'yvan',
name: 'User-yvan',
description: 'Enter the image Tag to deploy',
trim: true
),
),

string(
defaultValue: 'eric-001',
defaultValue: 'yvan',
name: 'DB-Tag',
description: 'Required to enter the image tag',
description: 'Enter the image Tag to deploy',
trim: true
),
),


string(
defaultValue: 'eric-001',
defaultValue: 'yvan',
name: 'UI-Tag',
description: 'Required to enter the image tag',
description: 'Enter the image Tag to deploy',
trim: true
),
),


string(
defaultValue: 'eric-001',
defaultValue: 'yvan',
name: 'WEATHER-Tag',
description: 'Required to enter the image tag',
description: 'Enter the image Tag to deploy',
trim: true
),
),

string(
defaultValue: 'eric-001',
string(
defaultValue: 'yvan',
name: 'AUTH-Tag',
description: 'Required to enter the image tag',
description: 'Enter the image Tag to deploy',
trim: true
),
),

])
])
}
}
}






stage('Hello') {
steps {
sh '''
Expand All @@ -73,4 +82,17 @@ options {
}
}
}

post {

success {
slackSend (channel: '#development-alerts', color: 'good', message: "the job pass")
}

failure {
slackSend (channel: '#development-alerts', color: '#FF0000', message: "the job faille")
}
}


}