Skip to content

Instantly share code, notes, and snippets.

@niraj-shah
niraj-shah / aws-security.sh
Last active February 13, 2023 23:52
Shell Script to update AWS EC2 Security Groups with Fixed and Current IPs for a given Port, using `aws ec2` command line
#!/bin/bash
# Shell Script to Update AWS EC2 Security Groups
# Note that existing IP rules will be deleted
# CONFIG - Only edit the below lines to setup the script
# ===============================
# AWS Profile Name
profile="name1"
@m-x-k
m-x-k / pipelineChooseDockerTags.groovy
Created November 16, 2016 22:05
Jenkins pipeline - choose docker tags
/*
* Displays input dropdown select containing docker image tags
* Manage Jenkins->Script Approval (required)
*/
node {
stage('chooseDockerTags') {
def image = "IMAGE"
def url = "https://LOCAL-DOCKER-REG:5000/v2/${image}/tags/list"
def list = getDockerImageTags(url)