diff --git a/.github/workflows/preproduction.yaml b/.github/workflows/preproduction.yaml new file mode 100644 index 00000000..66234814 --- /dev/null +++ b/.github/workflows/preproduction.yaml @@ -0,0 +1,17 @@ +name: 😎 PreProd +on: + workflow_dispatch: + push: + branches: + - "master" + - "main" + +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }} + +jobs: + socialgouv: + name: "🇫🇷 SocialGouv" + uses: socialgouv/workflows/.github/workflows/use-ks-gh-preproduction.yaml@v1 + secrets: inherit diff --git a/.github/workflows/preproduction.yml b/.github/workflows/preproduction.yml deleted file mode 100644 index 804b64bb..00000000 --- a/.github/workflows/preproduction.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Preproduction - -on: - push: - branches: - - master - tags-ignore: - - v* - -concurrency: - cancel-in-progress: true - group: preproduction - -jobs: - register: - name: Build & Register application - runs-on: ubuntu-latest - steps: - - name: Use autodevops build and register - uses: SocialGouv/actions/autodevops-build-register@v1 - with: - environment: preprod - imagePackage: app - token: ${{ secrets.GITHUB_TOKEN }} - - deploy: - name: Deploy application - runs-on: ubuntu-latest - needs: [register] - environment: - name: preproduction - url: https://standup-preprod.dev.fabrique.social.gouv.fr - steps: - - name: Use kube-workflow deployment - uses: SocialGouv/kube-workflow@v1 - with: - environment: preprod - token: ${{ secrets.GITHUB_TOKEN }} - kubeconfig: ${{ secrets.KUBECONFIG }} - rancherProjectId: ${{ secrets.RANCHER_PROJECT_ID }} - rancherProjectName: ${{ secrets.RANCHER_PROJECT_NAME }} diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml new file mode 100644 index 00000000..3cae2d52 --- /dev/null +++ b/.github/workflows/production.yaml @@ -0,0 +1,16 @@ +name: 🚀 Production +on: + workflow_dispatch: + push: + tags: + - v* + +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }} + +jobs: + socialgouv: + name: "🇫🇷 SocialGouv" + uses: socialgouv/workflows/.github/workflows/use-ks-gh-production.yaml@v1 + secrets: inherit diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml deleted file mode 100644 index 156415f6..00000000 --- a/.github/workflows/production.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Production - -on: - workflow_dispatch: - push: - tags: - - v* - -concurrency: - group: production - cancel-in-progress: true - -jobs: - register: - name: Build & Register application - runs-on: ubuntu-latest - steps: - - name: Use autodevops build and register - uses: SocialGouv/actions/autodevops-build-register@v1 - with: - environment: prod - imagePackage: app - token: ${{ secrets.GITHUB_TOKEN }} - - deploy: - name: Deploy application - runs-on: ubuntu-latest - needs: [register] - environment: - name: production - url: https://standup.fabrique.social.gouv.fr - steps: - - name: Use kube-workflow deployment - uses: SocialGouv/kube-workflow@v1 - with: - environment: prod - token: ${{ secrets.GITHUB_TOKEN }} - kubeconfig: ${{ secrets.KUBECONFIG }} - rancherProjectId: ${{ secrets.RANCHER_PROJECT_ID }} - rancherProjectName: ${{ secrets.RANCHER_PROJECT_NAME }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yaml similarity index 85% rename from .github/workflows/release.yml rename to .github/workflows/release.yaml index b159c5ba..c50c94a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: SocialGouv/actions/autodevops-release@v1 + - uses: socialgouv/workflows/actions/semantic-release@v1 with: author-name: ${{ secrets.SOCIALGROOVYBOT_NAME }} author-email: ${{ secrets.SOCIALGROOVYBOT_EMAIL }} diff --git a/.github/workflows/review-auto.yaml b/.github/workflows/review-auto.yaml new file mode 100644 index 00000000..548cf4e0 --- /dev/null +++ b/.github/workflows/review-auto.yaml @@ -0,0 +1,16 @@ +name: 👓 Review Auto +on: + push: + branches: + - "feat/**" + - "fix/**" + +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }} + +jobs: + socialgouv: + name: "🇫🇷 SocialGouv" + uses: socialgouv/workflows/.github/workflows/use-ks-gh-review-auto.yaml@v1 + secrets: inherit diff --git a/.github/workflows/review.yaml b/.github/workflows/review.yaml new file mode 100644 index 00000000..258abaf3 --- /dev/null +++ b/.github/workflows/review.yaml @@ -0,0 +1,19 @@ +name: 👀 Review +on: + push: + branches: + - "**" + - "!master" + - "!main" + - "!feat/**" + - "!fix/**" + +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }} + +jobs: + socialgouv: + name: "🇫🇷 SocialGouv" + uses: socialgouv/workflows/.github/workflows/use-ks-gh-review.yaml@v1 + secrets: inherit diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml deleted file mode 100644 index 8efbdc12..00000000 --- a/.github/workflows/review.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Review - -on: - push: - branches-ignore: - - master - tags-ignore: - - v* - -concurrency: - cancel-in-progress: true - group: review-${{ github.ref }} - -jobs: - register: - name: Build & Register application - runs-on: ubuntu-latest - steps: - - name: Use autodevops build and register - uses: SocialGouv/actions/autodevops-build-register@v1 - with: - environment: dev - imagePackage: app - token: ${{ secrets.GITHUB_TOKEN }} - - deploy: - name: Deploy review branch - runs-on: ubuntu-latest - needs: [register] - steps: - - name: Use kube-workflow deployment - uses: SocialGouv/kube-workflow@v1 - with: - environment: dev - token: ${{ secrets.GITHUB_TOKEN }} - kubeconfig: ${{ secrets.KUBECONFIG }} - rancherProjectId: ${{ secrets.RANCHER_PROJECT_ID }} - rancherProjectName: ${{ secrets.RANCHER_PROJECT_NAME }} diff --git a/.kube-workflow/env/dev/templates/standup.sealed-secret.yaml b/.kontinuous/env/dev/templates/standup.sealed-secret.yaml similarity index 100% rename from .kube-workflow/env/dev/templates/standup.sealed-secret.yaml rename to .kontinuous/env/dev/templates/standup.sealed-secret.yaml diff --git a/.kube-workflow/env/preprod/templates/standup.sealed-secret.yaml b/.kontinuous/env/preprod/templates/standup.sealed-secret.yaml similarity index 100% rename from .kube-workflow/env/preprod/templates/standup.sealed-secret.yaml rename to .kontinuous/env/preprod/templates/standup.sealed-secret.yaml diff --git a/.kube-workflow/env/prod/templates/standup.sealed-secret.yaml b/.kontinuous/env/prod/templates/standup.sealed-secret.yaml similarity index 100% rename from .kube-workflow/env/prod/templates/standup.sealed-secret.yaml rename to .kontinuous/env/prod/templates/standup.sealed-secret.yaml diff --git a/.kube-workflow/common/values.yaml b/.kontinuous/values.yaml similarity index 64% rename from .kube-workflow/common/values.yaml rename to .kontinuous/values.yaml index 70c14ea8..e6ec532f 100644 --- a/.kube-workflow/common/values.yaml +++ b/.kontinuous/values.yaml @@ -1,6 +1,4 @@ app: - enabled: true - containerPort: 8080 envFrom: - secretRef: name: standup-sealed-secret diff --git a/.socialgouv.yaml b/.socialgouv.yaml new file mode 100644 index 00000000..e69de29b