Skip to content

Commit fe99eec

Browse files
committed
2 parents 3a047f2 + 43c9534 commit fe99eec

31 files changed

Lines changed: 3277 additions & 94 deletions

File tree

.github/workflows/components-build-deploy.yml

100755100644
Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
- 'components/ambient-control-plane/**'
1616
- 'components/ambient-mcp/**'
1717
- 'components/ambient-ui/**'
18+
- 'components/credential-sidecars/**'
1819
pull_request:
1920
branches: [main, alpha]
2021
paths:
@@ -29,10 +30,11 @@ on:
2930
- 'components/ambient-control-plane/**'
3031
- 'components/ambient-mcp/**'
3132
- 'components/ambient-ui/**'
33+
- 'components/credential-sidecars/**'
3234
workflow_dispatch:
3335
inputs:
3436
components:
35-
description: 'Components to build (comma-separated: frontend,backend,operator,ambient-runner,state-sync,public-api,ambient-api-server,ambient-control-plane,ambient-mcp,ambient-ui) - leave empty for all'
37+
description: 'Components to build (comma-separated: frontend,backend,operator,ambient-runner,state-sync,public-api,ambient-api-server,ambient-control-plane,ambient-mcp,ambient-ui,credential-github,credential-jira,credential-k8s,credential-google) - leave empty for all'
3638
required: false
3739
type: string
3840
default: ''
@@ -63,7 +65,11 @@ jobs:
6365
{"name":"ambient-api-server","context":"./components/ambient-api-server","image":"quay.io/ambient_code/vteam_api_server","dockerfile":"./components/ambient-api-server/Dockerfile"},
6466
{"name":"ambient-control-plane","context":"./components","image":"quay.io/ambient_code/vteam_control_plane","dockerfile":"./components/ambient-control-plane/Dockerfile"},
6567
{"name":"ambient-mcp","context":"./components/ambient-mcp","image":"quay.io/ambient_code/vteam_mcp","dockerfile":"./components/ambient-mcp/Dockerfile"},
66-
{"name":"ambient-ui","context":"./components","image":"quay.io/ambient_code/vteam_ambient_ui","dockerfile":"./components/ambient-ui/Dockerfile"}
68+
{"name":"ambient-ui","context":"./components","image":"quay.io/ambient_code/vteam_ambient_ui","dockerfile":"./components/ambient-ui/Dockerfile"},
69+
{"name":"credential-github","context":"./components","image":"quay.io/ambient_code/vteam_credential_github","dockerfile":"./components/credential-sidecars/github/Dockerfile"},
70+
{"name":"credential-jira","context":"./components","image":"quay.io/ambient_code/vteam_credential_jira","dockerfile":"./components/credential-sidecars/jira/Dockerfile"},
71+
{"name":"credential-k8s","context":"./components","image":"quay.io/ambient_code/vteam_credential_k8s","dockerfile":"./components/credential-sidecars/k8s/Dockerfile"},
72+
{"name":"credential-google","context":"./components","image":"quay.io/ambient_code/vteam_credential_google","dockerfile":"./components/credential-sidecars/google/Dockerfile"}
6773
]'
6874
6975
SELECTED="${{ github.event.inputs.components }}"
@@ -413,6 +419,14 @@ jobs:
413419
AMBIENT_CODE_RUNNER_IMAGE="quay.io/ambient_code/vteam_claude_runner:${{ github.sha }}" \
414420
STATE_SYNC_IMAGE="quay.io/ambient_code/vteam_state_sync:${{ github.sha }}"
415421
422+
- name: Update credential sidecar image tags on control plane
423+
run: |
424+
oc set env deployment/ambient-control-plane -n ambient-code \
425+
GITHUB_MCP_IMAGE="quay.io/ambient_code/vteam_credential_github:${{ github.sha }}" \
426+
JIRA_MCP_IMAGE="quay.io/ambient_code/vteam_credential_jira:${{ github.sha }}" \
427+
K8S_MCP_IMAGE="quay.io/ambient_code/vteam_credential_k8s:${{ github.sha }}" \
428+
GOOGLE_MCP_IMAGE="quay.io/ambient_code/vteam_credential_google:${{ github.sha }}"
429+
416430
- name: Pin OPERATOR_IMAGE in operator-config ConfigMap
417431
run: |
418432
oc patch configmap operator-config -n ambient-code --type=merge \
@@ -492,6 +506,14 @@ jobs:
492506
AMBIENT_CODE_RUNNER_IMAGE="quay.io/ambient_code/vteam_claude_runner:${{ github.sha }}" \
493507
STATE_SYNC_IMAGE="quay.io/ambient_code/vteam_state_sync:${{ github.sha }}"
494508
509+
- name: Update credential sidecar image tags on control plane
510+
run: |
511+
oc set env deployment/ambient-control-plane -n ambient-code \
512+
GITHUB_MCP_IMAGE="quay.io/ambient_code/vteam_credential_github:${{ github.sha }}" \
513+
JIRA_MCP_IMAGE="quay.io/ambient_code/vteam_credential_jira:${{ github.sha }}" \
514+
K8S_MCP_IMAGE="quay.io/ambient_code/vteam_credential_k8s:${{ github.sha }}" \
515+
GOOGLE_MCP_IMAGE="quay.io/ambient_code/vteam_credential_google:${{ github.sha }}"
516+
495517
- name: Pin OPERATOR_IMAGE in operator-config ConfigMap
496518
run: |
497519
oc patch configmap operator-config -n ambient-code --type=merge \

.github/workflows/prod-release-deploy.yaml

100755100644
Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
type: boolean
1919
default: true
2020
components:
21-
description: 'Components to build (comma-separated: frontend,backend,operator,ambient-runner,state-sync,public-api,ambient-api-server,ambient-control-plane,ambient-mcp,ambient-ui) - leave empty for all'
21+
description: 'Components to build (comma-separated: frontend,backend,operator,ambient-runner,state-sync,public-api,ambient-api-server,ambient-control-plane,ambient-mcp,ambient-ui,credential-github,credential-jira,credential-k8s,credential-google) - leave empty for all'
2222
required: false
2323
type: string
2424
default: ''
@@ -239,7 +239,11 @@ jobs:
239239
{"name":"ambient-api-server","context":"./components/ambient-api-server","image":"quay.io/ambient_code/vteam_api_server","dockerfile":"./components/ambient-api-server/Dockerfile"},
240240
{"name":"ambient-control-plane","context":"./components","image":"quay.io/ambient_code/vteam_control_plane","dockerfile":"./components/ambient-control-plane/Dockerfile"},
241241
{"name":"ambient-mcp","context":"./components/ambient-mcp","image":"quay.io/ambient_code/vteam_mcp","dockerfile":"./components/ambient-mcp/Dockerfile"},
242-
{"name":"ambient-ui","context":"./components","image":"quay.io/ambient_code/vteam_ambient_ui","dockerfile":"./components/ambient-ui/Dockerfile"}
242+
{"name":"ambient-ui","context":"./components","image":"quay.io/ambient_code/vteam_ambient_ui","dockerfile":"./components/ambient-ui/Dockerfile"},
243+
{"name":"credential-github","context":"./components","image":"quay.io/ambient_code/vteam_credential_github","dockerfile":"./components/credential-sidecars/github/Dockerfile"},
244+
{"name":"credential-jira","context":"./components","image":"quay.io/ambient_code/vteam_credential_jira","dockerfile":"./components/credential-sidecars/jira/Dockerfile"},
245+
{"name":"credential-k8s","context":"./components","image":"quay.io/ambient_code/vteam_credential_k8s","dockerfile":"./components/credential-sidecars/k8s/Dockerfile"},
246+
{"name":"credential-google","context":"./components","image":"quay.io/ambient_code/vteam_credential_google","dockerfile":"./components/credential-sidecars/google/Dockerfile"}
243247
]'
244248
245249
FORCE_ALL="${{ github.event.inputs.force_build_all }}"
@@ -710,6 +714,28 @@ jobs:
710714
oc set env deployment/agentic-operator -n ambient-code -c agentic-operator $ARGS
711715
fi
712716
717+
718+
- name: Update credential sidecar image tags on control plane
719+
run: |
720+
RELEASE_TAG="${{ needs.release.outputs.new_tag }}"
721+
BUILT="${{ steps.built.outputs.names }}"
722+
ARGS=""
723+
if echo ",$BUILT," | grep -q ",credential-github,"; then
724+
ARGS="$ARGS GITHUB_MCP_IMAGE=quay.io/ambient_code/vteam_credential_github:${RELEASE_TAG}"
725+
fi
726+
if echo ",$BUILT," | grep -q ",credential-jira,"; then
727+
ARGS="$ARGS JIRA_MCP_IMAGE=quay.io/ambient_code/vteam_credential_jira:${RELEASE_TAG}"
728+
fi
729+
if echo ",$BUILT," | grep -q ",credential-k8s,"; then
730+
ARGS="$ARGS K8S_MCP_IMAGE=quay.io/ambient_code/vteam_credential_k8s:${RELEASE_TAG}"
731+
fi
732+
if echo ",$BUILT," | grep -q ",credential-google,"; then
733+
ARGS="$ARGS GOOGLE_MCP_IMAGE=quay.io/ambient_code/vteam_credential_google:${RELEASE_TAG}"
734+
fi
735+
if [ -n "$ARGS" ]; then
736+
oc set env deployment/ambient-control-plane -n ambient-code $ARGS
737+
fi
738+
713739
- name: Pin OPERATOR_IMAGE in operator-config ConfigMap
714740
run: |
715741
RELEASE_TAG="${{ needs.release.outputs.new_tag }}"

components/ambient-api-server/plugins/credentials/migration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func rolesMigration() *gormigrate.Migration {
108108

109109
func dropProjectIDMigration() *gormigrate.Migration {
110110
return &gormigrate.Migration{
111-
ID: "202505120001",
111+
ID: "202605060003",
112112
Migrate: func(tx *gorm.DB) error {
113113
return tx.Exec(`ALTER TABLE IF EXISTS credentials DROP COLUMN IF EXISTS project_id`).Error
114114
},

components/ambient-api-server/plugins/projects/migration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func promptMigration() *gormigrate.Migration {
4242

4343
func dropDisplayNameMigration() *gormigrate.Migration {
4444
return &gormigrate.Migration{
45-
ID: "202505090001",
45+
ID: "202605060002",
4646
Migrate: func(tx *gorm.DB) error {
4747
return tx.Exec(`ALTER TABLE IF EXISTS projects DROP COLUMN IF EXISTS display_name`).Error
4848
},

components/ambient-api-server/plugins/roleBindings/migration.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,19 @@ func typedFKMigration() *gormigrate.Migration {
3434
return &gormigrate.Migration{
3535
ID: "202603100139",
3636
Migrate: func(tx *gorm.DB) error {
37-
// Drop the old unique index that depends on scope_id before altering columns
37+
var exists bool
38+
if err := tx.Raw(`SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'role_bindings')`).Scan(&exists).Error; err != nil {
39+
return err
40+
}
41+
if !exists {
42+
return nil
43+
}
3844
if err := tx.Exec(`DROP INDEX IF EXISTS idx_binding_lookup`).Error; err != nil {
3945
return err
4046
}
41-
// Make user_id nullable
4247
if err := tx.Exec(`ALTER TABLE role_bindings ALTER COLUMN user_id DROP NOT NULL`).Error; err != nil {
4348
return err
4449
}
45-
// Drop scope_id column (replaced by typed FKs)
4650
if err := tx.Exec(`ALTER TABLE role_bindings DROP COLUMN IF EXISTS scope_id`).Error; err != nil {
4751
return err
4852
}

0 commit comments

Comments
 (0)