-
Notifications
You must be signed in to change notification settings - Fork 16
Commit 5d0da41
Use an SSH URL to fetch Runtime in CI (#3)
Use an SSH URL to fetch Runtime in CI
(Same as: apple/swift-openapi-generator#3)
### Motivation
Until the swift-openapi-runtime repository is made public, it cannot be
cloned using a HTTPS package URL without authentication, which is what
this package is using in its Package.swift.
This means CI isn't able to run for this package. However, CI is able to
clone this repository over SSH, which presents an opportunity for a
temporary workaround.
### Modifications
Add a temporary step to the Docker Compose CI flow, which creates a Git
config in a shared ephemeral volume with the following contents:
```gitconfig
[url "git@github.com:apple/swift-openapi-runtime"]
insteadOf = https://github.com/apple/swift-openapi-runtime
```
### Result
The CI should be able to clone the private dependency and then succeed.
### Test Plan
Locally, this works:
```console
❯ docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.2204.58.yaml run test
...
+ swift test -Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error
...
Fetching https://github.com/apple/swift-openapi-runtime
...
Fetched https://github.com/apple/swift-openapi-runtime (2.68s)
...
Executed 86 tests, with 0 failures (0 unexpected) in 3.265 (3.265) seconds
```
Also, if we use can use the `shell` Docker Compose service to see things
are configured correctly:
```console
root@20ab69e3f292:/code# echo $GIT_CONFIG_GLOBAL
/ci-gitconfig/gitconfig
root@20ab69e3f292:/code# cat $GIT_CONFIG_GLOBAL
[url "git@github.com:apple/swift-openapi-runtime"]
insteadOf = https://github.com/apple/swift-openapi-runtime
```
Reviewed by: simonjbeaumont
Builds:
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
#3 1 parent ccc7b5b commit 5d0da41
1 file changed
+13
-0
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
18 | 25 |
| |
19 | 26 |
| |
20 | 27 |
| |
21 | 28 |
| |
22 | 29 |
| |
23 | 30 |
| |
24 | 31 |
| |
32 | + | ||
25 | 33 |
| |
34 | + | ||
35 | + | ||
26 | 36 |
| |
27 | 37 |
| |
28 | 38 |
| |
| |||
35 | 45 |
| |
36 | 46 |
| |
37 | 47 |
| |
48 | + | ||
49 | + | ||
50 | + |
0 commit comments