Advertisement
PandaAcademy

Check Tools Jenkinsfile

May 28th, 2022 (edited)
1,070
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.47 KB | None | 0 0
  1. pipeline {
  2.   agent {
  3.     label 'agent'
  4.   }
  5.  
  6.   tools {
  7.     terraform 'Terraform'
  8.   }
  9.  
  10.  stages {
  11.     stage('Test installation') {
  12.       steps {
  13.         sh 'terraform --version'
  14.         sh 'ansible --version'        
  15.       }
  16.     }
  17.     stage('Test credentials') {
  18.       steps {
  19.         withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: 'AWS']])
  20.           {
  21.             sh 'env|grep AWS'
  22.           }      
  23.        }
  24.     }
  25.   }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement