Skip to content

Commit

Permalink
prepare RP pipelines for MSFT INT (#955)
Browse files Browse the repository at this point in the history
prepare RP pipelines for MSFT INT

* add schema options to specify RP image tags
* pin RP images for INT

---------

Signed-off-by: Gerd Oberlechner <[email protected]>
  • Loading branch information
geoberle authored Dec 11, 2024
1 parent fb0a2b8 commit bd5b9d8
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 8 deletions.
6 changes: 4 additions & 2 deletions backend/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
include ../setup-env.mk
-include ../setup-env.mk

COMMIT ?= $(shell git rev-parse --short=7 HEAD)
ifndef COMMIT
COMMIT := $(shell git rev-parse --short=7 HEAD)
endif
ARO_HCP_BASE_IMAGE ?= ${ARO_HCP_IMAGE_ACR}.azurecr.io
ARO_HCP_BACKEND_IMAGE ?= $(ARO_HCP_BASE_IMAGE)/arohcpbackend:$(COMMIT)

Expand Down
2 changes: 2 additions & 0 deletions backend/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ resourceGroups:
configRef: aksName
- name: DB_NAME
configRef: frontend.cosmosDB.name
- name: COMMIT
configRef: backend.imageTag
4 changes: 4 additions & 0 deletions config/config.msft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ clouds:
imageTag: 0b3c08f
ocMirror:
imageTag: 0b3c08f
frontend:
imageTag: 0b3c08f
backend:
imageTag: 0b3c08f

environments:
int:
Expand Down
16 changes: 16 additions & 0 deletions config/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,24 @@
"armHelperFPAPrincipalId": {
"type": "string"
},
"backend": {
"type": "object",
"properties": {
"imageTag": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"imageTag"
]
},
"frontend": {
"type": "object",
"properties": {
"imageTag": {
"type": "string"
},
"cosmosDB": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -142,6 +157,7 @@
},
"additionalProperties": false,
"required": [
"imageTag",
"cosmosDB",
"cert"
]
Expand Down
6 changes: 6 additions & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ clouds:
# Hypershift Operator
hypershiftOperator:
imageTag: 9aca808
# Frontend
frontend:
imageTag: '' # if empty uses commit sha of repo
# Backend
backend:
imageTag: '' # if empty uses commit sha of repo
# Shared SVC KV
serviceKeyVault:
name: 'aro-hcp-dev-svc-kv'
Expand Down
6 changes: 5 additions & 1 deletion config/public-cloud-cs-pr.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"armHelperClientId": "2c6ca254-36bd-43c8-a7a8-fe880bc2c489",
"armHelperFPAPrincipalId": "bc17c825-6cf8-40d0-8bd6-5536a993115e",
"aroDevopsMsiId": "/subscriptions/1d3378d3-5a3f-4712-85a1-2485495dfc4b/resourceGroups/global/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aro-hcp-devops",
"backend": {
"imageTag": ""
},
"baseDnsZoneName": "hcp.osadev.cloud",
"baseDnsZoneRG": "global",
"clusterService": {
Expand Down Expand Up @@ -32,7 +35,8 @@
"disableLocalAuth": true,
"name": "arohcp-rp-cspr",
"private": false
}
},
"imageTag": ""
},
"global": {
"manageTokenCustomRole": true,
Expand Down
6 changes: 5 additions & 1 deletion config/public-cloud-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"armHelperClientId": "2c6ca254-36bd-43c8-a7a8-fe880bc2c489",
"armHelperFPAPrincipalId": "bc17c825-6cf8-40d0-8bd6-5536a993115e",
"aroDevopsMsiId": "/subscriptions/1d3378d3-5a3f-4712-85a1-2485495dfc4b/resourceGroups/global/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aro-hcp-devops",
"backend": {
"imageTag": ""
},
"baseDnsZoneName": "hcp.osadev.cloud",
"baseDnsZoneRG": "global",
"clusterService": {
Expand Down Expand Up @@ -32,7 +35,8 @@
"disableLocalAuth": true,
"name": "arohcp-rp-dev",
"private": false
}
},
"imageTag": ""
},
"global": {
"manageTokenCustomRole": true,
Expand Down
6 changes: 5 additions & 1 deletion config/public-cloud-msft-int.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"armHelperClientId": "",
"armHelperFPAPrincipalId": "",
"aroDevopsMsiId": "/subscriptions/5299e6b7-b23b-46c8-8277-dc1147807117/resourcegroups/global-shared-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aroint-int-public-oidc",
"backend": {
"imageTag": "0b3c08f"
},
"baseDnsZoneName": "aroapp-hcp.azure-test.net",
"baseDnsZoneRG": "global-shared-resources",
"clusterService": {
Expand Down Expand Up @@ -32,7 +35,8 @@
"disableLocalAuth": true,
"name": "arohcp-rp-int",
"private": false
}
},
"imageTag": "0b3c08f"
},
"global": {
"manageTokenCustomRole": false,
Expand Down
6 changes: 5 additions & 1 deletion config/public-cloud-personal-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"armHelperClientId": "2c6ca254-36bd-43c8-a7a8-fe880bc2c489",
"armHelperFPAPrincipalId": "bc17c825-6cf8-40d0-8bd6-5536a993115e",
"aroDevopsMsiId": "/subscriptions/1d3378d3-5a3f-4712-85a1-2485495dfc4b/resourceGroups/global/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aro-hcp-devops",
"backend": {
"imageTag": ""
},
"baseDnsZoneName": "hcp.osadev.cloud",
"baseDnsZoneRG": "global",
"clusterService": {
Expand Down Expand Up @@ -32,7 +35,8 @@
"disableLocalAuth": true,
"name": "arohcp-rp-usw3tst",
"private": false
}
},
"imageTag": ""
},
"global": {
"manageTokenCustomRole": true,
Expand Down
10 changes: 8 additions & 2 deletions frontend/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
include ../setup-env.mk
-include ../setup-env.mk

COMMIT ?= $(shell git rev-parse --short=7 HEAD)
ifndef COMMIT
COMMIT := $(shell git rev-parse --short=7 HEAD)
endif
ARO_HCP_BASE_IMAGE ?= ${ARO_HCP_IMAGE_ACR}.azurecr.io
ARO_HCP_FRONTEND_IMAGE ?= $(ARO_HCP_BASE_IMAGE)/arohcpfrontend:$(COMMIT)

Expand All @@ -9,6 +11,10 @@ ARO_HCP_FRONTEND_IMAGE ?= $(ARO_HCP_BASE_IMAGE)/arohcpfrontend:$(COMMIT)
frontend:
go build -o aro-hcp-frontend .

info:
@echo "ARO_HCP_FRONTEND_IMAGE: ${ARO_HCP_FRONTEND_IMAGE}"
@echo "COMMIT: ${COMMIT}"

run:
./aro-hcp-frontend --use-cache --location ${LOCATION} \
--clusters-service-url http://localhost:8000 \
Expand Down
2 changes: 2 additions & 0 deletions frontend/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ resourceGroups:
configRef: aksName
- name: DB_NAME
configRef: frontend.cosmosDB.name
- name: COMMIT
configRef: frontend.imageTag

0 comments on commit bd5b9d8

Please sign in to comment.