Files
java-maven-app/Jenkinsfile
2020-12-04 19:11:10 +01: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'
}
}
}
}
}