Compare commits
2 Commits
fix/cl9-ss
...
fix/cl9-su
| Author | SHA1 | Date | |
|---|---|---|---|
| 87246181a9 | |||
| 1bb61a0acc |
@@ -7,6 +7,11 @@ RUN npm ci
|
|||||||
FROM node:20-bookworm-slim AS builder
|
FROM node:20-bookworm-slim AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
ARG NEXT_PUBLIC_SUPABASE_URL
|
||||||
|
ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
|
||||||
|
ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL
|
||||||
|
ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY
|
||||||
|
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|||||||
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@@ -1,6 +1,7 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
// Build + deploy stages require Docker CLI/daemon access on the Jenkins node.
|
// Build + deploy stages require Docker CLI/daemon access on the Jenkins node.
|
||||||
// Ensure this label maps to an agent with Docker installed and usable.
|
// Ensure this label maps to an agent with Docker installed and usable.
|
||||||
|
//update
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
@@ -62,13 +63,23 @@ pipeline {
|
|||||||
|
|
||||||
stage('Build application') {
|
stage('Build application') {
|
||||||
steps {
|
steps {
|
||||||
sh 'npm run build'
|
withCredentials([
|
||||||
|
string(credentialsId: 'supabase-public-url', variable: 'NEXT_PUBLIC_SUPABASE_URL'),
|
||||||
|
string(credentialsId: 'supabase-public-anon-key', variable: 'NEXT_PUBLIC_SUPABASE_ANON_KEY')
|
||||||
|
]) {
|
||||||
|
sh 'npm run build'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Build Docker image') {
|
stage('Build Docker image') {
|
||||||
steps {
|
steps {
|
||||||
sh 'docker build -t ${IMAGE_LATEST} -t ${IMAGE_BUILD} .'
|
withCredentials([
|
||||||
|
string(credentialsId: 'supabase-public-url', variable: 'NEXT_PUBLIC_SUPABASE_URL'),
|
||||||
|
string(credentialsId: 'supabase-public-anon-key', variable: 'NEXT_PUBLIC_SUPABASE_ANON_KEY')
|
||||||
|
]) {
|
||||||
|
sh 'docker build --build-arg NEXT_PUBLIC_SUPABASE_URL="$NEXT_PUBLIC_SUPABASE_URL" --build-arg NEXT_PUBLIC_SUPABASE_ANON_KEY="$NEXT_PUBLIC_SUPABASE_ANON_KEY" -t ${IMAGE_LATEST} -t ${IMAGE_BUILD} .'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user