Files
java-maven-app/Jenkinsfile
2021-01-04 10:14:43 +00:00

34 lines
857 B
Groovy

#!/usr/bin/env groovy
pipeline {
agent any
stages {
stage('build app') {
steps {
script {
echo "building the application..."
}
}
}
stage('build image') {
steps {
script {
echo "building the docker image..."
}
}
}
stage('deploy') {
environment {
AWS_ACCESS_KEY_ID = credentials('jenkins_aws_access_key_id')
AWS_SECRET_ACCESS_KEY = credentials('jenkins_aws_secret_access_key')
}
steps {
script {
echo 'deploying docker image...'
sh 'kubectl create deployment nginx-deployment --image=nginx'
}
}
}
}
}