Skip to content

Commit

Permalink
Merge pull request #2 from SWCE/issue-1
Browse files Browse the repository at this point in the history
issue #1
  • Loading branch information
regevbr authored Mar 15, 2018
2 parents ea85bd8 + 2ee746a commit 43a6780
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Produce the current timestamp to invalidate the previous version so every build
- "$BUILD_NAME" > build-name
- "$BUILD_JOB_NAME" > build-job-name
- "$BUILD_PIPELINE_NAME" > build-pipeline-name
- "$BUILD_TEAM_NAME" > build-team-name
- "$ATC_EXTERNAL_URL" > atc-external-url

#### Parameters
Expand Down
6 changes: 4 additions & 2 deletions in/in_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ var _ = Describe("In", func() {
"BUILD_NAME=2",
"BUILD_JOB_NAME=3",
"BUILD_PIPELINE_NAME=4",
"ATC_EXTERNAL_URL=5",
"BUILD_TEAM_NAME=5",
"ATC_EXTERNAL_URL=6",
)
})

Expand Down Expand Up @@ -86,7 +87,8 @@ var _ = Describe("In", func() {
checkProp(destination, "build-name", "BUILD_NAME", "2", response.Metadata[1])
checkProp(destination, "build-job-name", "BUILD_JOB_NAME", "3", response.Metadata[2])
checkProp(destination, "build-pipeline-name", "BUILD_PIPELINE_NAME", "4", response.Metadata[3])
checkProp(destination, "atc-external-url", "ATC_EXTERNAL_URL", "5", response.Metadata[4])
checkProp(destination, "build-team-name", "BUILD_TEAM_NAME", "5", response.Metadata[4])
checkProp(destination, "atc-external-url", "ATC_EXTERNAL_URL", "6", response.Metadata[5])
})

})
Expand Down
5 changes: 3 additions & 2 deletions in/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func main() {
fatal("creating destination", err)
}

meta := make(models.Metadata,5)
meta := make(models.Metadata,6)

var request models.InRequest

Expand All @@ -38,7 +38,8 @@ func main() {
handleProp(destination, "build-name", "BUILD_NAME", meta, 1)
handleProp(destination, "build-job-name", "BUILD_JOB_NAME", meta, 2)
handleProp(destination, "build-pipeline-name", "BUILD_PIPELINE_NAME", meta, 3)
handleProp(destination, "atc-external-url", "ATC_EXTERNAL_URL", meta, 4)
handleProp(destination, "build-team-name", "BUILD_TEAM_NAME", meta, 4)
handleProp(destination, "atc-external-url", "ATC_EXTERNAL_URL", meta, 5)

json.NewEncoder(os.Stdout).Encode(models.InResponse{
Version: inVersion,
Expand Down

0 comments on commit 43a6780

Please sign in to comment.