diff --git a/.github/workflows/deactivate.yaml b/.github/workflows/deactivate.yaml new file mode 100644 index 0000000..9f6e3e2 --- /dev/null +++ b/.github/workflows/deactivate.yaml @@ -0,0 +1,23 @@ +name: â™ŧïļ Deactivate +on: + pull_request: + types: [closed] + delete: + branches: + - "**" + - "!v*" + - "!master" + - "!main" + - "!dev" + - "!develop" + - "!**/persist" + - "!persist/**" + - "!**/persist/**" + - "!persist-**" + - "!**-persist" + - "!**-persist-**" + +jobs: + socialgouv: + uses: socialgouv/workflows/.github/workflows/use-ks-gh-deactivate.yaml@v1 + secrets: inherit diff --git a/.github/workflows/deactivate.yml b/.github/workflows/deactivate.yml deleted file mode 100644 index 49ee26c..0000000 --- a/.github/workflows/deactivate.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Deactivate - -on: - pull_request: - types: [ closed ] - -jobs: - bury_review_env: - name: ðŸŠĶ Review - runs-on: ubuntu-latest - steps: - - uses: SocialGouv/actions/k8s-funeral@v1 - with: - kube-config: ${{ secrets.SOCIALGOUV_KUBE_CONFIG_DEV }} - github-token: ${{ secrets.GITHUB_TOKEN }} - rancherId: ${{ secrets.RANCHER_PROJECT_ID }} - socialgouvBaseDomain: ${{ secrets.SOCIALGOUV_BASE_DOMAIN }} diff --git a/.github/workflows/preproduction.yaml b/.github/workflows/preproduction.yaml new file mode 100644 index 0000000..6623481 --- /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 270b6d8..0000000 --- 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://nos1000jours-landing-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 0000000..3cae2d5 --- /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 42cdf0d..0000000 --- a/.github/workflows/production.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Production - -on: - 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://1000jours.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.yml index 28a026f..f36cb0a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,18 +1,15 @@ name: Release - on: workflow_dispatch: push: - branches: [master, alpha, beta, next] - + branches: [master, main, alpha, beta, next] jobs: release: name: Release runs-on: ubuntu-latest steps: - - - uses: SocialGouv/actions/autodevops-release@v1 + - uses: socialgouv/workflows/actions/semantic-release@v1 with: + github-token: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }} author-name: ${{ secrets.SOCIALGROOVYBOT_NAME }} author-email: ${{ secrets.SOCIALGROOVYBOT_EMAIL }} - github-token: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }} diff --git a/.github/workflows/review-auto.yaml b/.github/workflows/review-auto.yaml new file mode 100644 index 0000000..548cf4e --- /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 0000000..258abaf --- /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 8efbdc1..0000000 --- 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/.kontinuous/env/prod/values.yaml b/.kontinuous/env/prod/values.yaml new file mode 100644 index 0000000..ccc1c75 --- /dev/null +++ b/.kontinuous/env/prod/values.yaml @@ -0,0 +1,2 @@ +app: + host: 1000jours.fabrique.social.gouv.fr diff --git a/.kontinuous/values.yaml b/.kontinuous/values.yaml new file mode 100644 index 0000000..eca1ff8 --- /dev/null +++ b/.kontinuous/values.yaml @@ -0,0 +1,2 @@ +global: + imageProject: 1000jours diff --git a/.kube-workflow/prod/values.yaml b/.kube-workflow/prod/values.yaml deleted file mode 100644 index a7e77a7..0000000 --- a/.kube-workflow/prod/values.yaml +++ /dev/null @@ -1,4 +0,0 @@ -app: - enabled: true - host: 1000jours.fabrique.social.gouv.fr - certSecretName: nos1000jours-landing-crt \ No newline at end of file diff --git a/.kube-workflow/values.yaml b/.kube-workflow/values.yaml deleted file mode 100644 index 4d3c198..0000000 --- a/.kube-workflow/values.yaml +++ /dev/null @@ -1,3 +0,0 @@ -app: - enabled: true - containerPort: 8080 diff --git a/.socialgouv.yaml b/.socialgouv.yaml new file mode 100644 index 0000000..e69de29 diff --git a/.socialgouv/__snapshots__/deploy.test.js.snap b/.socialgouv/__snapshots__/deploy.test.js.snap deleted file mode 100644 index 0e02ad4..0000000 --- a/.socialgouv/__snapshots__/deploy.test.js.snap +++ /dev/null @@ -1,453 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`generate development k8s manifests 1`] = ` -"--- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - kapp.k14s.io/disable-default-ownership-label-rules: '' - kapp.k14s.io/disable-default-label-scoping-rules: '' - app.github.com/job: '5678' - app.github.com/ref: refs/heads/mybranch - app.github.com/repo: socialgouv/nos1000jours-landing - app.github.com/run: '1234' - app.github.com/sha: '0123456' - labels: - app: les1000jours-landing - application: nos1000jours-landing - component: nginx - owner: nos1000jours-landing - team: nos1000jours-landing - cert: wildcard - name: les1000jours-landing - namespace: nos1000jours-landing-mybranch -spec: - replicas: 1 - selector: - matchLabels: - app: les1000jours-landing - template: - metadata: - annotations: - kapp.k14s.io/disable-default-ownership-label-rules: '' - kapp.k14s.io/disable-default-label-scoping-rules: '' - app.github.com/job: '5678' - app.github.com/ref: refs/heads/mybranch - app.github.com/repo: socialgouv/nos1000jours-landing - app.github.com/run: '1234' - app.github.com/sha: '0123456' - labels: - app: les1000jours-landing - application: nos1000jours-landing - component: nginx - owner: nos1000jours-landing - team: nos1000jours-landing - cert: wildcard - spec: - containers: - - image: >- - ghcr.io/socialgouv/nos1000jours/les1000jours-landing:sha-0123456789abcdefghijklmnopqrstuvwxyz0123 - livenessProbe: - failureThreshold: 6 - httpGet: - path: /index.html - port: http - initialDelaySeconds: 30 - periodSeconds: 5 - timeoutSeconds: 5 - name: les1000jours-landing - ports: - - containerPort: 80 - name: http - readinessProbe: - failureThreshold: 15 - httpGet: - path: /index.html - port: http - initialDelaySeconds: 0 - periodSeconds: 5 - successThreshold: 1 - timeoutSeconds: 1 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 32Mi - startupProbe: - failureThreshold: 12 - httpGet: - path: /index.html - port: http - periodSeconds: 5 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: les1000jours-landing - application: nos1000jours-landing - component: nginx - owner: nos1000jours-landing - team: nos1000jours-landing - cert: wildcard - name: les1000jours-landing - annotations: - kapp.k14s.io/disable-default-ownership-label-rules: '' - kapp.k14s.io/disable-default-label-scoping-rules: '' - app.github.com/job: '5678' - app.github.com/ref: refs/heads/mybranch - app.github.com/repo: socialgouv/nos1000jours-landing - app.github.com/run: '1234' - app.github.com/sha: '0123456' - namespace: nos1000jours-landing-mybranch -spec: - ports: - - name: http - port: 80 - targetPort: 80 - selector: - app: les1000jours-landing - type: ClusterIP ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - kubernetes.io/ingress.class: nginx - kapp.k14s.io/disable-default-ownership-label-rules: '' - kapp.k14s.io/disable-default-label-scoping-rules: '' - app.github.com/job: '5678' - app.github.com/ref: refs/heads/mybranch - app.github.com/repo: socialgouv/nos1000jours-landing - app.github.com/run: '1234' - app.github.com/sha: '0123456' - labels: - app: les1000jours-landing - application: nos1000jours-landing - component: nginx - owner: nos1000jours-landing - team: nos1000jours-landing - cert: wildcard - name: les1000jours-landing - namespace: nos1000jours-landing-mybranch -spec: - rules: - - host: nos1000jours-landing-mybranch.dev.fabrique.social.gouv.fr - http: - paths: - - backend: - service: - name: les1000jours-landing - port: - name: http - path: / - pathType: Prefix - tls: - - hosts: - - nos1000jours-landing-mybranch.dev.fabrique.social.gouv.fr - secretName: wildcard-crt -" -`; - -exports[`generate preproduction k8s manifests 1`] = ` -"--- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - kapp.k14s.io/disable-default-ownership-label-rules: '' - kapp.k14s.io/disable-default-label-scoping-rules: '' - app.github.com/job: '5678' - app.github.com/ref: refs/tags/v1.3.22 - app.github.com/repo: socialgouv/nos1000jours-landing - app.github.com/run: '1234' - app.github.com/sha: '0123456' - labels: - app: les1000jours-landing - application: nos1000jours-landing - component: nginx - owner: nos1000jours-landing - team: nos1000jours-landing - cert: wildcard - name: les1000jours-landing - namespace: nos1000jours-landing-preprod -spec: - replicas: 1 - selector: - matchLabels: - app: les1000jours-landing - template: - metadata: - annotations: - kapp.k14s.io/disable-default-ownership-label-rules: '' - kapp.k14s.io/disable-default-label-scoping-rules: '' - app.github.com/job: '5678' - app.github.com/ref: refs/tags/v1.3.22 - app.github.com/repo: socialgouv/nos1000jours-landing - app.github.com/run: '1234' - app.github.com/sha: '0123456' - labels: - app: les1000jours-landing - application: nos1000jours-landing - component: nginx - owner: nos1000jours-landing - team: nos1000jours-landing - cert: wildcard - spec: - containers: - - image: ghcr.io/socialgouv/nos1000jours/les1000jours-landing:1.3.22 - livenessProbe: - failureThreshold: 6 - httpGet: - path: /index.html - port: http - initialDelaySeconds: 30 - periodSeconds: 5 - timeoutSeconds: 5 - name: les1000jours-landing - ports: - - containerPort: 80 - name: http - readinessProbe: - failureThreshold: 15 - httpGet: - path: /index.html - port: http - initialDelaySeconds: 0 - periodSeconds: 5 - successThreshold: 1 - timeoutSeconds: 1 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 32Mi - startupProbe: - failureThreshold: 12 - httpGet: - path: /index.html - port: http - periodSeconds: 5 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: les1000jours-landing - application: nos1000jours-landing - component: nginx - owner: nos1000jours-landing - team: nos1000jours-landing - cert: wildcard - name: les1000jours-landing - annotations: - kapp.k14s.io/disable-default-ownership-label-rules: '' - kapp.k14s.io/disable-default-label-scoping-rules: '' - app.github.com/job: '5678' - app.github.com/ref: refs/tags/v1.3.22 - app.github.com/repo: socialgouv/nos1000jours-landing - app.github.com/run: '1234' - app.github.com/sha: '0123456' - namespace: nos1000jours-landing-preprod -spec: - ports: - - name: http - port: 80 - targetPort: 80 - selector: - app: les1000jours-landing - type: ClusterIP ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - kubernetes.io/ingress.class: nginx - kapp.k14s.io/disable-default-ownership-label-rules: '' - kapp.k14s.io/disable-default-label-scoping-rules: '' - app.github.com/job: '5678' - app.github.com/ref: refs/tags/v1.3.22 - app.github.com/repo: socialgouv/nos1000jours-landing - app.github.com/run: '1234' - app.github.com/sha: '0123456' - labels: - app: les1000jours-landing - application: nos1000jours-landing - component: nginx - owner: nos1000jours-landing - team: nos1000jours-landing - cert: wildcard - name: les1000jours-landing - namespace: nos1000jours-landing-preprod -spec: - rules: - - host: nos1000jours-landing-preprod.dev.fabrique.social.gouv.fr - http: - paths: - - backend: - service: - name: les1000jours-landing - port: - name: http - path: / - pathType: Prefix - tls: - - hosts: - - nos1000jours-landing-preprod.dev.fabrique.social.gouv.fr - secretName: wildcard-crt -" -`; - -exports[`generate production k8s manifests 1`] = ` -"--- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - kapp.k14s.io/disable-default-ownership-label-rules: '' - kapp.k14s.io/disable-default-label-scoping-rules: '' - app.github.com/job: '5678' - app.github.com/ref: refs/tags/v1.3.22 - app.github.com/repo: socialgouv/nos1000jours-landing - app.github.com/run: '1234' - app.github.com/sha: '0123456' - labels: - app: les1000jours-landing - application: nos1000jours-landing - component: nginx - owner: nos1000jours-landing - team: nos1000jours-landing - name: les1000jours-landing - namespace: les1000jours-landing -spec: - replicas: 1 - selector: - matchLabels: - app: les1000jours-landing - template: - metadata: - annotations: - kapp.k14s.io/disable-default-ownership-label-rules: '' - kapp.k14s.io/disable-default-label-scoping-rules: '' - app.github.com/job: '5678' - app.github.com/ref: refs/tags/v1.3.22 - app.github.com/repo: socialgouv/nos1000jours-landing - app.github.com/run: '1234' - app.github.com/sha: '0123456' - labels: - app: les1000jours-landing - application: nos1000jours-landing - component: nginx - owner: nos1000jours-landing - team: nos1000jours-landing - spec: - containers: - - image: ghcr.io/socialgouv/nos1000jours/les1000jours-landing:1.3.22 - livenessProbe: - failureThreshold: 6 - httpGet: - path: /index.html - port: http - initialDelaySeconds: 30 - periodSeconds: 5 - timeoutSeconds: 5 - name: les1000jours-landing - ports: - - containerPort: 80 - name: http - readinessProbe: - failureThreshold: 15 - httpGet: - path: /index.html - port: http - initialDelaySeconds: 0 - periodSeconds: 5 - successThreshold: 1 - timeoutSeconds: 1 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 32Mi - startupProbe: - failureThreshold: 12 - httpGet: - path: /index.html - port: http - periodSeconds: 5 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: les1000jours-landing - application: nos1000jours-landing - component: nginx - owner: nos1000jours-landing - team: nos1000jours-landing - name: les1000jours-landing - annotations: - kapp.k14s.io/disable-default-ownership-label-rules: '' - kapp.k14s.io/disable-default-label-scoping-rules: '' - app.github.com/job: '5678' - app.github.com/ref: refs/tags/v1.3.22 - app.github.com/repo: socialgouv/nos1000jours-landing - app.github.com/run: '1234' - app.github.com/sha: '0123456' - namespace: les1000jours-landing -spec: - ports: - - name: http - port: 80 - targetPort: 80 - selector: - app: les1000jours-landing - type: ClusterIP ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - kubernetes.io/ingress.class: nginx - cert-manager.io/cluster-issuer: letsencrypt-prod - kubernetes.io/tls-acme: 'true' - kapp.k14s.io/disable-default-ownership-label-rules: '' - kapp.k14s.io/disable-default-label-scoping-rules: '' - app.github.com/job: '5678' - app.github.com/ref: refs/tags/v1.3.22 - app.github.com/repo: socialgouv/nos1000jours-landing - app.github.com/run: '1234' - app.github.com/sha: '0123456' - labels: - app: les1000jours-landing - application: nos1000jours-landing - component: nginx - owner: nos1000jours-landing - team: nos1000jours-landing - name: les1000jours-landing - namespace: les1000jours-landing -spec: - rules: - - host: 1000jours.fabrique.social.gouv.fr - http: - paths: - - backend: - service: - name: les1000jours-landing - port: - name: http - path: / - pathType: Prefix - tls: - - hosts: - - 1000jours.fabrique.social.gouv.fr - secretName: les1000jours-landing-crt -" -`; diff --git a/.socialgouv/config.json b/.socialgouv/config.json deleted file mode 100644 index 1f26664..0000000 --- a/.socialgouv/config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "les1000jours-landing", - "type": "static", - "subdomain": "1000jours", - "registry": "ghcr", - "containerPort": 3000, - "project": "nos1000jours" -} diff --git a/.socialgouv/deploy.test.js b/.socialgouv/deploy.test.js deleted file mode 100644 index 783c374..0000000 --- a/.socialgouv/deploy.test.js +++ /dev/null @@ -1,79 +0,0 @@ -const child_process = require("child_process"); -const { directory } = require("tempy"); -const util = require("util"); - -const TIMEOUT = 1000 * 60; - -const exec = util.promisify(child_process.exec); - -const GH_DEFAULTS = { - GITHUB_JOB: "5678", - GITHUB_REF: "refs/heads/mybranch", - GITHUB_REPOSITORY: `socialgouv/nos1000jours-landing`, - GITHUB_RUN_ID: "1234", - GITHUB_SHA: "0123456789abcdefghijklmnopqrstuvwxyz0123", - SOCIALGOUV_BASE_DOMAIN: "dev.fabrique.social.gouv.fr", - SOCIALGOUV_CONFIG_PATH: __dirname + "/../.socialgouv/config.json", - SOCIALGOUV_PREPRODUCTION: "", - SOCIALGOUV_PRODUCTION: "", - SOCIALGOUV_PRODUCTION_NAMESPACE: "les1000jours-landing", -}; - -const degitCommand = ({ dir, env }) => ` - npx degit SocialGouv/kosko-charts/templates/autodevops ${dir}/autodevops; \ - yarn --cwd ${dir}/autodevops --silent; \ - cp -r ${__dirname}/../.socialgouv/environments ${dir}/autodevops/; \ - yarn --cwd ${dir}/autodevops --silent generate --env ${env} -`; - -const getEnvironmentManifests = async (envName, defaultEnv = {}) => { - const dir = directory(); - - const env = { - ...GH_DEFAULTS, - ...defaultEnv, - }; - - Object.assign(process.env, env); - - const cmd = degitCommand({ dir, env: envName }); - console.info(`Generating ${envName} manifests with autodevops template...`); - - const { stdout: manifests } = await exec(cmd, { env: process.env }); - - return manifests; -}; - -test( - "generate development k8s manifests", - async () => { - const manifests = await getEnvironmentManifests("dev"); - expect(manifests).toMatchSnapshot(); - }, - TIMEOUT -); - -test( - "generate preproduction k8s manifests", - async () => { - const manifests = await getEnvironmentManifests("preprod", { - GITHUB_REF: "refs/tags/v1.3.22", - SOCIALGOUV_PREPRODUCTION: "true", - }); - expect(manifests).toMatchSnapshot(); - }, - TIMEOUT -); - -test( - "generate production k8s manifests", - async () => { - const manifests = await getEnvironmentManifests("prod", { - GITHUB_REF: "refs/tags/v1.3.22", - SOCIALGOUV_PRODUCTION: "true", - SOCIALGOUV_BASE_DOMAIN: "fabrique.social.gouv.fr", - }); - expect(manifests).toMatchSnapshot(); - }, - TIMEOUT -);