This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker-compose pull | |
docker-compose up --force-recreate --build -d | |
docker image prune -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function create_merge_pipeline() { | |
local repo=$1 | |
local pipeline=$2 | |
local command=$3 | |
echo "Creating merge pipeline: $pipeline ..." | |
curl -X POST "https://api.buildkite.com/v2/organizations/a-cloud-guru/pipelines" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eou pipefail | |
CURRENT_DIR=$(pwd) | |
ROOT_DIR="$( dirname "${BASH_SOURCE[0]}" )"/.. | |
BUCKET_NAME="buildkite-secrets-adikari" | |
KEY="id_rsa_buildkite" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir buildkite-monorepo-example | |
cd buildkite-monorepo-example | |
git init | |
echo node_modules/ > .gitignore | |
git add . | |
git commit -m "initialize repository" | |
git remote add origin <YOUR_GITHUB_REPO_URL> | |
git push origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
[ -z $BUILDKITE_AGENT_TOKEN ] && { echo "BUILDKITE_AGENT_TOKEN is not set."; exit 1;} | |
CURRENT_DIR=$(pwd) | |
ROOT_DIR="$( dirname "${BASH_SOURCE[0]}" )"/.. | |
PARAMETERS=$(cat ./bin/stack-config | envsubst) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./bin/deploy-ci-stack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir bin | |
cd bin | |
touch create-pipeline create-secrets-bucket deploy-ci-stack | |
chmod +x ./* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
export SERVICE="." | |
export PIPELINE_TYPE="" | |
export [email protected]:adikari/buildkite-docker-example.git | |
CURRENT_DIR=$(pwd) | |
ROOT_DIR="$( dirname "${BASH_SOURCE[0]}" )"/.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "$PIPELINE_NAME", | |
"description": "Pipeline for $PIPELINE_NAME pull requests", | |
"repository": "$REPOSITORY", | |
"default_branch": "", | |
"steps": [ | |
{ | |
"type": "script", | |
"name": ":buildkite: $PIPELINE_TYPE", | |
"command": "buildkite-agent pipeline upload $SERVICE/.buildkite/$PIPELINE_TYPE.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "$PIPELINE_NAME", | |
"description": "Pipeline for $PIPELINE_NAME merge", | |
"repository": "$REPOSITORY", | |
"default_branch": "master", | |
"steps": [ | |
{ | |
"type": "script", | |
"name": ":buildkite: $PIPELINE_TYPE", | |
"command": "buildkite-agent pipeline upload $SERVICE/.buildkite/$PIPELINE_TYPE.yml" |