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
+16-2Lines changed: 16 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Tracks the commits in a [git](http://git-scm.com/) repository.
7
7
*`uri`: *Required.* The location of the repository.
8
8
9
9
*`branch`: The branch to track. This is *optional* if the resource is
10
-
only used in `get` steps; however, it is *required* when used in a `put` step. If unset for `get`, the repository's default branch is used; usually `master` but [could be different](https://help.github.com/articles/setting-the-default-branch/).
10
+
only used in `get` steps; however, it is *required*either here, or in the `put` step, when used in a `put` step. If unset for `get`, the repository's default branch is used; usually `master` but [could be different](https://help.github.com/articles/setting-the-default-branch/).
11
11
12
12
*`private_key`: *Optional.* Private key to use when pulling/pushing.
13
13
Example:
@@ -302,6 +302,19 @@ Push the checked-out reference to the source's URI and branch. All tags are
302
302
also pushed to the source. If a fast-forward for the branch is not possible
303
303
and the `rebase` parameter is not provided, the push will fail.
304
304
305
+
#### Important note
306
+
307
+
Due to the way [resources are cached in Concourse](https://medium.com/concourse-ci/concourse-resource-volume-caching-7f4eb73be1a6),
308
+
any commits produced by the `put` step will appear in _ALL_ git resources with the
309
+
_exact_ same `source` configuration across _ALL_ pipelines, across _ALL_ teams in the
310
+
Concourse instance, even if the branch name in `put` step is different from the one
311
+
specified `source.branch`.
312
+
313
+
Therefore, it is recommended to use a separate git resource to use in the `put`
314
+
steps, such that its configuration is different from all the git resources used
315
+
in `get` steps. E.g. set `source.commit_filter.exclude` to something like
316
+
`[ "this resource is used for pushing new changes" ]`.
317
+
305
318
#### Parameters
306
319
307
320
* `repository`: *Required.* The path of the repository to push to the source.
@@ -342,7 +355,8 @@ pushed regardless of the upstream state.
342
355
343
356
Note that the version produced by the `put` step will be picked up by subsequent `get` steps
344
357
even if the `branch` differs from the `branch` specified in the source.
345
-
To avoid this, you should use two resources of read-only and write-only.
358
+
To avoid this, you should use two resources of read-only and write-only with differing `source`
359
+
configurations. See [this note](#important-note) for further details.
346
360
347
361
* `refs_prefix`: *Optional.* Allows pushing to refs other than heads. Defaults to `refs/heads`.
0 commit comments