├── Jenkinsfile └── README.md /Jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline { 2 | agent any 3 | 4 | environment { 5 | APP_NAME = "SIMPLE_APP" 6 | } 7 | 8 | stages { 9 | stage('Stage 1') { 10 | steps { 11 | sh """ 12 | echo "Running Stage 1" 13 | echo "Application Name: \${APP_NAME}" 14 | """ 15 | } 16 | } 17 | 18 | stage('Stage 2') { 19 | steps { 20 | sh 'env | sort' 21 | } 22 | } 23 | 24 | stage('Stage 3') { 25 | steps { 26 | sh ''' 27 | echo "Current directory:" 28 | pwd 29 | echo "Listing files:" 30 | ls -la 31 | ''' 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pipeline-as-code-demo 2 | demo for pipeline as code 3 | --------------------------------------------------------------------------------