-
Notifications
You must be signed in to change notification settings - Fork 51
1646 lines (1527 loc) · 76.3 KB
/
Copy pathdeployment-test.yaml
File metadata and controls
1646 lines (1527 loc) · 76.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: Deployment Test (Azure)
# Cloud deployment-test gate. Runs `deployments/scripts/run-deployment-test.sh`
# end-to-end against an ephemeral cloud cluster (Azure today; other providers
# follow). Three modes, each cheaper to set up than the next:
#
# 1. `init-only` (~30s, no cloud setup): terraform init + validate + fmt
# against the Azure example module. Provider-download + HCL syntax check;
# ZERO Azure API calls.
# 2. `auth-check` (~2 min, requires OIDC + Azure App Reg): runs terraform
# plan. First step that actually touches Azure — confirms the federated-
# identity → service-principal → RBAC chain.
# 3. `full-deployment` (~45 min, requires #2 plus POSTGRES_PASSWORD): runs
# `deployments/scripts/run-deployment-test.sh --provider azure` end-to-end.
#
# Triggers:
# - `workflow_dispatch` — once this file lands on the default branch, the
# "Run workflow" button in Actions becomes available for all three modes.
# - `pull_request` — auto-runs `init-only` when deployment-test inputs change.
# A `ci:azure-deployment` label event skips init-only and starts the full
# HEAD integration path at the chart contract check.
#
# PR-label trigger (works pre-merge when the dispatcher isn't registered yet):
# - `ci:azure-deployment` → full-deployment starts immediately for an eligible
# deployment-related PR.
# Later pushes run only automatic validation; remove and re-add the label
# to rerun full E2E at the new head.
# auth-check is workflow_dispatch only — it's a developer-driven smoke for
# the OIDC chain, not something we want to run automatically per PR.
#
# Scheduled trigger (PRIMARY mode of operation on main):
# - Daily at 00:00 UTC = 5pm PDT (16:00 PST during winter — GitHub cron
# is UTC, doesn't adjust for DST). github.event_name='schedule' runs
# build-images + full-deployment end-to-end on main, the same path
# the PR-label gate exercises. Scripts, charts, images, and CLI all come
# from the tested source SHA. Schedule events fire only from the repo's
# default branch (main), not forks or feature branches.
#
# Slack notification (failure-only, schedule-only):
# - notify-slack-on-azure-deployment-test-failure posts to the channel
# named by `vars.CI_SLACK_CHANNEL` (fallback `osmo-slack-test`) using
# `OSMO_SLACK_BOT_TOKEN` (xoxb- bot token with chat:write scope) via
# Slack `chat.postMessage`. Override at repo/org level when redirecting
# the noise (e.g. to #osmo-oncall once this gate goes prod-ready).
# - Fires only on scheduled-run failures. PR-label and workflow_dispatch
# runs surface their own status interactively.
# - If the secret is unset or the API returns non-ok, the step logs a
# warning and exits 0 — the gate's overall status is unaffected.
on:
workflow_dispatch:
inputs:
mode:
description: 'What to run'
type: choice
required: true
default: init-only
options:
- init-only
- auth-check
- full-deployment
pull_request:
branches: [main]
types: [opened, synchronize, reopened, labeled]
paths:
- '.github/workflows/deployment-test.yaml'
- 'ci/deployment-test/**'
- 'deployments/BUILD'
- 'deployments/charts/service/**'
- 'deployments/charts/backend-operator/**'
- 'deployments/scripts/deploy-k8s.sh'
- 'deployments/scripts/run-deployment-test.sh'
- 'deployments/scripts/tests/**'
- 'deployments/terraform/azure/**'
schedule:
# Daily at 00:00 UTC = 5pm PDT (16:00 PST during winter — GitHub cron
# is UTC, doesn't track DST). Schedule fires only on main, not on
# feature branches.
- cron: '0 0 * * *'
# Full runs share one resource group and queue in one concurrency group.
# Auth checks and non-matching label events use unique groups, so they never
# wait behind cloud provisioning.
concurrency:
group: >-
${{ (github.event_name == 'schedule'
|| github.event.inputs.mode == 'full-deployment'
|| (github.event_name == 'pull_request'
&& github.event.action == 'labeled'
&& github.event.label.name == 'ci:azure-deployment'))
&& 'deployment-test-azure'
|| format('deployment-test-azure-{0}', github.run_id) }}
cancel-in-progress: false
queue: max
# OIDC federation to Azure — no static secrets in this workflow.
# `id-token: write` lets the runner mint a JWT that Azure trusts via the
# Federated Identity Credential on the App Registration. The federated
# credential is bound to the `internal-ci` GitHub environment (subject =
# `repo:NVIDIA/OSMO:environment:internal-ci`), so the auth-check and
# full-deployment jobs must declare `environment: internal-ci` for the
# subject claim to match. Environment-scoped Variables (vars.AZURE_*)
# also resolve only inside jobs with that environment.
permissions:
id-token: write
contents: read
jobs:
# Cheapest mode — no Azure setup needed. On PRs this runs for normal update
# events, but not for the full-deployment label event: that path starts with
# head-chart-contract so a chart mismatch fails before Terraform apply.
init-only:
if: >-
${{ github.event.inputs.mode == 'init-only'
|| (github.event_name == 'pull_request'
&& github.event.action != 'labeled') }}
runs-on: ubuntu-latest
timeout-minutes: 5
defaults:
run:
working-directory: deployments/terraform/azure/example
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.8
- name: terraform init (no Azure auth required)
run: terraform init -input=false
- name: terraform validate
run: terraform validate -no-color
# Existing formatting drift is outside this gate's behavioral contract.
- name: terraform fmt -check (informational)
run: terraform fmt -check -recursive -no-color || true
# First step that actually talks to Azure — terraform plan reads the
# resource group via the azurerm_resource_group data source. Requires
# the full OIDC + App Reg + RBAC setup. Provisions nothing.
auth-check:
if: ${{ github.event.inputs.mode == 'auth-check' }}
runs-on: ubuntu-latest
timeout-minutes: 10
environment: internal-ci
env:
ARM_USE_OIDC: true
ARM_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
ARM_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
defaults:
run:
working-directory: deployments/terraform/azure/example
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.8
- name: terraform init
run: terraform init -input=false
- name: terraform plan (against osmo-deployment-ci-rg, plan-only)
run: |
# postgres_password is a TF input without a default — pass a
# placeholder so plan can complete. The value would only matter
# at `terraform apply` time (which auth-check never runs).
terraform plan \
-input=false \
-var "subscription_id=${ARM_SUBSCRIPTION_ID}" \
-var "resource_group_name=${RESOURCE_GROUP}" \
-var "azure_region=${AZURE_REGION}" \
-var "postgres_password=auth-check-placeholder-not-applied" \
-no-color
env:
RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }}
AZURE_REGION: ${{ vars.AZURE_REGION || 'eastus2' }}
# Lint and render the split charts from this checkout before starting any
# expensive work. This catches script/image/chart contract gaps in about a
# minute instead of discovering them after Azure is provisioned.
head-chart-contract:
if: >-
${{ github.event_name == 'schedule'
|| github.event.inputs.mode == 'full-deployment'
|| (github.event_name == 'pull_request'
&& github.event.action == 'labeled'
&& github.event.label.name == 'ci:azure-deployment') }}
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
chart_version: ${{ steps.contract.outputs.chart_version }}
steps:
- uses: actions/checkout@v4
- name: Set up Helm
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
with:
version: 'v3.16.2'
- name: verify HEAD chart contract
id: contract
run: bash ci/deployment-test/check-head-chart-contract.sh
# Build OSMO service + backend images from THIS PR's source and push them
# to nvcr.io/nvstaging/osmo so the deployment-test below verifies the
# actual diff, not whatever's currently published at
# nvcr.io/nvidia/osmo:latest. Without this job the gate is meaningless
# for service-code PRs (it always tests the published `latest`, never
# the proposed change). After the HEAD chart preflight, this job runs in
# parallel with Azure provisioning; deploy waits for both.
#
# Pushes go to `nvcr.io/nvstaging/osmo` — the same team the Jenkins dev
# pipeline uses (nvcr.io restricts registries to 3 path segments
# `<org>/<team>/<image>`, so a dedicated `/ci` subpath isn't possible).
# Keep the cleanup-compatible `pr-` prefix and include the workflow run ID,
# so separate invocations cannot overwrite each other. A rerun reuses it.
build-images:
needs: head-chart-contract
if: ${{ needs.head-chart-contract.result == 'success' }}
runs-on: ubuntu-latest
timeout-minutes: 90
environment: internal-ci
permissions:
contents: read
outputs:
image_registry: ${{ steps.tag.outputs.registry }}
image_tag: ${{ steps.tag.outputs.tag }}
steps:
# rules_oci + ~10 service images on a stock GHA runner needs ~25 GB
# of free disk; default ubuntu-latest is ~14 GB free. Same recipe
# as pr-checks.yaml's ci-public.
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/.ghcup /opt/hostedtoolcache/CodeQL || true
sudo docker image prune --all --force || true
df -h
- uses: actions/checkout@v4
with:
lfs: true
# Same setup-bazel pin + external-cache manifest as pr-checks.yaml.
# disk-cache is keyed per-workflow so we don't share cache state with
# ci-public/ci-internal (different bazel targets, different shape).
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@4fd964a13a440a8aeb0be47350db2fc640f19ca8
with:
bazelisk-cache: true
bazelisk-version: 1.27.0
disk-cache: ${{ github.workflow }}-images
repository-cache: true
external-cache: |
manifest:
osmo_python_deps: src/locked_requirements.txt
osmo_tests_python_deps: src/tests/locked_requirements.txt
osmo_mypy_deps: bzl/mypy/locked_requirements.txt
pylint_python_deps: bzl/linting/locked_requirements.txt
io_bazel_rules_go: src/runtime/go.mod
bazel_gazelle: src/runtime/go.sum
# nvcr.io auth for rules_oci's `oci_push` (reads ~/.docker/config.json).
# NGC_API_KEY is a repo secret with push scope on nvcr.io/nvstaging.
# NGC's convention: literal username `$oauthtoken` + the API key as
# the password.
- name: Log in to nvcr.io
uses: docker/login-action@v3
with:
registry: nvcr.io
username: $oauthtoken
password: ${{ secrets.NGC_API_KEY }}
# Tag layout: nvcr.io/nvstaging/osmo/<image>:pr-<pr|main>-<run-id>-amd64
# The `-amd64` suffix is appended by rules_oci's per-arch oci_push;
# we expose the FULL tag (with suffix) so downstream uses match the
# actual remote tag.
- id: tag
run: |
SCOPE="${{ github.event.pull_request.number || 'main' }}"
TAG_BASE="pr-${SCOPE}-${GITHUB_RUN_ID}"
echo "registry=nvcr.io/nvstaging/osmo" >> "$GITHUB_OUTPUT"
echo "tag=${TAG_BASE}-amd64" >> "$GITHUB_OUTPUT"
# Minimal --no-gpu image set: 8 service images + client + init-container.
# The public repo has no //ci:push_images orchestrator (that's GitLab-CI
# only — it lives in the internal repo's `ci/` dir). Iterate the
# per-target oci_push rules directly. Each accepts --repository and
# --tag at `bazel run` time, so we don't need to mutate the constants
# repo to redirect from the default nvcr.io/nvidia/osmo path to
# nvcr.io/nvstaging/osmo.
- name: Build and push OSMO images
env:
REMOTE_CACHE: ${{ secrets.BAZEL_REMOTE_CACHE_URL }}
REG: ${{ steps.tag.outputs.registry }}
TAG: ${{ steps.tag.outputs.tag }}
run: |
set -euo pipefail
CACHE_FLAG=()
if [[ -n "${REMOTE_CACHE:-}" ]]; then
CACHE_FLAG=(--remote_cache="$REMOTE_CACHE")
echo "::notice::Using bazel remote cache"
else
echo "::warning::BAZEL_REMOTE_CACHE_URL not set — cold build will be slow (~60 min)"
fi
push_one() {
local target="$1" image="$2"
echo "::group::$image → $REG/$image:$TAG"
echo "▶ $(date -u +%H:%M:%S) bazel run $target"
bazel run --config=ci "${CACHE_FLAG[@]}" "$target" -- \
--repository "$REG/$image" \
--tag "$TAG"
echo "::endgroup::"
}
# SERVICE_IMAGES (per chart's deployment templates)
push_one //src/service/core:service_push_x86_64 service
push_one //src/service/logger:logger_push_x86_64 logger
push_one //src/service/agent:agent_service_push_x86_64 agent
push_one //src/service/authz_sidecar:authz_sidecar_push_x86_64 authz-sidecar
push_one //src/service/router:router_push_x86_64 router
push_one //src/service/worker:worker_push_x86_64 worker
push_one //src/service/delayed_job_monitor:delayed_job_monitor_push_x86_64 delayed-job-monitor
# web-ui uses sh_binary + docker buildx (not oci_push); same flag shape
push_one //src/ui:build_push_web_ui_x86_64 web-ui
# BACKEND_IMAGES the chart's backend_images.{init,client} reference
push_one //src/cli:cli_push_x86_64 client
push_one //src/runtime:init_push_x86_64 init-container
# backend-operator chart deploys these two: without them, the
# operator install hits ImagePullBackOff and helm `--wait` times
# out with `context deadline exceeded`. backend-test-runner is
# only spawned at test-run time (not at install) and stays at
# nvcr.io defaults unless --backend-test-runner-* overrides flow
# in — skip for now to keep the build minimal.
push_one //src/operator:backend_listener_push_x86_64 backend-listener
push_one //src/operator:backend_worker_push_x86_64 backend-worker
# Package the CLI from this checkout for the deploy verification and
# OETF jobs. The client image above already built the expensive
# PyInstaller tree, so this target is a small cached packaging step.
echo "::group::HEAD CLI installer"
bazel build --config=ci "${CACHE_FLAG[@]}" \
//src/cli/packaging/linux:linux_client_installer_x86_64
echo "::endgroup::"
- name: Upload HEAD CLI installer
uses: actions/upload-artifact@v4
with:
name: head-cli-${{ github.run_id }}
path: bazel-bin/src/cli/packaging/linux/linux_client_installer_x86_64.sh
retention-days: 7
if-no-files-found: error
# nvcr.io requires auth for every pull. The deploy-osmo job below
# pre-creates an imagePullSecret in each OSMO namespace using the
# same NGC_API_KEY the push here uses, so AKS can pull.
- name: Step summary
run: |
{
echo "### OSMO images built from source"
echo ""
echo "- Registry: \`${{ steps.tag.outputs.registry }}\`"
echo "- Tag: \`${{ steps.tag.outputs.tag }}\`"
echo "- Source SHA: \`${{ github.sha }}\`"
echo ""
echo "Packages pushed:"
for img in service logger agent authz-sidecar router worker delayed-job-monitor web-ui init-container client backend-listener backend-worker; do
echo " - \`${{ steps.tag.outputs.registry }}/$img:${{ steps.tag.outputs.tag }}\`"
done
} >> "$GITHUB_STEP_SUMMARY"
# ── Stage 1: terraform apply ─────────────────────────────────────────────
# Provisions AKS + Postgres flex + Managed Redis in `vars.AZURE_REGION`.
# Uploads the resulting tfstate + tfvars as artifacts so the `tf-destroy`
# job at the end can clean up regardless of what fails in between.
# POSTGRES_PASSWORD is generated here and written into the tfvars file
# that's uploaded as part of the `tf-state-<run_id>` artifact. The
# deploy/oetf jobs download that artifact and grep the password out —
# cross-job job-outputs don't work for masked values (GitHub filters
# them out, so the receiving job sees an empty string).
tf-apply:
needs: head-chart-contract
if: ${{ needs.head-chart-contract.result == 'success' }}
runs-on: ubuntu-latest
# ~15 min clean apply + one retry (a failed attempt can poll 20+ min
# before Azure errors) + pre-apply cleanup of a dirty RG.
timeout-minutes: 75
environment: internal-ci
env:
ARM_USE_OIDC: true
ARM_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
ARM_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }}
AZURE_REGION: ${{ vars.AZURE_REGION || 'eastus2' }}
AZURE_CLUSTER_NAME: ${{ vars.AZURE_CLUSTER_NAME || 'osmo-deployment-test' }}
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: azure login (OIDC)
uses: azure/login@v2
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.8
- name: install kubectl
run: |
set -euo pipefail
KUBECTL_VERSION=v1.31.0
curl -fsSLo /tmp/kubectl \
"https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl"
curl -fsSL "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl.sha256" \
| awk '{print $1" /tmp/kubectl"}' | sha256sum -c -
sudo install -m 0755 /tmp/kubectl /usr/local/bin/kubectl
- name: environment snapshot
run: |
echo "::group::az identity"; az account show -o table || true; echo "::endgroup::"
echo "::group::tool versions"; terraform version; az version 2>&1 | head -5; echo "::endgroup::"
echo "::group::target RG"; az group show --name "$AZURE_RESOURCE_GROUP" -o table || \
echo "(RG not found)"; echo "::endgroup::"
echo "::group::env (non-secret)"
echo "AZURE_SUBSCRIPTION_ID=$AZURE_SUBSCRIPTION_ID"
echo "AZURE_RESOURCE_GROUP=$AZURE_RESOURCE_GROUP"
echo "AZURE_REGION=$AZURE_REGION"
echo "AZURE_CLUSTER_NAME=$AZURE_CLUSTER_NAME"
echo "::endgroup::"
- name: generate per-run postgres password
id: gen_pg
run: |
PG_PASS="$(openssl rand -base64 32 | tr -d '/=+' | head -c 32)Aa1!"
echo "::add-mask::$PG_PASS"
echo "value=$PG_PASS" >> "$GITHUB_OUTPUT"
# Single source of truth for the TF inputs the apply + destroy steps
# use. Stored in $RUNNER_TEMP (per-job; this job uploads as artifact
# for the destroy job to download). Non-default values:
# - aks_private_cluster_enabled=false GHA runners are public-net.
# - node_instance_type=Standard_D8s_v3 D4s_v3 left K8_CPU=0 after
# Azure daemons + OSMO sidecars.
# - node_group_min_size=3 headroom for scenario tests.
# - redis_high_availability_enabled=false
# ephemeral stack; see variables.tf.
# - redis_sku_name=MemoryOptimized_M10
# redis_location=westus3 westus2 stopped allocating
# Managed Redis (2026-07); the
# apply step retries with
# X3/eastus2.
- name: build TF var file
env:
PG_PASS: ${{ steps.gen_pg.outputs.value }}
run: |
cat > "$RUNNER_TEMP/azure.tfvars" <<TFVARS
subscription_id = "$AZURE_SUBSCRIPTION_ID"
resource_group_name = "$AZURE_RESOURCE_GROUP"
azure_region = "$AZURE_REGION"
cluster_name = "$AZURE_CLUSTER_NAME"
postgres_password = "$PG_PASS"
aks_private_cluster_enabled = false
node_instance_type = "Standard_D8s_v3"
node_group_min_size = 3
redis_high_availability_enabled = false
redis_sku_name = "MemoryOptimized_M10"
redis_location = "westus3"
TFVARS
grep -v postgres_password "$RUNNER_TEMP/azure.tfvars"
# Sanity check: the RG named by vars.AZURE_RESOURCE_GROUP must
# already exist and live in vars.AZURE_REGION. The OIDC SP is
# RG-scoped (Contributor on the named RG only, not subscription-
# level), so workflow-side `az group create` doesn't work; moving
# to a different region is a manual op.
- name: TEMP — verify resource group is in $AZURE_REGION
run: |
set -euo pipefail
existing=$(az group show --name "$AZURE_RESOURCE_GROUP" --query location -o tsv 2>/dev/null || true)
if [ -z "$existing" ]; then
echo "::error::resource group '$AZURE_RESOURCE_GROUP' not found (or SP lacks read access)."
exit 1
elif [ "$existing" != "$AZURE_REGION" ]; then
echo "::error::RG '$AZURE_RESOURCE_GROUP' lives in '$existing' but workflow expects '$AZURE_REGION'."
exit 1
fi
echo "::notice::RG $AZURE_RESOURCE_GROUP confirmed in $AZURE_REGION"
# If a prior run was killed mid-destroy, resources may exist in the
# RG without matching TF state — `terraform apply` would then fail
# with "Resource already exists, import into state". Wipe leftovers.
- name: TEMP — pre-apply cleanup (delete leftover resources in RG)
run: |
set -euo pipefail
echo "▶ $(date -u +%H:%M:%S) checking for leftover resources in $AZURE_RESOURCE_GROUP"
IDS=$(az resource list --resource-group "$AZURE_RESOURCE_GROUP" --query '[].id' -o tsv || true)
if [ -z "$IDS" ]; then
echo "::notice::resource group is clean — nothing to delete"
exit 0
fi
echo "::warning::found $(echo "$IDS" | wc -l) leftover resource(s) from a prior partial run"
echo "$IDS"
fire_deletes() {
local ids="$1" budget="$2"
while IFS= read -r id; do
[ -z "$id" ] && continue
az resource delete --ids "$id" --no-wait 2>&1 | head -"$budget" &
done <<< "$ids"
wait
}
echo "▶ $(date -u +%H:%M:%S) firing async deletes (--no-wait)"
fire_deletes "$IDS" 2
echo "▶ $(date -u +%H:%M:%S) polling until RG is empty (max 30 min)"
deadline=$(( $(date +%s) + 1800 ))
last_refire=$(date +%s)
while [ "$(date +%s)" -lt "$deadline" ]; do
ids_now=$(az resource list --resource-group "$AZURE_RESOURCE_GROUP" --query '[].id' -o tsv || true)
count=$(echo -n "$ids_now" | grep -c . || true)
echo " $(date -u +%H:%M:%S) remaining: $count"
[ "$count" = "0" ] && break
now=$(date +%s)
if [ $(( now - last_refire )) -ge 300 ]; then
echo " $(date -u +%H:%M:%S) ↻ re-firing deletes on $count remaining resource(s)"
fire_deletes "$ids_now" 1
last_refire=$now
fi
sleep 30
done
if [ "$count" != "0" ]; then
echo "::error::cleanup timed out — $count resource(s) still present"
az resource list --resource-group "$AZURE_RESOURCE_GROUP" -o table
exit 1
fi
echo "::notice::cleanup complete"
- name: TEMP — terraform apply (provision AKS + Postgres + Redis)
working-directory: deployments/terraform/azure/example
run: |
set -euo pipefail
echo "::notice::terraform apply starting — expected ~10–15 min (AKS dominates)"
echo "::group::terraform init"
terraform init -input=false -no-color
echo "::endgroup::"
# Retry once to absorb one-off ARM 5xx blips. The second apply is
# incremental against persisted state; persistent errors (quota,
# capacity) still fail the job.
echo "::group::terraform apply"
apply_failed=""
terraform apply -input=false -auto-approve -no-color -var-file="$RUNNER_TEMP/azure.tfvars" || apply_failed=1
echo "::endgroup::"
if [ -n "$apply_failed" ]; then
echo "::warning::terraform apply attempt 1 failed — retrying once"
if ! terraform state list 2>/dev/null | grep -qx 'azurerm_managed_redis.main'; then
# A failed Managed Redis create leaves the cluster in Azure but
# NOT in TF state (the provider only records finished creates),
# so the retry would fail with "already exists — needs import".
# Delete the orphan, waiting for the name to be released since
# the retry reuses it, then retry in another region+SKU — the
# likely cause is regional Redis Enterprise capacity.
for id in $(az resource list --resource-group "$AZURE_RESOURCE_GROUP" \
--resource-type Microsoft.Cache/redisEnterprise --query '[].id' -o tsv || true); do
echo "::warning::deleting orphaned Managed Redis left by the failed create: ${id##*/}"
az resource delete --ids "$id" || true
done
# Rewrite the tfvars rather than passing -var, so the artifact
# tf-destroy and deploy-osmo replay still describes the stack
# that was actually built.
sed -i -e 's|^redis_sku_name .*|redis_sku_name = "ComputeOptimized_X3"|' \
-e 's|^redis_location .*|redis_location = "eastus2"|' \
"$RUNNER_TEMP/azure.tfvars"
echo "::warning::Redis did not create — retrying with fallback combo X3/eastus2"
fi
echo "::group::terraform apply (retry)"
terraform apply -input=false -auto-approve -no-color -var-file="$RUNNER_TEMP/azure.tfvars"
echo "::endgroup::"
fi
echo "::group::resources provisioned (terraform state list)"
terraform state list || true
echo "::endgroup::"
{
echo "### TEMP terraform apply ✅"
echo ""
echo "- AKS: \`${AZURE_CLUSTER_NAME}\` in \`${AZURE_RESOURCE_GROUP}\` (${AZURE_REGION})"
echo "- Postgres flex: \`${AZURE_CLUSTER_NAME}-postgres\`"
echo "- Redis: \`${AZURE_CLUSTER_NAME}-redis\`"
echo "- finished at: $(date -u +%H:%M:%SZ)"
} >> "$GITHUB_STEP_SUMMARY"
# Own always() step — stashing inside the apply step would be skipped
# when it fails or the job times out mid-apply. The STASH_RAN marker
# makes the artifact exist even with no state file, so tf-destroy can
# download unconditionally and treat a download failure as transient.
- name: stash tfstate + tfvars for upload
if: always()
run: |
tf_dir=deployments/terraform/azure/example
mkdir -p tf-state
cp "$tf_dir/terraform.tfstate" tf-state/ 2>/dev/null || true
cp "$tf_dir/.terraform.lock.hcl" tf-state/ 2>/dev/null || true
cp "$RUNNER_TEMP/azure.tfvars" tf-state/ 2>/dev/null || true
touch tf-state/STASH_RAN
ls -la tf-state/
# Upload terraform state (and the tfvars file) so the tf-destroy job
# can download and replay the same plan. `if: always()` so a partial
# apply still uploads whatever state exists.
- name: upload terraform state + tfvars (for tf-destroy)
if: always()
uses: actions/upload-artifact@v4
with:
name: tf-state-${{ github.run_id }}
path: tf-state/
retention-days: 7
if-no-files-found: warn
# upload-artifact@v4 excludes dotfiles by default — that'd drop
# `.terraform.lock.hcl`, which deploy-osmo + tf-destroy need to
# `terraform init` against the same provider versions tf-apply
# used.
include-hidden-files: true
# ── Stage 2: deploy OSMO chart + verify-hello ────────────────────────────
# Refreshes kubectl creds against the freshly-applied AKS, pre-creates an
# nvcr.io pull secret, then invokes the wrapper with SKIP_OETF=1 so only
# bootstrap + deploy stages run.
deploy-osmo:
needs: [head-chart-contract, build-images, tf-apply]
if: >-
${{ !cancelled()
&& needs.build-images.result == 'success'
&& needs.tf-apply.result == 'success' }}
runs-on: ubuntu-latest
timeout-minutes: 30
environment: internal-ci
env:
ARM_USE_OIDC: true
ARM_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
ARM_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
RUN_DIR: ${{ github.workspace }}/runs/deployment-test-azure
OSMO_IMAGE_REGISTRY: ${{ needs.build-images.outputs.image_registry }}
OSMO_IMAGE_TAG: ${{ needs.build-images.outputs.image_tag }}
OSMO_CHART_VERSION: ${{ needs.head-chart-contract.outputs.chart_version }}
NGC_SECRET_NAME: nvcr-pull
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: azure login (OIDC)
uses: azure/login@v2
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
# deploy-osmo-minimal.sh (called by the wrapper's stage_deploy) does
# an unconditional `command -v terraform` preflight check, even
# though --skip-terraform tells it not to actually run terraform.
# Install it to satisfy that check.
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.8
- name: install kubectl + helm
run: |
set -euo pipefail
KUBECTL_VERSION=v1.31.0
curl -fsSLo /tmp/kubectl \
"https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl"
curl -fsSL "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl.sha256" \
| awk '{print $1" /tmp/kubectl"}' | sha256sum -c -
sudo install -m 0755 /tmp/kubectl /usr/local/bin/kubectl
HELM_VERSION=v3.16.2
HELM_SHA256=9318379b847e333460d33d291d4c088156299a26cd93d570a7f5d0c36e50b5bb
curl -fsSLo /tmp/helm.tgz "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz"
echo "${HELM_SHA256} /tmp/helm.tgz" | sha256sum -c -
tar -xzf /tmp/helm.tgz -C /tmp linux-amd64/helm
sudo install -m 0755 /tmp/linux-amd64/helm /usr/local/bin/helm
- name: Download HEAD CLI installer
uses: actions/download-artifact@v4
with:
name: head-cli-${{ github.run_id }}
path: head-cli/
- name: Install HEAD osmo CLI
run: |
set -euo pipefail
installer=$(find head-cli -type f -name 'linux_client_installer_x86_64.sh' -print -quit)
if [[ -z "$installer" ]]; then
echo "::error::HEAD CLI installer artifact is missing"
exit 1
fi
bash "$installer"
osmo version
# GitHub Actions filters secret/masked values out of cross-job
# outputs, so we can't propagate POSTGRES_PASSWORD via
# `needs.tf-apply.outputs.*` — the receiving job sees an empty
# string. Workaround: download the tfvars file from the tf-state
# artifact tf-apply uploaded and grep the password out.
- name: download tf-state artifact (for POSTGRES_PASSWORD)
uses: actions/download-artifact@v4
with:
name: tf-state-${{ github.run_id }}
path: tf-state-download/
- name: extract POSTGRES_PASSWORD from tfvars
id: pg
run: |
set -euo pipefail
PG_PASS=$(grep '^postgres_password' tf-state-download/azure.tfvars | sed 's/^[^"]*"\(.*\)".*/\1/')
if [ -z "$PG_PASS" ]; then
echo "::error::POSTGRES_PASSWORD not found in tf-state-download/azure.tfvars"
exit 1
fi
echo "::add-mask::$PG_PASS"
echo "value=$PG_PASS" >> "$GITHUB_OUTPUT"
# deploy-osmo-minimal.sh shells out to `terraform output` to read
# connection strings (postgres FQDN, redis endpoint, etc.) for the
# chart's helm values, even with --skip-terraform. Without these
# three things the call fails with "Module not installed":
# 1. terraform.tfstate present in the working dir (state)
# 2. .terraform.lock.hcl present (pinned provider versions)
# 3. `terraform init` to download providers + modules locally
- name: stage tfstate + terraform init
working-directory: deployments/terraform/azure/example
run: |
set -euo pipefail
echo "::group::tf-state-download contents"
ls -la "$GITHUB_WORKSPACE/tf-state-download/"
echo "::endgroup::"
for f in terraform.tfstate .terraform.lock.hcl; do
if [ ! -f "$GITHUB_WORKSPACE/tf-state-download/$f" ]; then
echo "::error::$f missing from tf-state artifact — tf-apply upload step lost it"
exit 1
fi
cp "$GITHUB_WORKSPACE/tf-state-download/$f" .
done
terraform init -input=false -no-color
# Wire kubectl to the freshly-applied AKS, then pre-create an
# nvcr.io docker-registry secret in every OSMO namespace. The
# chart's deploy script (deploy-k8s.sh) skips its own
# kubectl-create-secret path when the named secret already exists,
# so pre-creating avoids passing --ngc-api-key on the wrapper's
# arg surface.
- name: wire kubectl + pre-create nvcr.io pull secret
env:
AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }}
AZURE_CLUSTER_NAME: ${{ vars.AZURE_CLUSTER_NAME || 'osmo-deployment-test' }}
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
run: |
set -euo pipefail
echo "▶ az aks get-credentials"
az aks get-credentials \
--resource-group "$AZURE_RESOURCE_GROUP" \
--name "$AZURE_CLUSTER_NAME" \
--overwrite-existing --admin
kubectl cluster-info | head -3
echo "▶ ensuring OSMO namespaces exist"
for ns in osmo-minimal osmo-operator osmo-workflows; do
kubectl create namespace "$ns" --dry-run=client -o yaml | kubectl apply -f -
done
# Chart-generated workflow task pods set `runtimeClassName: nvidia`.
# On CPU-only deploys (--no-gpu), without this stub k8s rejects them.
echo "▶ applying nvidia RuntimeClass stub (CPU-mode shim)"
printf '%s\n' \
'apiVersion: node.k8s.io/v1' \
'kind: RuntimeClass' \
'metadata:' \
' name: nvidia' \
'handler: runc' \
| kubectl apply -f -
echo "▶ creating nvcr.io pull secret '$NGC_SECRET_NAME' in each namespace"
# NGC convention: username is the literal string `$oauthtoken`
# (single-quoted here so bash doesn't try to expand it).
for ns in osmo-minimal osmo-operator osmo-workflows; do
kubectl create secret docker-registry "$NGC_SECRET_NAME" \
--docker-server=nvcr.io \
--docker-username='$oauthtoken' \
--docker-password="$NGC_API_KEY" \
--namespace "$ns" \
--dry-run=client -o yaml \
| kubectl apply -f -
done
# Package the split charts from this checkout into a temporary Helm repo.
# deploy-k8s.sh keeps using its normal repository interface, while every
# OSMO artifact under test comes from this source SHA.
- name: deploy OSMO with HEAD charts (chart install + verify-hello)
id: deploy_osmo
env:
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }}
AZURE_REGION: ${{ vars.AZURE_REGION || 'eastus2' }}
AZURE_CLUSTER_NAME: ${{ vars.AZURE_CLUSTER_NAME || 'osmo-deployment-test' }}
POSTGRES_PASSWORD: ${{ steps.pg.outputs.value }}
# The wrapper injects this into backend_images.credential so dynamic
# workflow pods can pull the HEAD init-container/client images.
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
OSMO_HELM_REPO_NAME: osmo-head
OSMO_HELM_REPO_URL: http://127.0.0.1:8879
SKIP_OETF: "1"
SKIP_TEARDOWN: "1"
run: |
set -euo pipefail
chart_repo_dir="$RUNNER_TEMP/osmo-head-helm-repo"
mkdir -p "$chart_repo_dir"
service_version="$(helm show chart deployments/charts/service \
| awk '$1 == "version:" { print $2; exit }')"
operator_version="$(helm show chart deployments/charts/backend-operator \
| awk '$1 == "version:" { print $2; exit }')"
if [[ -z "$service_version" || -z "$operator_version" \
|| "$service_version" != "$operator_version" ]]; then
echo "::error::HEAD service ($service_version) and backend-operator ($operator_version) chart versions must match"
exit 1
fi
if [[ "$service_version" != "$OSMO_CHART_VERSION" ]]; then
echo "::error::HEAD chart changed between contract and deploy: contract=$OSMO_CHART_VERSION deploy=$service_version"
exit 1
fi
helm package deployments/charts/service --destination "$chart_repo_dir"
helm package deployments/charts/backend-operator --destination "$chart_repo_dir"
helm repo index "$chart_repo_dir"
python3 -m http.server 8879 \
--bind 127.0.0.1 \
--directory "$chart_repo_dir" \
>"$RUNNER_TEMP/osmo-head-helm-repo.log" 2>&1 &
chart_repo_pid=$!
trap 'kill "$chart_repo_pid" 2>/dev/null || true' EXIT
chart_repo_ready=""
for _ in {1..10}; do
if curl -fsS "$OSMO_HELM_REPO_URL/index.yaml" >/dev/null 2>&1; then
chart_repo_ready=1
break
fi
sleep 1
done
if [[ -z "$chart_repo_ready" ]]; then
cat "$RUNNER_TEMP/osmo-head-helm-repo.log"
echo "::error::HEAD chart repository did not become ready"
exit 1
fi
# Pre-add without credentials. deploy-k8s.sh detects the matching URL
# and preserves this exact local repository.
helm repo add "$OSMO_HELM_REPO_NAME" "$OSMO_HELM_REPO_URL"
helm show chart "$OSMO_HELM_REPO_NAME/service" \
--version "$OSMO_CHART_VERSION" >/dev/null
helm show chart "$OSMO_HELM_REPO_NAME/backend-operator" \
--version "$OSMO_CHART_VERSION" >/dev/null
echo "::notice::deploy stage starting with HEAD charts $OSMO_CHART_VERSION — expected ~5–15 min"
mkdir -p "$RUN_DIR"
bash deployments/scripts/run-deployment-test.sh --provider azure
echo "▶ $(date -u +%H:%M:%S) deploy stage done"
- name: deploy result summary
if: always() && steps.deploy_osmo.conclusion != 'skipped'
env:
AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }}
AZURE_CLUSTER_NAME: ${{ vars.AZURE_CLUSTER_NAME || 'osmo-deployment-test' }}
run: |
set +e
service_chart="$(helm list -n osmo-minimal --output json 2>/dev/null \
| python3 -c 'import json,sys; rs=json.load(sys.stdin); print(rs[0].get("chart","-") if rs else "-")' 2>/dev/null || echo "-")"
operator_chart="$(helm list -n osmo-operator --output json 2>/dev/null \
| python3 -c 'import json,sys; rs=json.load(sys.stdin); print(rs[0].get("chart","-") if rs else "-")' 2>/dev/null || echo "-")"
chart_version="HEAD ${OSMO_CHART_VERSION:-?} (installed: $service_chart, $operator_chart) from ${{ github.sha }}"
pod_summary="$(kubectl get pods --all-namespaces --no-headers 2>/dev/null \
| awk '$1 == "osmo-minimal" || $1 == "osmo-operator" {print $4}' \
| sort | uniq -c | awk '{printf "%s×%s ", $1, $2}' || echo "-")"
icon='✅'; verify_text='passed'
if [ "${{ steps.deploy_osmo.outcome }}" != "success" ]; then icon='❌'; verify_text='failed (see step logs)'; fi
{
echo "### Deploy stage ${icon}"
echo ""
echo "- chart: \`${chart_version}\`"
echo "- image: \`${OSMO_IMAGE_REGISTRY:-?}/*:${OSMO_IMAGE_TAG:-?}\`"
echo "- pods: ${pod_summary:-?}"
echo "- verify-hello: ${verify_text}"
if [ -f "$RUN_DIR/deployment-test-result.json" ]; then
echo ""
echo "<details><summary>wrapper result JSON</summary>"
echo ""
echo '```json'
cat "$RUN_DIR/deployment-test-result.json"
echo '```'
echo "</details>"
fi
} >> "$GITHUB_STEP_SUMMARY"
- name: upload deploy logs
if: always()
uses: actions/upload-artifact@v4
with:
name: deploy-osmo-${{ github.run_id }}
path: runs/deployment-test-azure/**
retention-days: 14
if-no-files-found: warn
# ── Stage 3: OETF smoke tests ────────────────────────────────────────────
# Refreshes kubectl creds against the AKS cluster the deploy job left
# running, then invokes the wrapper with SKIP_DEPLOY=1 so only bootstrap
# + oetf-smoke stages run. The wrapper sets up its own kubectl
# port-forward to osmo-gateway and runs `bazel run //test/oetf:run`.
oetf:
needs: [build-images, tf-apply, deploy-osmo]
if: ${{ needs.deploy-osmo.result == 'success' }}
runs-on: ubuntu-latest
timeout-minutes: 30
environment: internal-ci
env:
ARM_USE_OIDC: true
ARM_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
ARM_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
RUN_DIR: ${{ github.workspace }}/runs/deployment-test-azure
OSMO_IMAGE_REGISTRY: ${{ needs.build-images.outputs.image_registry }}
OSMO_IMAGE_TAG: ${{ needs.build-images.outputs.image_tag }}
# OETF lives at <repo>/test/oetf in the public repo; the wrapper's
# REPO_ROOT computation assumes external/ submodule wrapping and
# overshoots on a standalone checkout, so override explicitly.
OETF_REPO_ROOT: ${{ github.workspace }}
# OETF tag set. Only remaining hole vs the broad `kind` tag is
# router-connectivity (Azure CoreDNS, not OETF). task-runtime-environment
# was unblocked by #1128.
# 8 tests: smoke api + smoke ws + 2 positive scenarios + 4 negative.
OETF_TAGS: api,websocket,logger,task-env,negative
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: azure login (OIDC)
uses: azure/login@v2
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
# deploy-osmo-minimal.sh has an unconditional `command -v terraform`
# preflight check that the wrapper's stage_oetf path also trips
# (via stage_bootstrap → reachability check that exits if any
# required tool is missing). Install it.
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.8
- name: install kubectl
run: |
set -euo pipefail
KUBECTL_VERSION=v1.31.0
curl -fsSLo /tmp/kubectl \
"https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl"
curl -fsSL "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl.sha256" \
| awk '{print $1" /tmp/kubectl"}' | sha256sum -c -
sudo install -m 0755 /tmp/kubectl /usr/local/bin/kubectl
# bazel is needed for `bazel run //test/oetf:run` inside the wrapper's
# oetf-smoke stage. disk-cache key shared with the build-images job so
# OETF target builds can hit the cache.
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@4fd964a13a440a8aeb0be47350db2fc640f19ca8
with:
bazelisk-cache: true
bazelisk-version: 1.27.0
disk-cache: ${{ github.workflow }}-images
repository-cache: true
external-cache: |
manifest:
osmo_python_deps: src/locked_requirements.txt
osmo_tests_python_deps: src/tests/locked_requirements.txt