exec server commands via ssh
Gitea/subman-nextjs/pipeline/head This commit is unstable Details

This commit is contained in:
andrzej 2024-10-02 16:17:24 +02:00
parent 78b599bfcf
commit 009433f483
2 changed files with 3 additions and 1 deletions

3
Jenkinsfile vendored
View File

@ -9,11 +9,12 @@ agent any
steps{ steps{
sh 'npm install' sh 'npm install'
sh 'npm run build' sh 'npm run build'
sh ' tar -C .next -cvf subman.tar.gz standalone '
} }
} }
stage('deploy'){ stage('deploy'){
steps{ steps{
sshPublisher(publishers: [sshPublisherDesc(configName: 'Demos', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: 'ssh-uploads/subman', remoteDirectorySDF: false, removePrefix: '', sourceFiles: '**')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]) sshPublisher(publishers: [sshPublisherDesc(configName: 'Demos', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: 'ssh-uploads/subman/upgrade.sh', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: 'ssh-uploads/subman/', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'subman.tar.gz')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
} }
} }
} }

View File

@ -1,5 +1,6 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
output: "standalone",
webpack: (config) => { webpack: (config) => {
config.externals = [...config.externals, "bcrypt"]; config.externals = [...config.externals, "bcrypt"];
return config; return config;