ci: activer pipeline sur docker-support (lint,type-check,tests,build) et build Docker artefacts
This commit is contained in:
parent
775ca443f6
commit
8d4f6ed35e
@ -2,9 +2,9 @@ name: CI/CD Pipeline
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, develop, 4nk-node-integration ]
|
branches: [ docker-support ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main, develop ]
|
branches: [ docker-support ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@ -46,10 +46,10 @@ jobs:
|
|||||||
- name: Build application
|
- name: Build application
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Test Docker build
|
- name: Test Docker build (artefacts)
|
||||||
run: |
|
run: |
|
||||||
docker build -f Dockerfile.4nk-node -t ihm-client:test .
|
docker build -t ihm-client:dist .
|
||||||
docker rmi ihm-client:test
|
docker image rm ihm-client:dist
|
||||||
|
|
||||||
security:
|
security:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -104,11 +104,7 @@ jobs:
|
|||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Build and test Docker integration
|
- name: Build Docker artefacts
|
||||||
run: |
|
run: |
|
||||||
docker build -f Dockerfile.4nk-node -t ihm-client:integration .
|
docker build -t ihm-client:dist .
|
||||||
docker run --rm -d --name ihm-client-test -p 8080:80 ihm-client:integration
|
docker image rm ihm-client:dist
|
||||||
sleep 10
|
|
||||||
curl -f http://localhost:8080 || exit 1
|
|
||||||
docker stop ihm-client-test
|
|
||||||
docker rmi ihm-client:integration
|
|
||||||
|
@ -15,7 +15,9 @@
|
|||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
"deploy": "sudo cp -r dist/* /var/www/html/",
|
"deploy": "sudo cp -r dist/* /var/www/html/",
|
||||||
"prettify": "prettier --config ./.prettierrc --write \"src/**/*{.ts,.html,.css,.js}\"",
|
"prettify": "prettier --config ./.prettierrc --write \"src/**/*{.ts,.html,.css,.js}\"",
|
||||||
"build:dist": "tsc -p tsconfig.build.json"
|
"build:dist": "tsc -p tsconfig.build.json",
|
||||||
|
"lint": "prettier -c \"src/**/*{.ts,.html,.css,.js}\"",
|
||||||
|
"type-check": "tsc -p tsconfig.json --noEmit"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user