add a build setup that probably won't work but let's see
Gitea/homepage/pipeline/head There was a failure building this commit
Gitea/homepage/pipeline/head There was a failure building this commit
This commit is contained in:
+18
@@ -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
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user