mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
494727ab39
Also remove a pwd call from the lint, we don't need it anymore.
49 lines
2.1 KiB
Plaintext
49 lines
2.1 KiB
Plaintext
pipeline {
|
|
agent { label 'kitchen-slave' }
|
|
environment {
|
|
SALT_KITCHEN_PLATFORMS = "/var/jenkins/workspace/platforms.yml"
|
|
SALT_KITCHEN_DRIVER = "/var/jenkins/workspace/driver.yml"
|
|
PATH = "/usr/local/rbenv/shims/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin"
|
|
RBENV_VERSION = "2.4.2"
|
|
TEST_SUITE = "py2"
|
|
TEST_PLATFORM = "centos-7"
|
|
}
|
|
stages {
|
|
stage('setup') {
|
|
steps {
|
|
sh 'bundle install --with ec2 windows --without opennebula docker'
|
|
}
|
|
}
|
|
stage('run kitchen') {
|
|
steps {
|
|
script { withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', accessKeyVariable: 'AWS_ACCESS_KEY_ID', credentialsId: 'AWS_ACCESS_KEY_ID', secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']]) {
|
|
sshagent(credentials: ['jenkins-testing-ssh-key']) {
|
|
sh 'ssh-add ~/.ssh/jenkins-testing.pem'
|
|
sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM || bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM'
|
|
sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM'
|
|
}
|
|
}}
|
|
archiveArtifacts artifacts: 'artifacts/xml-unittests-output/*.xml'
|
|
}
|
|
post {
|
|
always {
|
|
script { withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', accessKeyVariable: 'AWS_ACCESS_KEY_ID', credentialsId: 'AWS_ACCESS_KEY_ID', secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']]) {
|
|
sshagent(credentials: ['jenkins-testing-ssh-key']) {
|
|
sh 'ssh-add ~/.ssh/jenkins/jenkins-testing.pem'
|
|
sh 'bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM'
|
|
}
|
|
}}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
success {
|
|
githubNotify description: "The centos7-py2 job has passed", status: "SUCCESS"
|
|
}
|
|
failure {
|
|
githubNotify description: "The centos7-py2 job has failed", status: "FAILURE"
|
|
}
|
|
}
|
|
}
|