Files
yudao-ui-admin-vben/Jenkinsfile
jiangdingxuan d9fe6449c5
Some checks are pending
CI / Test (ubuntu-latest) (push) Waiting to run
CI / Test (windows-latest) (push) Waiting to run
CI / Lint (ubuntu-latest) (push) Waiting to run
CI / Lint (windows-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / CI OK (push) Blocked by required conditions
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
Deploy Website on push / Deploy Push Playground Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Docs Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Antd Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Element Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Naive Ftp (push) Waiting to run
Deploy Website on push / Rerun on failure (push) Blocked by required conditions
Release Drafter / update_release_draft (push) Waiting to run
build: 前端应用部署。
2025-08-21 10:12:47 +08:00

40 lines
1.0 KiB
Groovy

#!/usr/bin/env groovy
pipeline {
agent any
stages {
stage('build') {
steps {
script {
file_contents = '''
VITE_GLOB_API_URL=${env.VITE_GLOB_API_URL}
'''
write_file_path = "apps/web-$pomPath/.env.production.local"
writeFile file: write_file_path, text: file_contents, encoding: 'UTF-8'
}
script{
sh "docker build -f apps/web-$pomPath/Dockerfile --build-arg BASE_URI=$BASE_URI -t $IMAGE_PATH ."
}
}
}
stage('deploy') {
steps {
script{
sh 'docker push $IMAGE_PATH'
}
}
}
}
post {
success {
sh """
curl -X POST "${params.API_URL}/success"
"""
}
failure {
sh """
curl -X POST "${params.API_URL}/failure"
"""
}
}
}