Skip to content

Commit

Permalink
Updating to main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
pricem14pc committed Oct 17, 2024
2 parents 421f0c6 + d8afe77 commit c03fa5f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ on:

env:
IMAGE: frontstage
REGISTRY_HOSTNAME: eu.gcr.io
HOST: ${{ secrets.GOOGLE_PROJECT_ID }}
RELEASE_HOST: ${{ secrets.RELEASE_PROJECT_ID }}
REGISTRY_HOSTNAME: europe-west2-docker.pkg.dev
SPINNAKER_GOOGLE_PROJECT_ID: ${{ secrets.SPINNAKER_GOOGLE_PROJECT_ID }}
GAR_REPOSITORY: images
GAR_GOOGLE_PROJECT_ID: ${{ secrets.GAR_GOOGLE_PROJECT_ID }}
CHART_DIRECTORY: _infra/helm/frontstage
SPINNAKER_TOPIC: ${{ secrets.SPINNAKER_TOPIC }}
ARTIFACT_BUCKET: ${{ secrets.ARTIFACT_BUCKET }}
Expand Down Expand Up @@ -71,7 +72,7 @@ jobs:
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- run: |
gcloud auth configure-docker
gcloud auth configure-docker europe-west2-docker.pkg.dev
- name: pr docker tag
if: github.ref != 'refs/heads/main'
Expand All @@ -84,11 +85,11 @@ jobs:
- name: Build Docker Image
if: github.ref != 'refs/heads/main'
run: |
docker build -t "$REGISTRY_HOSTNAME"/"$HOST"/"$IMAGE":${{ env.pr_number }} -f _infra/docker/Dockerfile .
docker build -t "$REGISTRY_HOSTNAME"/"$GAR_GOOGLE_PROJECT_ID"/"$GAR_REPOSITORY"/"$IMAGE":${{ env.pr_number }} -f _infra/docker/Dockerfile .
- name: Push dev image
if: github.ref != 'refs/heads/main'
run: |
docker push "$REGISTRY_HOSTNAME"/"$HOST"/"$IMAGE":${{ env.pr_number }}
docker push "$REGISTRY_HOSTNAME"/"$GAR_GOOGLE_PROJECT_ID"/"$GAR_REPOSITORY"/"$IMAGE":${{ env.pr_number }}
- name: template helm
run: |
helm template $CHART_DIRECTORY
Expand Down Expand Up @@ -192,12 +193,12 @@ jobs:
- name: Build Release Image
if: github.ref == 'refs/heads/main'
run: |
docker build -f _infra/docker/Dockerfile -t "$REGISTRY_HOSTNAME"/"$RELEASE_HOST"/"$IMAGE":latest -t "$REGISTRY_HOSTNAME"/"$RELEASE_HOST"/"$IMAGE":${{ env.version }} .
docker build -f _infra/docker/Dockerfile -t "$REGISTRY_HOSTNAME"/"$GAR_GOOGLE_PROJECT_ID"/"$GAR_REPOSITORY"/"$IMAGE":latest -t "$REGISTRY_HOSTNAME"/"$GAR_GOOGLE_PROJECT_ID"/"$GAR_REPOSITORY"/"$IMAGE":${{ env.version }} .
- name: Push Release image
if: github.ref == 'refs/heads/main'
run: |
docker push "$REGISTRY_HOSTNAME"/"$RELEASE_HOST"/"$IMAGE":${{ env.version }}
docker push "$REGISTRY_HOSTNAME"/"$RELEASE_HOST"/"$IMAGE":latest
docker push "$REGISTRY_HOSTNAME"/"$GAR_GOOGLE_PROJECT_ID"/"$GAR_REPOSITORY"/"$IMAGE":${{ env.version }}
docker push "$REGISTRY_HOSTNAME"/"$GAR_GOOGLE_PROJECT_ID"/"$GAR_REPOSITORY"/"$IMAGE":latest
- name: Publish Charts
if: github.ref == 'refs/heads/main'
Expand All @@ -214,6 +215,6 @@ jobs:
- name: CD hook
if: github.ref == 'refs/heads/main'
run: |
gcloud pubsub topics publish $SPINNAKER_TOPIC --project $HOST \
gcloud pubsub topics publish $SPINNAKER_TOPIC --project $SPINNAKER_GOOGLE_PROJECT_ID \
--message "{ \"kind\": \"storage#object\", \"name\": \"$IMAGE/$IMAGE-${{ env.HELM_VERSION }}.tgz\", \"bucket\": \"$ARTIFACT_BUCKET\" }" \
--attribute cd="actions"
4 changes: 2 additions & 2 deletions _infra/helm/frontstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 2.5.25
version: 2.5.27

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 2.5.25
appVersion: 2.5.27
4 changes: 2 additions & 2 deletions _infra/helm/frontstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ namespace: minikube
armorPolicy: "ras-cloud-armor-policy"

image:
devRepo: eu.gcr.io/ons-rasrmbs-management
name: eu.gcr.io/ons-rasrmbs-management
devRepo: europe-west2-docker.pkg.dev/ons-ci-rmrasbs/images
name: europe-west2-docker.pkg.dev/ons-ci-rmrasbs/images
tag: latest
pullPolicy: Always

Expand Down

0 comments on commit c03fa5f

Please sign in to comment.