echo quotes are only needed for special characters
quotes are only needed for special characters
' strong quote
By default, the Jenkins checkout plugin wipes the directory before checkout. This configuration allows you to checkout to a seperate directory. SSH authentication to github.
checkout([
$class: 'GitSCM',
branches: [[name: '*/master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'any-directory-name']],
userRemoteConfigs: [[credentialsId: env.SSH_CRED_ID, url: '[email protected]:snixon/myrepo-is-awesome.git']]Create a patch of your Branch with all Trunk changes included, you can move those changes to a new branch. And you can rebase as needed to keep a clean commit history.
git diff Trunk Branch1 > ../patchfile
git checkout Branch2
git apply ../patchfile| # Build container | |
| docker build -t <image-name> . | |
| # GET the WEB instance and access CLI. | |
| docker ps | grep <container-name-id> | cut -c1-12 | read CON_ID; docker exec -it $CON_ID /bin/sh | |
| docker ps | grep <container-name-id> | cut -c1-12 | read CON_ID; docker exec -it $CON_ID /bin/sh | |
| # Run container |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "VisualEditor0", | |
| "Effect": "Allow", | |
| "Action": "ec2:RunInstances", | |
| "Resource": "arn:aws:ec2:*:*:instance/*", | |
| "Condition": { | |
| "StringEqualsIgnoreCase": { |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "VisualEditor0", | |
| "Effect": "Allow", | |
| "Action": "ec2:RunInstances", | |
| "Resource": "arn:aws:ec2:*:*:instance/*", | |
| "Condition": { | |
| "StringEqualsIgnoreCase": { |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "VisualEditor0", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "cloudformation:ListExports", | |
| "sts:DecodeAuthorizationMessage" | |
| ], |
| # Get all IAM actions for Tagging using policy_sentry database. | |
| # Not perfect query because it will include actions that contain 'tAg' --> 'artifact:AcceptAgreement' | |
| policy_sentry query action-table --service all | for i in $(cat); do policy_sentry query action-table --service $i; done | grep -i tag > all-aws-tag-actions.txt |