You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+89-17Lines changed: 89 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,30 +38,103 @@ To configure the Step:
38
38
39
39
## 🧩 Get started
40
40
41
-
Add this step directly to your workflow in the [Bitrise Workflow Editor](https://devcenter.bitrise.io/steps-and-workflows/steps-and-workflows-index/).
41
+
Add this step directly to your workflow in the [Bitrise Workflow Editor](https://docs.bitrise.io/en/bitrise-ci/workflows-and-pipelines/steps/adding-steps-to-a-workflow.html).
42
42
43
43
You can also run this step directly with [Bitrise CLI](https://github.com/bitrise-io/bitrise).
44
44
45
45
#### Examples
46
46
47
-
##### Basic step config
47
+
##### Graph pipeline
48
+
49
+
###### Basic step config
50
+
51
+
```yaml
52
+
steps:
53
+
- pull-intermediate-files@1:
54
+
inputs:
55
+
- verbose: "true"
56
+
- artifact_sources: build
57
+
```
58
+
59
+
Use the `artifact_sources` input variable to limit the downloads to a set of workflows. Simply specify the Workflow name directly — no stage prefix is needed:
60
+
61
+
- `build`- Gets intermediate files from the 'build' Workflow.
62
+
- `build,test`- Gets intermediate files from both the 'build' and 'test' Workflows.
63
+
- `test.*`- Gets every intermediate file from all previous Workflows with names starting with 'test'.
64
+
- `.*`- Gets every intermediate file from all previous Workflows.
65
+
66
+
###### Wildcard based artifact pull
67
+
68
+
During a pipeline, workflows receive the finished workflows object. Developers can find it on a build VM's environment variable: `BITRISEIO_FINISHED_WORKFLOWS`.
69
+
70
+
Let's suppose that we get the following JSON object about the previously finished workflows.
As the key names in the object are self-describing, we will not cover those names except the `external_id`. The `external_id` is the build's slug in the PipelineService context.
102
+
103
+
Let's see the following use-cases, the use cases first part is the demand, the second is the `artifact_sources` config:
104
+
105
+
- As a developer, I would like to get the build artifact(s) of the _build_ workflow: `build`.
106
+
107
+
- As a developer, I would like to get the build artifact(s) of both the _build_ and _test_ workflows: `build,test`. The two expressions are separated by a comma.
108
+
109
+
- As a developer, I would like to retrieve already generated artifacts from all previous workflows: `.*`. As the example shows, developers can use regex.
110
+
111
+
- As a developer, I would like to get artifacts from all workflows whose names start with _test_: `test.*`.
112
+
113
+
And so on. The syntax is: `{workflow-name}`.
114
+
Do not forget to escape the special characters when using a regex pattern.
115
+
116
+
---
117
+
118
+
##### Staged pipeline
119
+
120
+
###### Basic step config
48
121
49
122
```yaml
50
123
steps:
51
124
- pull-intermediate-files@1:
52
125
inputs:
53
126
- verbose: "true"
54
-
- artifact_sources: workflow1
127
+
- artifact_sources: stage-1\..*
55
128
```
56
129
57
130
Use the `artifact_sources` input variable to limit the downloads to a set of stages or workflows:
58
131
59
-
- `build`- Gets files from the 'build' Workflow.
60
-
- `build,test`- Gets files from both the 'build' and 'test' Workflows.
61
-
- `test.*`- Gets every intermediate files from all previous Workflows with names starting with 'test'.
62
-
- `.*`- Gets every intermediate files from all previous Workflows.
132
+
- `stage1.workflow1`- Gets the artifacts from the stage1's workflow1.
133
+
- `stage1\..*`- Gets all artifacts from the stage1's workflows.
134
+
- `.*\.workflow1`- Gets workflow1s' artifacts from the previous stages.
135
+
- `.*`- Gets every generated artifacts from the previous stages.
63
136
64
-
##### Wildcard based intermediate file pull
137
+
###### Wildcard based artifact pull
65
138
66
139
During a pipeline, workflows receive the finished stages and workflows object. Developers can find it on a build VM's environment variable: `BITRISEIO_FINISHED_STAGES`.
67
140
@@ -120,15 +193,15 @@ As the key names in the object are self-describing, we will not cover those name
120
193
121
194
Let's see the following use-cases, the use cases first part is the demand, the second is the `artifact_sources` config:
122
195
123
-
- As a developer, I would like to get the intermediate files of the _stage-1_'s _placeholder_'s workflow: `stage-1.placeholder`.
196
+
- As a developer, I would like to get the build artifact(s) of the _stage-1_'s _placeholder_'s workflow: `stage-1.placeholder`.
124
197
125
-
- As a developer, I would like to get the intermediate files of the _stage-2_'s _deployer_'s workflow and the _stage-1_'s _placeholder_'s workflow: `stage-1.placeholder,stage-2.deployer`. The two expressions are separated by a comma.
198
+
- As a developer, I would like to get the build artifact(s) of the _stage-2_'s _deployer_'s workflow and the _stage-1_'s _placeholder_'s workflow: `stage-1.placeholder,stage-2.deployer`. The two expressions are separated by a comma.
126
199
127
-
- As a developer, I would like to retrieve all intermediate files: `.*`. As the example shows, developers can use regex.
200
+
- As a developer, I would like to retrieve already generated artifacts: `.*`. As the example shows, developers can use regex.
128
201
129
-
- As a developer, I would like to retrieve the intermediate files from the _stage-2_ stage: `stage-2\..*`.
202
+
- As a developer, I would like to retrieve the generated artifacts from the _stage-2_ stage: `stage-2\..*`.
130
203
131
-
- As a developer, I would like to get the _textfile_generator_ workflow intermediate files: `.*\.textfile_generator`
204
+
- As a developer, I would like to get the _textfile_generator_ workflow artifacts: `.*\.textfile_generator`
132
205
133
206
And so on. The syntax is: `{stage-name}.{workflow-name}`.
134
207
Do not forget to escape the special characters when using a regex pattern.
@@ -141,7 +214,7 @@ Do not forget to escape the special characters when using a regex pattern.
141
214
142
215
| Key | Description | Flags | Default |
143
216
| --- | --- | --- | --- |
144
-
| `artifact_sources` | A comma (`,`) separated list of Workflow names or Stage and Workflow paths, used to specify which workflows' intermediate files to download. **Graph Pipelines:** Simply specify the workflow name directly. For example, `build` or `test`. Examples: - `build` - Gets intermediate files from the 'build' workflow. - `build,test` - Gets intermediate files from both the 'build' and 'test' workflows. - `test.*` - Gets every intermediate files from all previous workflows with names starting with 'test'. - `.*` - Gets every intermediate files from all previous workflows. **Staged Pipelines:** The input uses a `{stage}.{workflow}` syntax. The dot character (`.`) is the delimiter between the Stage and the Workflow. Examples: - `stage1.workflow1` - Gets intermediate files from stage1's workflow1. - `stage1\..*` - Gets all intermediate files from stage1's workflows. - `.*\.workflow1` - Gets workflow1's intermediate files from all previous stages. - `.*` - Gets every intermediate files from all previous stages. You can use regular expressions for both pipeline types. Remember to escape special characters. | required | `.*` |
217
+
| `artifact_sources` | A comma (`,`) separated list of Workflow names or Stage and Workflow paths, used to specify which Workflows' files to download. **Graph Pipelines:** Simply specify the Workflow name directly. For example, `build` or `test`. Examples: - `build` - Gets intermediate files from the 'build' Workflow. - `build,test` - Gets intermediate files from both the 'build' and 'test' Workflows. - `test.*` - Gets every intermediate files from all previous Workflows with names starting with 'test'. - `.*` - Gets every intermediate files from all previous Workflows. **Staged Pipelines:** The input uses a `{stage}.{workflow}` syntax. The dot character (`.`) is the delimiter between the Stage and the Workflow. Examples: - `stage1.workflow1` - Gets intermediate files from stage1's workflow1. - `stage1\..*` - Gets all intermediate files from stage1's workflows. - `.*\.workflow1` - Gets workflow1's intermediate files from all previous stages. - `.*` - Gets every intermediate files from all previous stages. You can use regular expressions for both pipeline types. Remember to escape special characters. | required | `.*` |
145
218
| `verbose` | Enable logging additional information for debugging | required | `false` |
146
219
| `app_slug` | The slug that uniquely identifies your app on bitrise.io. It’s part of the app URL, too. | required | `$BITRISE_APP_SLUG` |
147
220
| `finished_stage` | This is a JSON representation of the finished staged pipeline stages for which the step can download intermediate files. | required | `$BITRISEIO_FINISHED_STAGES` |
@@ -159,11 +232,10 @@ There are no outputs defined in this step
159
232
160
233
We welcome [pull requests](https://github.com/bitrise-steplib/bitrise-step-pull-intermediate-files/pulls) and [issues](https://github.com/bitrise-steplib/bitrise-step-pull-intermediate-files/issues) against this repository.
161
234
162
-
For pull requests, work on your changes in a forked repository and use the Bitrise CLI to [run step tests locally](https://devcenter.bitrise.io/bitrise-cli/run-your-first-build/).
235
+
For pull requests, work on your changes in a forked repository and use the Bitrise CLI to [run step tests locally](https://docs.bitrise.io/en/bitrise-ci/bitrise-cli/running-your-first-local-build-with-the-cli.html).
163
236
164
237
Note: this step's end-to-end tests (defined in e2e/bitrise.yml) are working with secrets which are intentionally not stored in this repo. External contributors won't be able to run those tests. Don't worry, if you open a PR with your contribution, we will help with running tests and make sure that they pass.
165
238
166
239
Learn more about developing steps:
167
240
168
-
- [Create your own step](https://devcenter.bitrise.io/contributors/create-your-own-step/)
169
-
- [Testing your Step](https://devcenter.bitrise.io/contributors/testing-and-versioning-your-steps/)
241
+
- [Create your own step](https://docs.bitrise.io/en/bitrise-ci/workflows-and-pipelines/developing-your-own-bitrise-step/developing-a-new-step.html)
Copy file name to clipboardExpand all lines: docs/examples.md
+75-2Lines changed: 75 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,79 @@
1
1
#### Examples
2
2
3
-
##### Basic step config
3
+
##### Graph pipeline
4
+
5
+
###### Basic step config
6
+
7
+
```yaml
8
+
steps:
9
+
- pull-intermediate-files@1:
10
+
inputs:
11
+
- verbose: "true"
12
+
- artifact_sources: build
13
+
```
14
+
15
+
Use the `artifact_sources` input variable to limit the downloads to a set of workflows. Simply specify the Workflow name directly — no stage prefix is needed:
16
+
17
+
- `build`- Gets intermediate files from the 'build' Workflow.
18
+
- `build,test`- Gets intermediate files from both the 'build' and 'test' Workflows.
19
+
- `test.*`- Gets every intermediate file from all previous Workflows with names starting with 'test'.
20
+
- `.*`- Gets every intermediate file from all previous Workflows.
21
+
22
+
###### Wildcard based artifact pull
23
+
24
+
During a pipeline, workflows receive the finished workflows object. Developers can find it on a build VM's environment variable: `BITRISEIO_FINISHED_WORKFLOWS`.
25
+
26
+
Let's suppose that we get the following JSON object about the previously finished workflows.
As the key names in the object are self-describing, we will not cover those names except the `external_id`. The `external_id` is the build's slug in the PipelineService context.
58
+
59
+
Let's see the following use-cases, the use cases first part is the demand, the second is the `artifact_sources` config:
60
+
61
+
- As a developer, I would like to get the build artifact(s) of the _build_ workflow: `build`.
62
+
63
+
- As a developer, I would like to get the build artifact(s) of both the _build_ and _test_ workflows: `build,test`. The two expressions are separated by a comma.
64
+
65
+
- As a developer, I would like to retrieve already generated artifacts from all previous workflows: `.*`. As the example shows, developers can use regex.
66
+
67
+
- As a developer, I would like to get artifacts from all workflows whose names start with _test_: `test.*`.
68
+
69
+
And so on. The syntax is: `{workflow-name}`.
70
+
Do not forget to escape the special characters when using a regex pattern.
71
+
72
+
---
73
+
74
+
##### Staged pipeline
75
+
76
+
###### Basic step config
4
77
5
78
```yaml
6
79
steps:
@@ -17,7 +90,7 @@ Use the `artifact_sources` input variable to limit the downloads to a set of sta
17
90
- `.*\.workflow1`- Gets workflow1s' artifacts from the previous stages.
18
91
- `.*`- Gets every generated artifacts from the previous stages.
19
92
20
-
##### Wildcard based artifact pull
93
+
###### Wildcard based artifact pull
21
94
22
95
During a pipeline, workflows receive the finished stages and workflows object. Developers can find it on a build VM's environment variable: `BITRISEIO_FINISHED_STAGES`.
0 commit comments