How to: CI/CD - Continuous Integration / Continuous Deployment
`jenkins/`, `terraform/`, `teamcity/`, `buildkite/`, `circlci/`, `travis/`, `azure_devops/`, ...,  `cicd/` directories:

- `appveyor_api.sh` - queries [AppVeyor](https://www.appveyor.com/)'s API with authentication
- `azure_devops/*.sh` - [Azure DevOps](https://dev.azure.com/) scripts:
  - `azure_devops_api.sh` - queries Azure DevOps's API with authentication
  - `azure_devops_foreach_repo.sh` - executes a templated command for each Azure DevOps repo, replacing `{user}`, `{org}`, `{project}` and `{repo}` in each iteration
  - `azure_devops_to_github_migration.sh` - migrates one or all Azure DevOps git repos to GitHub, including all branches and sets the default branch to match via the APIs to maintain the same checkout behaviour
  - `azure_devops_disable_repos.sh` - disables one or more given Azure DevOps repos (to prevent further pushes to them after migration to GitHub)
- `circleci/*.sh` - [CircleCI](https://circleci.com/) scripts:
  - `circleci_api.sh` - queries CircleCI's API with authentication
  - `circleci_project_set_env_vars.sh` - adds / updates CircleCI project-level environment variable(s) via the API from `key=value` or shell export format, as args or via stdin (eg. piped from `aws_csv_creds.sh`)
  - `circleci_context_set_env_vars.sh` - adds / updates CircleCI context-level environment variable(s) via the API from `key=value` or shell export format, as args or via stdin (eg. piped from `aws_csv_creds.sh`)
  - `circleci_project_delete_env_vars.sh` - deletes CircleCI project-level environment variable(s) via the API
  - `circleci_context_delete_env_vars.sh` - deletes CircleCI context-level environment variable(s) via the API
  - `circleci_local_execute.sh` - installs CircleCI CLI and executes `.circleci/config.yml` locally
  - `circleci_public_ips.sh` - lists [CircleCI](https://circleci.com) public IP addresses via dnsjson.com
- `codeship_api.sh` - queries [CodeShip](https://codeship.com/)'s API with authentication
- `drone_api.sh` - queries [Drone.io](https://drone.io/)'s API with authentication
- `shippable_api.sh` - queries [Shippable](https://www.shippable.com/)'s API with authentication
- `wercker_app_api.sh` - queries [Wercker](https://app.wercker.com/)'s Applications API with authentication
- `gocd_api.sh` - queries [GoCD](https://www.gocd.org/)'s API
- `gocd.sh` - one-touch [GoCD CI](https://www.gocd.org/):
  - launches in Docker
  - (re)creates config repo (`$PWD/setup/gocd_config_repo.json`) from which to source pipeline(s) (`.gocd.yml`)
  - detects and enables agent(s) to start building
  - call from any repo top level directory with a `.gocd.yml` config (all mine have it), mimicking structure of fully managed CI systems
- `concourse.sh` - one-touch [Concourse CI](https://concourse-ci.org/):
  - launches in Docker
  - configures pipeline from `$PWD/.concourse.yml`
  - triggers build
  - tails results in terminal
  - prints recent build statuses at end
  - call from any repo top level directory with a `.concourse.yml` config (all mine have it), mimicking structure of fully managed CI systems
- `fly.sh` - shortens [Concourse](https://concourse-ci.org/) `fly` command to not have to specify target all the time
- `jenkins/*.sh` - [Jenkins CI](https://jenkins.io/) scripts:
  - `jenkins.sh` - one-touch [Jenkins CI](https://jenkins.io/):
    - launches Docker container
    - installs plugins
    - validates `Jenkinsfile`
    - configures job from `$PWD/setup/jenkins-job.xml`
    - sets Pipeline to git remote origin's `Jenkinsfile`
    - triggers build
    - tails results in terminal
    - call from any repo top level directory with a `Jenkinsfile` pipeline and `setup/jenkins-job.xml` (all mine have it)
  - `jenkins_api.sh` - queries the Jenkins Rest API, handles authentication, pre-fetches CSFR protection token crumb, supports many environment variables such as `$JENKINS_URL` for ease of use
    - `jenkins_jobs.sh` - lists Jenkins jobs (pipelines)
    - `jenkins_foreach_job.sh` - runs a templated command for each Jenkins job
    - `jenkins_jobs_download_configs.sh` - downloads all Jenkins job configs to xml files of the same name
    - `jenkins_job_config.sh` - gets or sets a Jenkins job's config
    - `jenkins_job_description.sh` - gets or sets a Jenkins job's description
    - `jenkins_job_enable.sh` - enables a Jenkins job by name
    - `jenkins_job_disable.sh` - disables a Jenkins job by name
    - `jenkins_job_trigger.sh` - triggers a Jenkins job by name
    - `jenkins_job_trigger_with_params.sh` - triggers a Jenkins job with parameters which can be passed as `--data KEY=VALUE`
    - `jenkins_jobs_enable.sh` - enables all Jenkins jobs/pipelines with names matching a given regex
    - `jenkins_jobs_disable.sh` - disables all Jenkins jobs/pipelines with names matching a given regex
    - `jenkins_builds.sh` - lists Jenkins latest builds for every job
    - `jenkins_cred_add_cert.sh` - creates a Jenkins certificate credential from a PKCS#12 keystore
    - `jenkins_cred_add_kubernetes_sa.sh` -