From 5fdcae12d13216a8c71118cfb1d04e6247364d28 Mon Sep 17 00:00:00 2001 From: Nelson Roberts Date: Tue, 20 Dec 2016 10:50:40 -0700 Subject: [PATCH] working on testing pipline step --- Jenkinsfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d7c885b..122d27b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ stage('validate') { } stage('build') { node { - packer 'build -color=false -var-file=us-west-1.json packer_ami.json | tee packer_ami.log' + // packer 'build -color=false -var-file=us-west-1.json packer_ami.json | tee packer_ami.log' } } @@ -40,8 +40,14 @@ stage('tag') { stage('test') { node { + aws_tag ( + resources: ami_id(), + tags: "\ + 'Key=state,Value=testing' \ + region: 'us-west-1' + ) sh "ssh-keygen -q -t rsa -f jenkins_testing -N ''" - terraform apply "-var 'key_name=jenkins-testing' -var 'public_key_path=jenkins_tesing.pub' -var 'aws_ami=${ami_id()}'" + terraform "apply -var key_name=jenkins-testing -var public_key_path=jenkins_tesing.pub -var aws_ami=${ami_id()}" } }