Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

chore: Update workflows and deploy dev to ovh #162

Merged
merged 5 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/workflows/build.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ on:
- "!main"
- "!dev"
- "!develop"

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.ref || github.event.pull_request.head.ref }}
- "!**/persist"
- "!persist/**"
- "!**/persist/**"
- "!persist-**"
- "!**-persist"
- "!**-persist-**"

jobs:
kontinuous:
socialgouv:
uses: socialgouv/workflows/.github/workflows/use-ks-gh-deactivate.yaml@v1
secrets: inherit
22 changes: 22 additions & 0 deletions .github/workflows/debug-kube.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Debug kube

on:
workflow_dispatch:
push:
branches:
- "feat/**"
- "fix/**"


jobs:
dump:
name: Debug kube
runs-on: ubuntu-latest
steps:
- uses: azure/setup-kubectl@v3
- name: extract kubeconfig
run: |
echo -n "${{secrets.KUBECONFIG}}" | base64 --decode > kubeconfig
- name: list kube data
run: |
KUBECONFIG=./kubeconfig kubectl config get-contexts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ on:
branches:
- "master"
- "main"
tags-ignore:
- v*

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}

jobs:
kontinuous:
name: "Deploy on Kubernetes 🐳"
socialgouv:
name: "🇫🇷 SocialGouv"
uses: socialgouv/workflows/.github/workflows/use-ks-gh-preproduction.yaml@v1
secrets: inherit
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}

jobs:
kontinuous:
name: "Deploy on Kubernetes 🐳"
socialgouv:
name: "🇫🇷 SocialGouv"
uses: socialgouv/workflows/.github/workflows/use-ks-gh-production.yaml@v1
secrets: inherit
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: Release
on:
workflow_dispatch:
push:
branches: [main, 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 }}
16 changes: 16 additions & 0 deletions .github/workflows/review-auto.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}

jobs:
kontinuous:
name: "Deploy on Kubernetes 🐳"
socialgouv:
name: "🇫🇷 SocialGouv"
uses: socialgouv/workflows/.github/workflows/use-ks-gh-review.yaml@v1
secrets: inherit
secrets: inherit
6 changes: 4 additions & 2 deletions .kontinuous/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
projectName: fabrique
ciNamespace: ci-fabrique

dependencies:
fabrique:
import: SocialGouv/kontinuous/plugins/fabrique
#@feat/needs-init-container
extends:
- name: ovh
ifEnv: [dev,preprod]
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG NODE_VERSION=16-alpine3.16

# Install dependencies only when needed
FROM node:$NODE_VERSION AS prepare
RUN apk add --no-cache libc6-compat=1.2.3-r2
RUN apk add --no-cache libc6-compat=1.2.3-r3
WORKDIR /app
COPY package.json yarn.lock ./

Expand Down Expand Up @@ -38,7 +38,7 @@ RUN if [ -z "$PRODUCTION" ]; then \
yarn build:export

# Production image, copy all the files and run next
FROM ghcr.io/socialgouv/docker/nginx:7.3.1 AS runner
FROM ghcr.io/socialgouv/docker/nginx:sha-1d70757 AS runner

COPY --from=builder /app/out /usr/share/nginx/html

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ Template utilise [kontinuous](https://github.com/socialgouv/kontinuous) pour dé

Lancer `npx kontinuous build --env dev -o` pour obtenir les manifests de votre environment (`dev`, `preprod` ou `prod`).

La version dev est déployée sur OVH.

## Liens

- <https://template.fabrique.social.gouv.fr/> : Version en production du projet
Expand Down