-
Notifications
You must be signed in to change notification settings - Fork 1
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
b9206c7
commit bedd4f0
Showing
14 changed files
with
113 additions
and
36 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
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
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,33 @@ | ||
#!/bin/bash | ||
|
||
pact-broker create-webhook \ | ||
$JENKINS_HTTPS_URL/job/gateway/job/master/buildWithParameters?PACT_VERIFY=true \ | ||
--request=POST \ | ||
--contract-content-changed \ | ||
--consumer=AuthService \ | ||
--provider=Gateway \ | ||
--user=$JENKINS_USERNAME:$JENKINS_USERTOKEN \ | ||
--broker-base-url=$PACT_BROKER_URL \ | ||
--broker-token=$PACT_BROKER_TOKEN | ||
# declare PROVIDER_JOB_MAP=(\ | ||
# ["GroupService"]="group-service" \ | ||
# ["AuthService"]="auth-service" | ||
# ) | ||
# consumer=AuthService | ||
# providers=(GroupService AuthService) | ||
|
||
# for provider in ${providers[@]}; do | ||
# echo $provider | ||
# echo "${PROVIDER_JOB_MAP[provider]}"x | ||
# done; | ||
# for provider in ${providers[@]}; do | ||
# pact-broker create-webhook \ | ||
# $JENKINS_HTTPS_URL/job/test/buildWithParameters?PACT_VERIFY=true \ | ||
# --request=POST \ | ||
# --contract-content-changed \ | ||
# --consumer=$consumer \ | ||
# --provider=$provider \ | ||
# --user=$JENKINS_USERNAME:$JENKINS_USERTOKEN \ | ||
# --broker-base-url=$PACT_BROKER_URL \ | ||
# --broker-token=$PACT_BROKER_TOKEN | ||
# done; |
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,9 @@ | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
const yaml = require("js-yaml"); | ||
|
||
exports.getImages = function(yamlFile) { | ||
const doc = yaml.safeLoad(fs.readFileSync(path.resolve(yamlFile), "utf8")); | ||
const images = doc.images.map(a => `${a.name}:${a.newTag}`); | ||
return images.join(" "); | ||
}; |
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,12 @@ | ||
const path = require("path"); | ||
|
||
const { getImages } = require("./getImages"); | ||
|
||
describe("getImages", () => { | ||
test("getImages works", () => { | ||
const r = getImages( | ||
path.resolve(__dirname + "/__tests__/kustomization.yaml") | ||
); | ||
expect(r).toMatchInlineSnapshot(`"alpine:3.7 hashicorp/http-echo:0.2.3"`); | ||
}); | ||
}); |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.