forked from saha-rajdeep/devopscourse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
02_wordpress_Jenkinsfile
28 lines (28 loc) · 1.41 KB
/
02_wordpress_Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
pipeline {
agent any
parameters {
string(name: 'STACK_NAME', defaultValue: 'example-stack', description: 'Enter the CloudFormation Stack Name.')
string(name: 'PARAMETERS_FILE_NAME', defaultValue: 'example-stack-parameters.properties', description: 'Enter the Parameters File Name (Must contain file extension type *.properties)')
string(name: 'TEMPLATE_NAME', defaultValue: '01_s3cft.yml', description: 'Enter the CloudFormation Template File Name')
choice(
name: 'REGION',
choices: [
' ',
'us-east-1',
'us-east-2',
'us-west-2'
],
description: 'AWS Account Region'
)
}
stages {
stage('Submit Stack') {
steps {
//sh "cat 02_wordpress.json"
//sh "aws cloudformation deploy --stack-name ${STACK_NAME} --template-file ${TEMPLATE_NAME} --region 'us-west-2' --parameter-overrides DBPassword=abcd1234 DBRootPassword=abcd1234 DBUser=admin KeyName=minikubetest"
//sh "aws cloudformation deploy --stack-name wordpress-test01 --template-file 02_wordpress.json --region 'us-west-2' --parameter-overrides file://02_wordpress_parameter.properties"
sh "aws cloudformation deploy --stack-name ${STACK_NAME} --template-file ${TEMPLATE_NAME} --region ${REGION} --parameter-overrides file://${PARAMETERS_FILE_NAME}"
}
}
}
}