From f959d2752d1ea4264efafafaa1dfd92ff9e2a2a3 Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Tue, 2 May 2023 13:26:06 -0500 Subject: [PATCH 1/3] Minor version bump for Helm chart. --- .github/workflows/helm-release.yml | 2 +- charts/uffizzi-controller/Chart.yaml | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/helm-release.yml b/.github/workflows/helm-release.yml index de7e7921..d977e355 100644 --- a/.github/workflows/helm-release.yml +++ b/.github/workflows/helm-release.yml @@ -20,6 +20,6 @@ jobs: git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.3.0 + uses: helm/chart-releaser-action@v1.5.0 env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/charts/uffizzi-controller/Chart.yaml b/charts/uffizzi-controller/Chart.yaml index ce946721..9e00f7fb 100644 --- a/charts/uffizzi-controller/Chart.yaml +++ b/charts/uffizzi-controller/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: uffizzi-controller -version: 1.0.1 +version: 1.0.2 kubeVersion: ">= 1.21.6-0" # https://issuetracker.google.com/issues/77503699 description: "A smart proxy service that handles requests from Uffizzi App to the Kubernetes API - 1 of 3 services (controller, uffizzi_app, uffizzi_cli) that comprise the uffizzi full-stack previews engine which automates trigger-based on-demand preview environments" type: application @@ -18,17 +18,16 @@ keywords: home: https://uffizzi.com/ sources: - https://github.com/UffizziCloud/uffizzi_controller - - https://gitlab.com/dualbootpartners/idyl/uffizzi_controller dependencies: - name: ingress-nginx - version: "~4.0.18" + version: "~4.0.19" repository: https://kubernetes.github.io/ingress-nginx # condition: # tags: # import-values: # alias: - name: cert-manager - version: "~1.7.2" + version: "~1.7.3" repository: https://charts.jetstack.io # condition: # tags: From 91a212cb608914424df07645300ae8f2ecd72eed Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Tue, 2 May 2023 14:07:07 -0500 Subject: [PATCH 2/3] Deploy default branch to Docker Hub. #73 --- .github/workflows/deploy.yml | 39 ++++++++++++++++++++++++++++++++++++ Makefile | 6 ++++++ 2 files changed, 45 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4f469cde..03a4fe54 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -63,6 +63,45 @@ jobs: export CI_COMMIT_REF_SLUG=${{ steps.slug.outputs.branch-name-slug }} make push_gcp_controller + publish: + name: Publish Image on Docker Hub + runs-on: ubuntu-latest + if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} + container: ghcr.io/uffizzicloud/controller_toolbox:v2 + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: gacts/github-slug@v1 + id: slug + - id: 'ci_registry_auth' + name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@v0' + with: + token_format: 'access_token' + workload_identity_provider: ${{ secrets.CI_IDENTITY_PROVIDER_LOCATION }} + service_account: ${{ secrets.CI_SERVICE_ACCOUNT_NAME }} + - name: Login to GCR + uses: docker/login-action@v2 + with: + registry: gcr.io + username: oauth2accesstoken + password: ${{ steps.ci_registry_auth.outputs.access_token }} + - name: Pull and tag CI image + run: make pull_ci_image + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Publish Controller Image + run: make publish_image + - name: Update Docker Hub Description + uses: peter-evans/dockerhub-description@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + repository: uffizzi/controller + update-gke-controller: runs-on: ubuntu-latest needs: diff --git a/Makefile b/Makefile index c50bd595..2b7d759e 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,12 @@ tag_image: docker tag ${CONTROLLER_IMAGE}:${SHORT_VERSION} ${GCP_CONTROLLER_IMAGE}:${CI_COMMIT_REF_SLUG} || true docker tag ${CONTROLLER_IMAGE}:${SHORT_VERSION} ${GCP_CONTROLLER_IMAGE}:latest +publish_image: + docker tag ${CONTROLLER_IMAGE}:${SHORT_VERSION} uffizzi/controller:latest + docker tag ${CONTROLLER_IMAGE}:${SHORT_VERSION} uffizzi/controller:${SHORT_VERSION} + docker push uffizzi/controller:latest + docker push uffizzi/controller:${SHORT_VERSION} + push_gcp_controller: docker push ${GCP_CONTROLLER_IMAGE}:${VERSION} docker push ${GCP_CONTROLLER_IMAGE}:${SHORT_VERSION} From 2e2573040cec8b420dc9a20101ec7eda493aa33a Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Tue, 2 May 2023 14:11:38 -0500 Subject: [PATCH 3/3] Change because default branch is not `main`. #73 --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 03a4fe54..dfc7097a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -66,7 +66,7 @@ jobs: publish: name: Publish Image on Docker Hub runs-on: ubuntu-latest - if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} + if: ${{ inputs.env == 'production' }} container: ghcr.io/uffizzicloud/controller_toolbox:v2 steps: - name: Checkout