-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #794 from adamdmharvey/adamdmharvey/enable-setup-i…
…n-examples feat: Include `setup` key in published Orb examples
- Loading branch information
Showing
2 changed files
with
28 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3311,6 +3311,20 @@ Windows Server 2010 | |
- run: | ||
name: Say hello | ||
command: <<include(scripts/script.sh)>> | ||
examples: | ||
example: | ||
description: | | ||
An example of how to use the orb. | ||
usage: | ||
version: 2.1 | ||
orbs: | ||
orb-name: company/[email protected] | ||
setup: true | ||
workflows: | ||
create-pipeline: | ||
jobs: | ||
orb-name: create-pipeline-x | ||
`)) | ||
script = clitest.OpenTmpFile(tempSettings.Home, filepath.Join("scripts", "script.sh")) | ||
script.Write([]byte(`echo Hello, world!`)) | ||
|
@@ -3330,17 +3344,26 @@ Windows Server 2010 | |
It("Includes a script in the packed Orb file", func() { | ||
session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) | ||
Expect(err).ShouldNot(HaveOccurred()) | ||
|
||
Eventually(session.Out).Should(gbytes.Say(`commands: | ||
orb: | ||
steps: | ||
Eventually(session.Out).Should(gbytes.Say(`steps: | ||
- run: | ||
command: echo Hello, world! | ||
name: Say hello | ||
`)) | ||
Eventually(session).Should(gexec.Exit(0)) | ||
}) | ||
|
||
It("Includes the setup key when an orb example uses a dynamic pipeline", func() { | ||
session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) | ||
Expect(err).ShouldNot(HaveOccurred()) | ||
Eventually(session.Out).Should(gbytes.Say(`orbs: | ||
orb-name: company/[email protected] | ||
setup: true | ||
version: 2.1 | ||
workflows: | ||
`)) | ||
Eventually(session).Should(gexec.Exit(0)) | ||
}) | ||
|
||
}) | ||
|
||
Describe("Orb diff", func() { | ||
|