Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f35c675
commit 935cb82
Showing
11 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.swp | ||
*.tmp | ||
*.temp | ||
.git* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[environments] | ||
[environments.development] | ||
name = "sweet-stingeray" | ||
namespace = "default" | ||
wait = false | ||
watch = false | ||
watch_delay = 2 |