Skip to content

Instantly share code, notes, and snippets.

@ben-mcclain
ben-mcclain / JENKINS_JOB_DSL_VS_JENKINSFILE.md
Last active January 6, 2022 22:28
The Jenkins job DSL is different than a job's declarative actions

The Jenkins job DSL is different than a job's declarative actions

Recently, I was trying to add a new job to our Jenkins using Jenkins Configuration as Code. When refreshing the CASC, I was greeted with this beautiful error:

javaposse.jobdsl.dsl.helpers.BuildParametersContext.choice() is applicable for argument types: (java.util.LinkedHashMap)

While not too helpful, it does indicate this has to do with a choice type parameter.

Troubleshooting

@ben-mcclain
ben-mcclain / tag_snapshots_volumes.py
Last active March 5, 2019 15:00 — forked from brandond/function.py
Python script to auto-tag AWS EBS Snapshots and Volumes using AMI and Instance tags
import copy
import logging
import os
import boto3
logging.basicConfig(level=os.environ.get('LOG_LEVEL', 'INFO'))
ec2 = boto3.client('ec2')
logger = logging.getLogger(__name__)