Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions brigade.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// test ci example
const { events, Job, Group } = require('brigadier')

const helmTag = "v2.8.2"

function gitClone() {
console.log("cloned")
}

function helmDeploy {
console.log("deployed")
}


events.on("push", function(e, project) {
console.log("received push for commit " + e.commit)

gitClone()
helmDeploy()

console.log("complete")

)}
11 changes: 11 additions & 0 deletions brigade/cloud-393/cdtest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
project: "lee-baines/forgeops"
repository: "github.com/lee-baines/forgeops"
cloneURL: "https://github.com/lee-baines/forgeops.git"
# Used by GitHub to compute hooks.
# MAKE SURE YOU CHANGE THIS. It's basically a password.
sharedSecret: "secret_project"
# Use this to have Brigade update your project about the build.
# You probably want this if you want pull requests or commits to show
# the build status.
github:
token: "6180b94f09a5215b949fe0ff870a44487999766b"
16 changes: 16 additions & 0 deletions brigade/cloud-393/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

# helm repo add brigade https://azure.github.io/brigade
NAMESPACE=deployment

kubectl config set-context $(kubectl config current-context) --namespace=$NAMESPACE

helm install -n brigade-server brigade/brigade
helm install -n cdtest brigade/brigade-project -f cdtest.yaml

# authorize service accounts
kubectl create clusterrolebinding brigade --clusterrole cluster-admin --serviceaccount="deployment:brigade-worker"
kubectl create clusterrolebinding brigade --clusterrole cluster-admin --serviceaccount="deployment:brigade-server-brigade-vacuum"
kubectl create clusterrolebinding brigade-ctrl --clusterrole cluster-admin --serviceaccount="deployment:brigade-server-brigade-ctrl"


14 changes: 14 additions & 0 deletions brigade/cloud-393/remove-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

NAMESPACE=deployment

kubectl config set-context $(kubectl config current-context) --namespace=$NAMESPACE

helm delete --purge brigade-server
helm delete --purge cdtest

kubectl delete job --all
kubectl delete pods --all

# afdf
echo "hello"