itskingori / jenkins-update-ec2-ami

🤖 Automate updating of the Jenkins EC2 AMI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jenkins-update-ec2-ami

Automate building of the Jenkins EC2 AMI

Usage

In a Jenkinsfile:

node {
 sh './packer build -color=false jenkins_agent_ami.json'
 sh 'JENKINS_API_USERNAME="packer" JENKINS_API_TOKEN="SECRETPASSWORD" python update-ec2-ami.py'
}

EC2_CLOUD_INSTANCE is the name of the Amazong EC2 cloud in the plugin (as seen in the screenshot below). AMI_PROFILE_NAME is the AMI’s “Description” in the EC2 plugin.

Detailed instructions: https://blog.grakn.ai/automated-aws-ami-builds-for-jenkins-agents-with-packer-e569630b1f8e

Credits

About

🤖 Automate updating of the Jenkins EC2 AMI

License:Other


Languages

Language:Python 100.0%