72 lines
2.5 KiB
Groovy
72 lines
2.5 KiB
Groovy
properties([parameters([[$class: 'DynamicReferenceParameter', choiceType: 'ET_FORMATTED_HTML', name: 'General', omitValueField: false, randomName: 'choice-parameter-517572555514769', referencedParameters: '', script: [$class: 'GroovyScript', fallbackScript: [classpath: [], oldScript: '', sandbox: false, script: ''], script: [classpath: [], oldScript: '', sandbox: false,
|
|
script: '''
|
|
test="hallo"
|
|
vappHtml = """
|
|
<ul style="list-style-type: none">
|
|
<li style="padding: 5px">
|
|
<label>${test}</label>
|
|
<input type="text" class="jenkins-input" name="value">
|
|
</li>
|
|
</ul>
|
|
|
|
"""
|
|
|
|
return vappHtml
|
|
|
|
''']]]])])
|
|
pipeline {
|
|
agent {
|
|
label 'terraform-slave'
|
|
}
|
|
|
|
parameters {
|
|
booleanParam(name: 'refresh', defaultValue: false, description: 'Refresh pipeline properties')
|
|
}
|
|
// environment {
|
|
// //KUBECONFIG = credentials('kubernetes-config')
|
|
// }
|
|
stages {
|
|
// stage('test') {
|
|
// steps {
|
|
// sh 'python --version'
|
|
// }
|
|
// }
|
|
stage('Refresh properties') {
|
|
if (Refresh) {
|
|
currentBuild.result = 'ABORTED'
|
|
error('Stopping early…')
|
|
}
|
|
}
|
|
stage('TF Plan') {
|
|
// agent {
|
|
// docker {
|
|
// image 'hashicorp/terraform:latest'
|
|
// // Run the container on the node specified at the
|
|
// // top-level of the Pipeline, in the same workspace,
|
|
// // rather than on a new node entirely:
|
|
// args '--entrypoint="" -u root -v /opt/jenkins/.aws:/root/.aws'
|
|
|
|
// }
|
|
// }
|
|
steps {
|
|
container('terraform') {
|
|
withCredentials([[
|
|
$class: 'AmazonWebServicesCredentialsBinding',
|
|
credentialsId: "f89b3f7d-23ec-42b9-9687-e4acf01d7507",
|
|
accessKeyVariable: 'AWS_ACCESS_KEY_ID',
|
|
secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']]) {
|
|
sh 'terraform version'
|
|
sh 'terraform init'
|
|
//sh 'terraform apply -auto-approve'
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
// stage('Deploy Helm chart') {
|
|
// steps {
|
|
// sh "helm install ingress-nginx ./deploy/charts/ingress-nginx --namespace ingress-nginx --set controller.publishService.enabled=true --set controller.service.loadBalancerIP=${env.LB_IP}"
|
|
// }
|
|
// }
|
|
}
|
|
} |