-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Production test 1
- Loading branch information
Showing
215 changed files
with
26,295 additions
and
3,683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Build the server image | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
build_server: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Kaniko build | ||
uses: aevea/action-kaniko@master | ||
with: | ||
image: destcom/sera-server | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
tag: ${{ github.ref_name }} | ||
tag_with_latest: true | ||
path: ./sera-back/docker/ | ||
build_file: ./prod.Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Build the webapp image | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
build_server: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Kaniko build | ||
uses: aevea/action-kaniko@master | ||
with: | ||
image: destcom/sera-web | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
tag: ${{ github.sha }} | ||
tag_with_latest: true | ||
path: ./sera-front/ | ||
build_file: ./prod.Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Create a release | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
launch_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
generate_release_notes: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Deploy in production | ||
|
||
on: | ||
push: | ||
branches: | ||
- prod | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_server: | ||
uses: ./.github/workflows/build_server_image.yml | ||
build_webapp: | ||
needs: build_server | ||
uses: ./.github/workflows/build_web_image.yml | ||
deploy_release: | ||
needs: build_webapp | ||
uses: ./.github/workflows/create_release.yml | ||
notify: | ||
needs: deploy_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Notify production build & published | ||
env: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
uses: Ilshidur/action-discord@master | ||
with: | ||
args: "A new release just been created on SERA, images pushed to dockerhub." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Linting | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
#push: | ||
#branches: | ||
#- develop | ||
#workflow_call: | ||
|
||
jobs: | ||
lint: | ||
runs-on: lint | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
clean: false | ||
ref: ${{ github.event.inputs.ref }} | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Install dependencies | ||
working-directory: ./sera-front | ||
run: npm ci | ||
|
||
- name: Verify & autofix linting errors if needed | ||
working-directory: ./sera-front | ||
run: | | ||
npm run lint-autofix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Rebuilding containers | ||
|
||
on: workflow_call | ||
jobs: | ||
cleaning: | ||
runs-on: self-hosted | ||
|
||
steps: | ||
- name: Detect and delete front container | ||
run: | | ||
if [ "$(docker ps -a -q --filter "name=front" | wc -l)" -gt 0 ] | ||
then | ||
echo "Previous containers found, stopping and removing them..." | ||
docker stop $(docker ps -a -q --filter "name=front") | ||
docker rm $(docker ps -a -q --filter "name=front") | ||
else | ||
echo "No previous containers found, continuing..." | ||
fi | ||
- name: Detect and delete back container | ||
run: | | ||
if [ "$(docker ps -a -q --filter "name=back-laravel" | wc -l)" -gt 0 ] | ||
then | ||
echo "Previous containers found, stopping and removing them..." | ||
docker stop $(docker ps -a -q --filter "name=back-laravel") | ||
docker rm $(docker ps -a -q --filter "name=back-laravel") | ||
else | ||
echo "No previous containers found, continuing..." | ||
fi | ||
- name: Detect and delete aditionnal container | ||
run: | | ||
if [ "$(docker ps -a -q --filter "name=back-soketi" | wc -l)" -gt 0 ] | ||
then | ||
echo "Previous containers found, stopping and removing them..." | ||
docker stop $(docker ps -a -q --filter "name=back-soketi") | ||
docker rm $(docker ps -a -q --filter "name=back-soketi") | ||
else | ||
echo "No previous containers found, continuing..." | ||
fi | ||
if [ "$(docker ps -a -q --filter "name=back-redis" | wc -l)" -gt 0 ] | ||
then | ||
echo "Previous containers found, stopping and removing them..." | ||
docker stop $(docker ps -a -q --filter "name=back-redis") | ||
docker rm $(docker ps -a -q --filter "name=back-redis") | ||
else | ||
echo "No previous containers found, continuing..." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ yarn-error.log | |
/.fleet | ||
/.idea | ||
/.vscode | ||
old-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": [ | ||
"development" | ||
], | ||
"hints": { | ||
"typescript-config/is-valid": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.