From 87ff025f25dcd38fa9a173654fbba27992df0d65 Mon Sep 17 00:00:00 2001 From: Jo Date: Wed, 23 Feb 2022 19:57:13 +0100 Subject: [PATCH] fix(ci): autodevops-helm (#60) --- .github/workflows/preproduction.yml | 23 ++++++----------------- .github/workflows/production.yml | 13 +++++-------- .github/workflows/review.yml | 23 ++++++----------------- 3 files changed, 17 insertions(+), 42 deletions(-) diff --git a/.github/workflows/preproduction.yml b/.github/workflows/preproduction.yml index f135970..6501047 100644 --- a/.github/workflows/preproduction.yml +++ b/.github/workflows/preproduction.yml @@ -32,34 +32,23 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} imageName: nos1000jours/les1000jours-landing - ############################################################################## - ## GENERATE KUBERNETES MANIFESTS - ############################################################################## - manifests: - name: Generate k8s manifests - runs-on: ubuntu-latest - steps: - - - name: Use autodevops manifests generation - uses: SocialGouv/actions/autodevops-manifests@v1 - with: - environment: preprod - rancherId: ${{ secrets.RANCHER_PROJECT_ID }} - socialgouvBaseDomain: ${{ secrets.SOCIALGOUV_BASE_DOMAIN }} - ############################################################################## ## DEPLOY APPLICATION OVER KUBERNETES ############################################################################## deploy: runs-on: ubuntu-latest name: Deploy application - needs: [register, manifests] + needs: [register] steps: - name: Use autodevops deployment - uses: SocialGouv/actions/autodevops-deploy@v1 + uses: SocialGouv/actions/autodevops-helm-deploy@v1 with: environment: preprod token: ${{ secrets.GITHUB_TOKEN }} kubeconfig: ${{ secrets.KUBECONFIG }} rancherId: ${{ secrets.RANCHER_PROJECT_ID }} + rancherProjectName: ${{ secrets.RANCHER_PROJECT_NAME }} + socialgouvBaseDomain: ${{ secrets.SOCIALGOUV_BASE_DOMAIN }} + imageName: nos1000jours/les1000jours-landing + projectName: "les1000jours" diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 5208250..a8a8cae 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -43,14 +43,6 @@ jobs: url: https://1000jours.fabrique.social.gouv.fr/ steps: - - name: Use autodevops manifests generation - uses: SocialGouv/actions/autodevops-manifests@v1 - with: - environment: prod - productionNamespace: "les1000jours-landing" - rancherId: ${{ secrets.RANCHER_PROJECT_ID }} - socialgouvBaseDomain: ${{ secrets.SOCIALGOUV_BASE_DOMAIN }} - - name: Use autodevops deployment uses: SocialGouv/actions/autodevops-deploy@v1 with: @@ -58,3 +50,8 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} kubeconfig: ${{ secrets.KUBECONFIG }} rancherId: ${{ secrets.RANCHER_PROJECT_ID }} + rancherProjectName: ${{ secrets.RANCHER_PROJECT_NAME }} + socialgouvBaseDomain: ${{ secrets.SOCIALGOUV_BASE_DOMAIN }} + imageName: nos1000jours/les1000jours-landing + projectName: "les1000jours" + productionHost: "1000jours.fabrique.social.gouv.fr" diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 0922883..c407cac 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -31,34 +31,23 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} imageName: nos1000jours/les1000jours-landing - ############################################################################## - ## GENERATE KUBERNETES MANIFESTS - ############################################################################## - manifests: - name: Generate k8s manifests - runs-on: ubuntu-latest - steps: - - - name: Use autodevops manifests generation - uses: SocialGouv/actions/autodevops-manifests@v1 - with: - environment: "dev" - rancherId: ${{ secrets.RANCHER_PROJECT_ID }} - socialgouvBaseDomain: ${{ secrets.SOCIALGOUV_BASE_DOMAIN }} - ############################################################################## ## DEPLOY APPLICATION OVER KUBERNETES ############################################################################## deploy: runs-on: ubuntu-latest name: Deploy application - needs: [register, manifests] + needs: [register] steps: - name: Use autodevops deployment - uses: SocialGouv/actions/autodevops-deploy@v1 + uses: SocialGouv/actions/autodevops-helm-deploy@v1 with: environment: "dev" token: ${{ secrets.GITHUB_TOKEN }} kubeconfig: ${{ secrets.KUBECONFIG }} rancherId: ${{ secrets.RANCHER_PROJECT_ID }} + rancherProjectName: ${{ secrets.RANCHER_PROJECT_NAME }} + socialgouvBaseDomain: ${{ secrets.SOCIALGOUV_BASE_DOMAIN }} + imageName: nos1000jours/les1000jours-landing + projectName: "les1000jours" \ No newline at end of file