Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 91b48d1

Browse files
authored
feat: add kontinuous #3
2 parents 4a665dc + 1fd689d commit 91b48d1

32 files changed

Lines changed: 7105 additions & 7495 deletions

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.dockerignore
2+
Dockerfile
3+
node_modules
4+
.git
5+
.github
6+
.kontinuous
7+
.gitignore
8+
.nvmrc

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Protect workflow files
2+
.github/workflows/*.yml @socialgouv/sre
3+
.github/CODEOWNERS @socialgouv/sre
4+
.k8s/ @socialgouv/sre

.github/renovate.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": ["github>SocialGouv/renovate-config:light"],
3+
"ignoreDeps": ["template.data.gouv.fr"]
4+
}

.github/semantic.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
titleAndCommits: true
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master ]
20+
schedule:
21+
- cron: '22 3 * * 4'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'javascript' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37+
# Learn more:
38+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v2
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v1
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53+
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v1
58+
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
61+
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
65+
66+
#- run: |
67+
# make bootstrap
68+
# make release
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v1

.github/workflows/deactivate.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: ♻️ Deactivate
2+
on:
3+
pull_request:
4+
types: [closed]
5+
delete:
6+
branches:
7+
- "**"
8+
- "!v*"
9+
- "!master"
10+
- "!main"
11+
- "!dev"
12+
- "!develop"
13+
14+
concurrency:
15+
cancel-in-progress: true
16+
group: ${{ github.workflow }}-${{ github.event.ref || github.event.pull_request.head.ref }}
17+
18+
jobs:
19+
kontinuous:
20+
uses: socialgouv/workflows/.github/workflows/use-ks-gh-deactivate.yaml@v1
21+
secrets: inherit
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 😎 PreProd
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- "master"
7+
- "main"
8+
9+
concurrency:
10+
cancel-in-progress: true
11+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}
12+
13+
jobs:
14+
build:
15+
name: Build & Register application
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Use autodevops build and register
19+
uses: socialgouv/workflows/actions/build-image@v1
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
environment: preprod
23+
imagePackage: app
24+
25+
kontinuous:
26+
name: "Deploy on Kubernetes 🐳"
27+
needs: [build]
28+
uses: socialgouv/workflows/.github/workflows/use-ks-gh-preproduction.yaml@v1
29+
secrets: inherit

.github/workflows/production.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 🚀 Production
2+
on:
3+
workflow_dispatch:
4+
push:
5+
tags:
6+
- v*
7+
8+
concurrency:
9+
cancel-in-progress: true
10+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}
11+
12+
jobs:
13+
build:
14+
name: Build & Register application
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Use autodevops build and register
18+
uses: socialgouv/workflows/actions/build-image@v1
19+
with:
20+
environment: prod
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
imagePackage: app
23+
24+
kontinuous:
25+
name: "Deploy on Kubernetes 🐳"
26+
needs: [build]
27+
uses: socialgouv/workflows/.github/workflows/use-ks-gh-production.yaml@v1
28+
secrets: inherit

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [master, alpha, beta, next]
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
persist-credentials: false
19+
20+
- name: Semantic Release
21+
uses: cycjimmy/semantic-release-action@v2
22+
with:
23+
semantic_version: 17
24+
extra_plugins: |
25+
@semantic-release/changelog@5.0.1
26+
@semantic-release/git@9.0.0
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }}

.github/workflows/review-auto.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 👓 Review Auto
2+
on:
3+
push:
4+
branches:
5+
- "feat/**"
6+
- "fix/**"
7+
- "chore/**"
8+
9+
concurrency:
10+
cancel-in-progress: true
11+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}
12+
13+
jobs:
14+
kontinuous:
15+
name: "Deploy on Kubernetes 🐳"
16+
uses: socialgouv/workflows/.github/workflows/use-ks-gh-review-auto.yaml@v1
17+
secrets: inherit

0 commit comments

Comments
 (0)