-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add timestamp fields to resource objects
Update CRDs to include timestamp fields. Add timestamp fields for Git and Bundle results.
- Loading branch information
1 parent
e4f2965
commit 414bd83
Showing
13 changed files
with
245 additions
and
88 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
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
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
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 |
---|---|---|
|
@@ -36,31 +36,26 @@ var _ = Describe("Git", func() { | |
}) | ||
|
||
It("adds results for the commit sha, commit author and branch name", func() { | ||
Expect(len(taskSpec.Results)).To(Equal(3)) | ||
Expect(len(taskSpec.Results)).To(Equal(4)) | ||
Expect(taskSpec.Results[0].Name).To(Equal("shp-source-default-commit-sha")) | ||
Expect(taskSpec.Results[1].Name).To(Equal("shp-source-default-commit-author")) | ||
Expect(taskSpec.Results[2].Name).To(Equal("shp-source-default-branch-name")) | ||
Expect(taskSpec.Results[2].Name).To(Equal("shp-source-default-commit-timestamp")) | ||
Expect(taskSpec.Results[3].Name).To(Equal("shp-source-default-branch-name")) | ||
}) | ||
|
||
It("adds a step", func() { | ||
Expect(len(taskSpec.Steps)).To(Equal(1)) | ||
Expect(taskSpec.Steps[0].Name).To(Equal("source-default")) | ||
Expect(taskSpec.Steps[0].Image).To(Equal(cfg.GitContainerTemplate.Image)) | ||
Expect(taskSpec.Steps[0].Args).To(Equal([]string{ | ||
"--url", | ||
"https://github.com/shipwright-io/build", | ||
"--target", | ||
"$(params.shp-source-root)", | ||
"--result-file-commit-sha", | ||
"$(results.shp-source-default-commit-sha.path)", | ||
"--result-file-commit-author", | ||
"$(results.shp-source-default-commit-author.path)", | ||
"--result-file-branch-name", | ||
"$(results.shp-source-default-branch-name.path)", | ||
"--result-file-error-message", | ||
"$(results.shp-error-message.path)", | ||
"--result-file-error-reason", | ||
"$(results.shp-error-reason.path)", | ||
"--url", "https://github.com/shipwright-io/build", | ||
"--target", "$(params.shp-source-root)", | ||
"--result-file-commit-sha", "$(results.shp-source-default-commit-sha.path)", | ||
"--result-file-commit-author", "$(results.shp-source-default-commit-author.path)", | ||
"--result-file-commit-timestamp", "$(results.shp-source-default-commit-timestamp.path)", | ||
"--result-file-branch-name", "$(results.shp-source-default-branch-name.path)", | ||
"--result-file-error-message", "$(results.shp-error-message.path)", | ||
"--result-file-error-reason", "$(results.shp-error-reason.path)", | ||
})) | ||
}) | ||
}) | ||
|
@@ -83,10 +78,11 @@ var _ = Describe("Git", func() { | |
}) | ||
|
||
It("adds results for the commit sha, commit author and branch name", func() { | ||
Expect(len(taskSpec.Results)).To(Equal(3)) | ||
Expect(len(taskSpec.Results)).To(Equal(4)) | ||
Expect(taskSpec.Results[0].Name).To(Equal("shp-source-default-commit-sha")) | ||
Expect(taskSpec.Results[1].Name).To(Equal("shp-source-default-commit-author")) | ||
Expect(taskSpec.Results[2].Name).To(Equal("shp-source-default-branch-name")) | ||
Expect(taskSpec.Results[2].Name).To(Equal("shp-source-default-commit-timestamp")) | ||
Expect(taskSpec.Results[3].Name).To(Equal("shp-source-default-branch-name")) | ||
}) | ||
|
||
It("adds a volume for the secret", func() { | ||
|
@@ -101,22 +97,15 @@ var _ = Describe("Git", func() { | |
Expect(taskSpec.Steps[0].Name).To(Equal("source-default")) | ||
Expect(taskSpec.Steps[0].Image).To(Equal(cfg.GitContainerTemplate.Image)) | ||
Expect(taskSpec.Steps[0].Args).To(Equal([]string{ | ||
"--url", | ||
"[email protected]:shipwright-io/build.git", | ||
"--target", | ||
"$(params.shp-source-root)", | ||
"--result-file-commit-sha", | ||
"$(results.shp-source-default-commit-sha.path)", | ||
"--result-file-commit-author", | ||
"$(results.shp-source-default-commit-author.path)", | ||
"--result-file-branch-name", | ||
"$(results.shp-source-default-branch-name.path)", | ||
"--result-file-error-message", | ||
"$(results.shp-error-message.path)", | ||
"--result-file-error-reason", | ||
"$(results.shp-error-reason.path)", | ||
"--secret-path", | ||
"/workspace/shp-source-secret", | ||
"--url", "[email protected]:shipwright-io/build.git", | ||
"--target", "$(params.shp-source-root)", | ||
"--result-file-commit-sha", "$(results.shp-source-default-commit-sha.path)", | ||
"--result-file-commit-author", "$(results.shp-source-default-commit-author.path)", | ||
"--result-file-commit-timestamp", "$(results.shp-source-default-commit-timestamp.path)", | ||
"--result-file-branch-name", "$(results.shp-source-default-branch-name.path)", | ||
"--result-file-error-message", "$(results.shp-error-message.path)", | ||
"--result-file-error-reason", "$(results.shp-error-reason.path)", | ||
"--secret-path", "/workspace/shp-source-secret", | ||
})) | ||
Expect(len(taskSpec.Steps[0].VolumeMounts)).To(Equal(1)) | ||
Expect(taskSpec.Steps[0].VolumeMounts[0].Name).To(Equal("shp-a-secret")) | ||
|
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
Oops, something went wrong.