👷 Frontend CI/CD deployement
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
3e8d447106
commit
c95681a553
@ -0,0 +1,45 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: Frontend CI/CD
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: code-analysis
|
||||||
|
image: hub.codefirst.iut.uca.fr/alix.jeudi--lemoine/codefirst-dronesonarplugin-node:latest
|
||||||
|
commands:
|
||||||
|
- npm install
|
||||||
|
- /opt/sonar-scanner/bin/sonar-scanner
|
||||||
|
-Dsonar.login=$PLUGIN_SONAR_TOKEN
|
||||||
|
-Dsonar.projectKey=SAE3A_MemoryMap-front
|
||||||
|
-Dsonar.sources=src
|
||||||
|
-Dsonar.exclusions=**/*.spec.ts,**/node_modules/**
|
||||||
|
settings:
|
||||||
|
sonar_token:
|
||||||
|
from_secret: SECRET_SONAR_TOKEN
|
||||||
|
|
||||||
|
- name: docker-build-and-push
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
dockerfile: docker/Dockerfile
|
||||||
|
context: .
|
||||||
|
registry: hub.codefirst.iut.uca.fr
|
||||||
|
mirror: https://proxy.iut.uca.fr:8443
|
||||||
|
repo: hub.codefirst.iut.uca.fr/alix.jeudi--lemoine/memorymap_front
|
||||||
|
username:
|
||||||
|
from_secret: SECRET_REGISTRY_USERNAME
|
||||||
|
password:
|
||||||
|
from_secret: SECRET_REGISTRY_PASSWORD
|
||||||
|
depends_on: [ code-analysis ]
|
||||||
|
|
||||||
|
- name: deploy-frontend
|
||||||
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
||||||
|
environment:
|
||||||
|
IMAGENAME: hub.codefirst.iut.uca.fr/alix.jeudi--lemoine/memorymap_front:latest
|
||||||
|
CONTAINERNAME: frontend
|
||||||
|
COMMAND: create
|
||||||
|
OVERWRITE: true
|
||||||
|
ADMINS: alixjeudi--lemoine,alexisferon,mathisframit,maxencejouannet
|
||||||
|
depends_on: [ docker-build-and-push ]
|
@ -0,0 +1,17 @@
|
|||||||
|
# Official Node.js image
|
||||||
|
FROM node:22-slim
|
||||||
|
|
||||||
|
# Set workdir
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy the Angular app folder in the container
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Expose port
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
# Start the application with ng serve
|
||||||
|
CMD ["ng", "serve", "--host", "0.0.0.0", "--port", "80", "--configuration=production"]
|
Loading…
Reference in new issue