Commit a712422
authored
Fix
# Summary
This PR fixes `private_gke_code_snippets` tests that could not properly
set the context:
>scripts/dev/contexts/private_gke_code_snippets: line 13:
/data/mci/33f77d5e70bc4d8e19bb3f674e0743b1/src/github.com/mongodb/mongodb-kubernetes/scripts/dev/contexts/variables/funcs/gke:
No such file or directory
The reason was `om80` context file replaced the `script_dir` variable
that was also set and used in `private_gke_code_snippets`. After that
the `script_dir` pointed to `./scripts/dev/contexts/variables` instead
of `./scripts/dev/contexts/` and the `gke` script could not be found.
The solution was to replace `script_dir` usage in `om80` script with
`PROJECT_DIR`. It was also replaced in other scripts which had long path
based on `script_dir`.
The other thing that was fixed is `switch_context` function. Previously
because we concatenated result from multiple bash commands, we didn't
consume the error code from actual command:
```
script: |
echo "Switching context"
scripts/dev/switch_context.sh "${build_variant}"
echo "Finished switching context"
```
## Proof of Work
Passing CI + manual patch for
[private_gke_code_snippets](https://spruce.mongodb.com/version/68d50ec1cafe8c000760009e)
.
## Checklist
- [ ] Have you linked a jira ticket and/or is the ticket in the title?
- [ ] Have you checked whether your jira ticket required DOCSP changes?
- [ ] Have you added changelog file?
- use `skip-changelog` label if not needed
- refer to [Changelog files and Release
Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes)
section in CONTRIBUTING.md for more detailsprivate_gke_code_snippets + other small fixes (#477)1 parent 12f405a commit a712422
File tree
15 files changed
+22
-41
lines changed- scripts/dev/contexts
- funcs
- variables
15 files changed
+22
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 88 | + | |
93 | 89 | | |
94 | 90 | | |
95 | 91 | | |
| |||
249 | 245 | | |
250 | 246 | | |
251 | 247 | | |
252 | | - | |
| 248 | + | |
253 | 249 | | |
254 | 250 | | |
255 | 251 | | |
| |||
305 | 301 | | |
306 | 302 | | |
307 | 303 | | |
308 | | - | |
309 | 304 | | |
310 | 305 | | |
311 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 5 | | |
9 | 6 | | |
10 | | - | |
| 7 | + | |
11 | 8 | | |
12 | 9 | | |
13 | 10 | | |
| |||
0 commit comments