Skip to content

Commit 6514b62

Browse files
committed
📝 Deprecate skip_download in favour of no_get
`skip_download: true` allows us to prevent re-downloading in the implicit get step that is run after a put step. However, this has the added drawback of leaving us with an empty volume which means we need to alias the resource for updating the pull-request. We can instead use `no_get: true` on the put step to prevent the get step from running entirely, removing the need to alias the resource as the volume will be un-affected. https://concourse-ci.org/put-step.html#schema.put.no_get
1 parent 09539a9 commit 6514b62

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ generate notifications over the webhook. So if you have a repository with little
8888

8989
| Parameter | Required | Example | Description |
9090
|----------------------|----------|----------|------------------------------------------------------------------------------------|
91-
| `skip_download` | No | `true` | Use with `get_params` in a `put` step to do nothing on the implicit get. |
91+
| `skip_download` | No | `true` | (deprecated) Use `no_get` on the put step instead. |
9292
| `integration_tool` | No | `rebase` | The integration tool to use, `merge`, `rebase` or `checkout`. Defaults to `merge`. |
9393
| `git_depth` | No | `1` | Shallow clone the repository using the `--depth` Git option |
9494
| `submodules` | No | `true` | Recursively clone git submodules. Defaults to false. |
@@ -129,21 +129,6 @@ is available as `.git/resource/base_sha`. For a complete list of available (indi
129129
- `title`: the title of the pull request
130130
- `url`: the URL for the pull request
131131

132-
133-
When specifying `skip_download` the pull request volume mounted to subsequent tasks will be empty, which is a problem
134-
when you set e.g. the pending status before running the actual tests. The workaround for this is to use an alias for
135-
the `put` (see telia-oss/github-pr-resource#32 for more details).
136-
Example here:
137-
138-
```yaml
139-
put: update-status <-- Use an alias for the pull-request resource
140-
resource: pull-request
141-
params:
142-
path: pull-request
143-
status: pending
144-
get_params: {skip_download: true}
145-
```
146-
147132
git-crypt encrypted repositories will automatically be decrypted when the `git_crypt_key` is set in the source configuration.
148133

149134
Note that, should you retrigger a build in the hopes of testing the last commit to a PR against a newer version of

in.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"encoding/json"
55
"fmt"
66
"io/ioutil"
7+
"log"
78
"os"
89
"path/filepath"
910
"strconv"
@@ -12,6 +13,7 @@ import (
1213
// Get (business logic)
1314
func Get(request GetRequest, github Github, git Git, outputDir string) (*GetResponse, error) {
1415
if request.Params.SkipDownload {
16+
log.Print("`skip_download` has been deprecated, use `no_get` instead to prevent this implicit get step from running.")
1517
return &GetResponse{Version: request.Version}, nil
1618
}
1719

0 commit comments

Comments
 (0)