Skip to content

Commit

Permalink
Fixed for draft
Browse files Browse the repository at this point in the history
  • Loading branch information
technosophos committed Oct 16, 2017
1 parent f35c675 commit 935cb82
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .draftignore
@@ -0,0 +1,4 @@
*.swp
*.tmp
*.temp
.git*
23 changes: 18 additions & 5 deletions acid.js
@@ -1,12 +1,25 @@
const {events, Job} = require("libacid")

events.on("imagePush", (e, p) => {
var name = "helm-hello"
// run a Helm build
helm := new Job("helm", "lachlanevenson/k8s-helm:latest")
var name = "example-hello"
var docker = JSON.parse(e.payload)
var version = docker.push_data.tag || "dev"

var helm = new Job("helm", "lachlanevenson/k8s-helm:latest")
helm.tasks = [
"helm upgrade --install " + name + " charts/helm-hello"
"helm upgrade --set tag=" + version + " --install " + name + " /src/charts/helm-hello"
]

helm.run()
var slack = new Job("slack-notify", "technosophos/slack-notify:latest", ["/slack-notify"])

helm.run().then( result => {
slack.env = {
SLACK_WEBHOOK: project.secrets.SLACK_WEBHOOK,
SLACK_USERNAME: "AcidBot",
SLACK_TITLE: ":helm: upgraded " + name,
SLACK_MESSAGE: result.toString() + " <https://" + project.repo.name + ">",
SLACK_COLOR: "#0000ff"
}
slack.run()
})
})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -3,7 +3,7 @@
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: technosophos/helm-hello
repository: technosophos/hello-helm
tag: dev
pullPolicy: IfNotPresent
service:
Expand Down
7 changes: 7 additions & 0 deletions draft.toml
@@ -0,0 +1,7 @@
[environments]
[environments.development]
name = "sweet-stingeray"
namespace = "default"
wait = false
watch = false
watch_delay = 2

0 comments on commit 935cb82

Please sign in to comment.