summaryrefslogtreecommitdiff
path: root/final
diff options
context:
space:
mode:
Diffstat (limited to 'final')
-rw-r--r--final/jenkinsfile35
1 files changed, 35 insertions, 0 deletions
diff --git a/final/jenkinsfile b/final/jenkinsfile
new file mode 100644
index 0000000..75f72e5
--- /dev/null
+++ b/final/jenkinsfile
@@ -0,0 +1,35 @@
+pipeline {
+ agent any
+ stages {
+ stage('Clone Repository') {
+ steps {
+ script {
+ sh 'git clone http://dev.xlinfo.lan/git/iac/incus.git'
+ }
+ }
+ }
+ stage('Terraform Init') {
+ steps {
+ dir('final') {
+ sh 'terraform init'
+ }
+ }
+ }
+ stage('Terraform Apply') {
+ steps {
+ dir('final') {
+ sh 'terraform apply -auto-approve'
+ }
+ }
+ }
+ stage('Run Ansible Playbook') {
+ steps {
+ dir('final') {
+ sh '''
+ ansible-playbook -i hosts lamp.yml
+ '''
+ }
+ }
+ }
+ }
+}