Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): use the helm chart source to deploy on AKS to always used to… #5206

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ jobs:

echo $AZURE_DOCKER_REGISTRY_PASSWORD | docker login --username $AZURE_DOCKER_REGISTRY_USERNAME --password-stdin graviteeio.azurecr.io
docker buildx build --push --platform=linux/arm64,linux/amd64 -f docker/management-ui/Dockerfile-dev --build-arg GRAVITEEAM_VERSION=${AM_VERSION} -t ${IMAGE_TAG} -t ${IMAGE_TAG_LATEST} /tmp

- persist_to_workspace:
root: /tmp
paths:
Expand All @@ -905,6 +906,7 @@ jobs:
- image: mcr.microsoft.com/azure-cli:2.42.0
resource_class: small
steps:
- checkout
- attach_workspace:
at: /tmp
- run:
Expand Down Expand Up @@ -940,49 +942,48 @@ jobs:
az login --service-principal -u $AZURE_APPLICATION_ID --tenant $AZURE_TENANT -p $AZURE_APPLICATION_SECRET
az aks get-credentials --admin --resource-group Devs-Preprod-Hosted --name gravitee-devs-preprod-aks-cluster
if [ "${CIRCLE_BRANCH}" == "master" ]; then
helm upgrade --repo https://helm.gravitee.io \
helm upgrade \
--install am-master \
-n am-master-dev \
-f ./cloud-am/devs-preprod/values.yaml am \
-f ./cloud-am/devs-preprod/values.yaml ./helm/ \
--set "api.image.repository=graviteeio.azurecr.io/am-management-api" \
--set "api.image.tag=${TAG}" \
--set "gateway.image.repository=graviteeio.azurecr.io/am-gateway" \
--set "gateway.image.tag=${TAG}" \
--set "ui.image.repository=graviteeio.azurecr.io/am-management-ui" \
--set "ui.image.tag=${TAG}"

helm upgrade --repo https://helm.gravitee.io \
helm upgrade \
--install am-master-ce \
-n am-master-ce-dev \
-f ./cloud-am/devs-preprod/values-ce.yaml am \
-f ./cloud-am/devs-preprod/values-ce.yaml ./helm/ \
--set "api.image.repository=graviteeio.azurecr.io/am-management-api" \
--set "api.image.tag=${TAG}" \
--set "gateway.image.repository=graviteeio.azurecr.io/am-gateway" \
--set "gateway.image.tag=${TAG}" \
--set "ui.image.repository=graviteeio.azurecr.io/am-management-ui" \
--set "ui.image.tag=${TAG}"

helm upgrade --repo https://helm.gravitee.io \
helm upgrade \
--install am-psql \
-n am-master-postgres-dev \
-f ./cloud-am/devs-preprod/values-psql.yaml am \
-f ./cloud-am/devs-preprod/values-psql.yaml ./helm/ \
--set "api.image.repository=graviteeio.azurecr.io/am-management-api" \
--set "api.image.tag=${TAG}" \
--set "gateway.image.repository=graviteeio.azurecr.io/am-gateway" \
--set "gateway.image.tag=${TAG}" \
--set "ui.image.repository=graviteeio.azurecr.io/am-management-ui" \
--set "ui.image.tag=${TAG}"
else
export HELM_VERSION=$(echo ${CIRCLE_BRANCH} | sed 's/x/0/')
# create namespace if not exist (dry-run will generate YAML manifest and apply will create or update the ns using the manifest)
kubectl create namespace am-${CIRCLE_BRANCH//./-}-dev --dry-run=client -o yaml | kubectl apply -f -
# replace verison Pattern into generic maint configuration
sed -i 's#__BRANCH_NAME_SANITIZED__#'${CIRCLE_BRANCH//./-}'#g' ./cloud-am/devs-preprod/values-maint.yaml
helm upgrade --repo https://helm.gravitee.io \
helm upgrade \
--install am-${CIRCLE_BRANCH//./-} \
--version $HELM_VERSION \
-n am-${CIRCLE_BRANCH//./-}-dev \
-f ./cloud-am/devs-preprod/values-maint.yaml am \
-f ./cloud-am/devs-preprod/values-maint.yaml ./helm/ \
--set "api.image.repository=graviteeio.azurecr.io/am-management-api" \
--set "api.image.tag=${TAG}" \
--set "gateway.image.repository=graviteeio.azurecr.io/am-gateway" \
Expand All @@ -993,11 +994,11 @@ jobs:
# same with ce version
kubectl create namespace am-${CIRCLE_BRANCH//./-}-ce-dev --dry-run=client -o yaml | kubectl apply -f -
sed -i 's#__BRANCH_NAME_SANITIZED__#'${CIRCLE_BRANCH//./-}'#g' ./cloud-am/devs-preprod/values-ce-maint.yaml
helm upgrade --repo https://helm.gravitee.io \
helm upgrade \
--install am-${CIRCLE_BRANCH//./-}-ce \
--version $HELM_VERSION \
-n am-${CIRCLE_BRANCH//./-}-ce-dev \
-f ./cloud-am/devs-preprod/values-ce-maint.yaml am \
-f ./cloud-am/devs-preprod/values-ce-maint.yaml ./helm/ \
--set "api.image.repository=graviteeio.azurecr.io/am-management-api" \
--set "api.image.tag=${TAG}" \
--set "gateway.image.repository=graviteeio.azurecr.io/am-gateway" \
Expand Down