Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2332590

Browse files
k8s-provier-automation (#477)
Summary: - Prelude to mega robust product. - New `k8s.core_v1` release candidate. - Amended query supporting robot test `K8S Nodes Select Leveraging` JSON Path for updated `k8s.core_v1 interface. - Send kill signal to destroy al web servers in CI.
1 parent 891ae7f commit 2332590

File tree

8 files changed

+152831
-20160
lines changed

8 files changed

+152831
-20160
lines changed

.github/actionlint.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ self-hosted-runner:
22
# Labels of self-hosted runner in array of string
33
labels:
44
- ubuntu-latest-m
5-
- arm-ubuntu-22-04-runner-one
5+
- arm-ubuntu-22-04-runner-one
6+
- macos-13 # should not be necessary
7+
- macos-14 # should not be necessary

.github/workflows/build.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ jobs:
174174
- name: Output from mocked functional tests
175175
if: always()
176176
run: |
177-
cat ./test/robot/functional/output.xml || echo "no functional test output present"
177+
cat ./test/robot/reports/output.xml || echo "no functional test output present"
178178
179179
- name: Run robot integration tests
180180
if: env.AZURE_CLIENT_SECRET != '' && startsWith(env.STATE_SOURCE_TAG, 'build-release')
@@ -381,7 +381,7 @@ jobs:
381381
- name: Output from mocked functional tests
382382
if: always()
383383
run: |
384-
cat ./test/robot/functional/output.xml
384+
cat ./test/robot/reports/output.xml
385385
386386
- name: Run robot mocked functional tests with aggressive concurrency
387387
if: success()
@@ -391,7 +391,7 @@ jobs:
391391
- name: Output from mocked functional tests with aggressive concurrency
392392
if: always()
393393
run: |
394-
cat ./test/robot/functional/output.xml
394+
cat ./test/robot/reports/output.xml
395395
396396
- name: Run robot integration tests
397397
if: env.AZURE_CLIENT_SECRET != '' && startsWith(env.STATE_SOURCE_TAG, 'build-release')
@@ -452,7 +452,7 @@ jobs:
452452
- name: Output from mocked deb package functional tests
453453
if: always()
454454
run: |
455-
cat ./test/robot/functional/output.xml
455+
cat ./test/robot/reports/output.xml
456456
457457
- name: Upload deb Artifact
458458
uses: actions/[email protected]
@@ -637,7 +637,7 @@ jobs:
637637
- name: Output from mocked functional tests
638638
if: always()
639639
run: |
640-
cat ./test/robot/functional/output.xml
640+
cat ./test/robot/reports/output.xml
641641
642642
- name: Run robot mocked functional tests with aggressive concurrency
643643
if: success()
@@ -647,7 +647,7 @@ jobs:
647647
- name: Output from mocked functional tests with aggressive concurrency
648648
if: always()
649649
run: |
650-
cat ./test/robot/functional/output.xml
650+
cat ./test/robot/reports/output.xml
651651
652652
- name: Run robot integration tests
653653
if: env.AZURE_CLIENT_SECRET != '' && startsWith(env.STATE_SOURCE_TAG, 'build-release')
@@ -735,7 +735,7 @@ jobs:
735735
- name: Output from mocked deb package functional tests
736736
if: always()
737737
run: |
738-
cat ./test/robot/functional/output.xml
738+
cat ./test/robot/reports/output.xml
739739
740740
- name: Upload deb Artifact
741741
uses: actions/[email protected]
@@ -833,7 +833,7 @@ jobs:
833833
name: Output from mocked functional tests
834834
if: always()
835835
run: |
836-
cat ./test/robot/functional/output.xml
836+
cat ./test/robot/reports/output.xml
837837
838838
- shell: wsl-bash {0}
839839
name: Run robot integration tests
@@ -863,12 +863,15 @@ jobs:
863863
864864
macosbuild:
865865
name: MacOS Build
866-
runs-on: macos-12
866+
runs-on: macos-13
867867
timeout-minutes: ${{ vars.DEFAULT_JOB_TIMEOUT_MIN == '' && 120 || vars.DEFAULT_JOB_TIMEOUT_MIN }}
868868
steps:
869869
- name: Check out code into the Go module directory
870870
uses: actions/[email protected]
871871

872+
- name: Set env # awful hack to get java 8 and support the abomnible mock server template grammar
873+
run: echo "JAVA_HOME=${JAVA_HOME_8_X64}" >> "$GITHUB_ENV"
874+
872875
- name: Set up Go 1.x
873876
uses: actions/[email protected]
874877
with:
@@ -892,8 +895,9 @@ jobs:
892895
echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}"
893896
} >> "${GITHUB_STATE}"
894897
895-
- name: Install Python dependencies
898+
- name: Install Various dependencies
896899
run: |
900+
brew install postgresql
897901
pip3 install -r cicd/requirements.txt
898902
899903
- name: Generate rewritten registry for simulations
@@ -971,7 +975,7 @@ jobs:
971975
- name: Output from mocked functional tests
972976
if: always()
973977
run: |
974-
cat ./test/robot/functional/output.xml
978+
cat ./test/robot/reports/output.xml
975979
976980
- name: Run robot integration tests
977981
if: env.AZURE_CLIENT_SECRET != '' && startsWith(env.STATE_SOURCE_TAG, 'build-release')
@@ -1002,7 +1006,7 @@ jobs:
10021006

10031007
macosarmbuild:
10041008
name: MacOS ARM Build
1005-
runs-on: macos-latest
1009+
runs-on: macos-13
10061010
timeout-minutes: ${{ vars.DEFAULT_JOB_TIMEOUT_MIN == '' && 120 || vars.DEFAULT_JOB_TIMEOUT_MIN }}
10071011
steps:
10081012

@@ -1258,7 +1262,7 @@ jobs:
12581262
- name: Output from mocked functional tests
12591263
if: always()
12601264
run: |
1261-
cat ./test/robot/functional/output.xml
1265+
cat ./test/robot/reports/output.xml
12621266
12631267
- name: Run robot integration tests
12641268
if: env.AZURE_CLIENT_SECRET != '' && startsWith(env.STATE_SOURCE_TAG, 'build-release')

cicd/python/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def run_robot_mocked_functional_tests_stackql(*args, **kwargs) -> int:
4343
return subprocess.call(
4444
'robot '
4545
f'{variables} '
46-
'-d test/robot/functional '
46+
'-d test/robot/reports '
4747
'test/robot/functional',
4848
shell=True
4949
)

docs/CICD.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Summary:
77
- At present, PR checks, build and test are all performed through [.github/workflows/go.yml](/.github/workflows/go.yml).
88
- Releasing over various channels (website, homebrew, chocolatey...) is performed manually.
99
- The strategic state is to split the functions: PR checks, build and test; into separate files, and migrate to use [goreleaser](https://goreleaser.com/).
10+
- Should take the hint from docker to [speed up multi-platform builds using multiple runners](https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners).
1011

1112

1213
## Secrets
@@ -15,3 +16,7 @@ In lieu of a full implementation of [github actions best practices](https://secu
1516
- Pull request checks use [the pull_request event](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request), as per [best practices](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/).
1617
- Integration test steps, which require secrets, leverage [the github context](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context) to avoid running where secrets are absent.
1718
- Therefore, external fork PRs, which are the community contribution model, do not run integration tests. Strategically, we may funnel community contribution though a staging branch and/or adopt release branches. This is not an urgent consideration, and we shall decide after some reflection.
19+
20+
## API mocking
21+
22+
According to [this swagger-codegen example](https://github.com/swagger-api/swagger-codegen/blob/master/bin/python-flask-petstore.sh), it is not overly difficult to generate python mocks from openapi docs. This can then be used for credible regression testing against new provider docs and certainly the relationship of endpoints to stackql resources. Know weakness: will not detect defective transform from source (eg: MS-graph, AWS) to openapi.

0 commit comments

Comments
 (0)