add a build setup that probably won't work but let's see
Gitea/homepage/pipeline/head There was a failure building this commit

This commit is contained in:
Georgios Jason Efstathiou
2024-12-22 19:53:49 +01:00
parent 3ef51fbc12
commit dbeef8b3ee
2 changed files with 53 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
FROM node:alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:alpine
WORKDIR /app
COPY --from=builder /app/build ./
CMD ["node", "./"]
Vendored
+35
View File
@@ -0,0 +1,35 @@
pipeline {
agent any
environment {
REGISTRY = "docker-registry.service.consul"
IMAGE_NAME = "homepage"
}
stages {
stage('Build') {
steps {
sh 'npm ci'
sh 'npm run build'
}
}
stage('Docker Build') {
steps {
script {
dockerImage = docker.build("$REGISTRY/$IMAGE_NAME")
}
}
}
stage('Docker Publish') {
steps {
script {
docker.withRegistry("http://$REGISTRY") {
dockerImage.push("latest")
}
}
}
}
}
}