Commit e9f00b1
committed
Improve validate-origin
If we set the main.git.upstreamRepoURL then we need to check that one
for the presence of the branch and not whatever is configured as the
origin remote.
Tested as follows:
- Working upstreamRepoURL:
❯ yq -r '.main.git.repoUpstreamURL // (.main.git.repoUpstreamURL = "")' values-global.yaml
https://github.com/mbaldessari/industrial-edge
❯ make validate-origin
make -f common/Makefile validate-origin
make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/industrial-edge'
Checking repository:
Upstream URL set to: https://github.com/mbaldessari/industrial-edge
https://github.com/mbaldessari/industrial-edge - branch 'for-max-s3-kafka-fix': OK
make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/industrial-edge'
- upstreamRepoURL without the branch:
❯ yq -r '.main.git.repoUpstreamURL // (.main.git.repoUpstreamURL = "")' values-global.yaml
https://github.com/mamurak/industrial-edge
❯ make validate-origin
make -f common/Makefile validate-origin
make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/industrial-edge'
Checking repository:
Upstream URL set to: https://github.com/mamurak/industrial-edge
https://github.com/mamurak/industrial-edge - branch 'for-max-s3-kafka-fix': NOT FOUND
make[1]: *** [common/Makefile:138: validate-origin] Error 1
make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/industrial-edge'
make: *** [Makefile:24: validate-origin] Error 2
- No repoUpstreamURL set:
❯ yq -r '.main.git.repoUpstreamURL // (.main.git.repoUpstreamURL = "")' values-global.yaml
❯
❯ make validate-origin
make -f common/Makefile validate-origin
make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/industrial-edge'
Checking repository:
https://github.com/mbaldessari/industrial-edge.git - branch 'for-max-s3-kafka-fix': OK
make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/industrial-edge'1 parent 87776c6 commit e9f00b1
1 file changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
138 | 148 | | |
139 | 149 | | |
140 | 150 | | |
| |||
0 commit comments