Skip to content

Commit

Permalink
fixing the event name as it needs to contain the stage when triggerin…
Browse files Browse the repository at this point in the history
…g a sequence

Signed-off-by: Andreas Grabner <[email protected]>
  • Loading branch information
grabnerandi committed May 21, 2021
1 parent 780d552 commit 6606595
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@ The KEPTN_BRIDGE is the link to your keptn bridge so that the Library can genera
Once you have everything configured use it in your Jenkins Pipeline like this

```groovy
@Library('keptn-library@1.0')
@Library('keptn-library@4.0')
import sh.keptn.Keptn
def keptn = new sh.keptn.Keptn()
// Initialize Keptn: "Link" it to your Jenkins Pipeline
// -------------------------------------------
// initialize keptn: will store project, service and stage in a local context file so you don't have to pass it to all other functions
keptn.keptnInit project:"yourkeptnproject", service:"yourkeptnservice", stage:"yourkeptnstage"
keptn.keptnInit project:"yourproject", service:"yourservice", stage:"yourstage"
// initialize keptn with Shipyard: if a shipyard file is passed keptnInit will also make sure this project is created in Keptn
// This allows you to automatically create a Keptn project for your Jenkins pipeline w/o having to do anything with Keptn directly
keptn.keptnInit project:"yourkeptnproject", service:"yourkeptnservice", stage:"yourkeptnstage", shipyard:'shipyard.yaml'
keptn.keptnInit project:"yourproject", service:"yourservice", stage:"yourstage", shipyard:'shipyard.yaml'
// Upload your SLIs, SLOs, Test Scripts ... to Keptn
Expand Down
2 changes: 1 addition & 1 deletion src/sh/keptn/Keptn.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ def sendStartEvaluationEvent(Map args) {
| "datacontenttype": "application/json",
| "source": "Jenkins",
| "specversion": "1.0",
| "type": "sh.keptn.event.evaluation.triggered"
| "type": "sh.keptn.event.${stage}.evaluation.triggered"
|}
""".stripMargin()

Expand Down

0 comments on commit 6606595

Please sign in to comment.