Instructions on how to setup a secured Jenkins CI on a Mac.
All of these operations are done with your admin user.
Install the command line developer tools.
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "github.com/gorilla/websocket" | |
| "io" | |
| "log" | |
| "net/http" | |
| "os/exec" |
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" | |
| "time" | |
| ) |
| # Add the following 'help' target to your Makefile | |
| # And add help text after each target name starting with '\#\#' | |
| help: ## Show this help. | |
| @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
| # Everything below is an example | |
| target00: ## This message will show up when typing 'make help' | |
| @echo does nothing |
| // AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt | |
| // ---------------------------------------------------------------------------------------- | |
| // the encrypted datablock is base64 encoded for easy data exchange. | |
| // if you have the option to store data binary save consider to remove the encoding to reduce storage size | |
| // ---------------------------------------------------------------------------------------- | |
| // format of encrypted data - used by this example. not an official format | |
| // | |
| // +--------------------+-----------------------+----------------+----------------+ | |
| // | SALT | Initialization Vector | Auth Tag | Payload | | |
| // | Used to derive key | AES GCM XOR Init | Data Integrity | Encrypted Data | |
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
| #!/usr/bin/env bash -x | |
| # set -x | |
| export AWS_DEFAULT_REGION=us-east-1 | |
| lang=en | |
| account_id=$(aws sts get-caller-identity | jq -r '.Account') | |
| aws support describe-trusted-advisor-checks \ | |
| --language $lang \ |