subman-nextjs/Jenkinsfile

22 lines
785 B
Plaintext
Raw Normal View History

2024-10-01 09:04:52 +00:00
pipeline {
agent any
environment{
2024-10-01 10:16:58 +00:00
JWT_SECRET=credentials('JWT_SECRET')
2024-10-01 09:04:52 +00:00
DATABASE_URL=credentials('DATABASE_URL')
}
stages{
stage('build'){
steps{
sh 'npm install'
sh 'npm run build'
2024-10-02 19:56:21 +00:00
sh ' tar -C .next -cf subman.tar.gz standalone '
2024-10-01 09:04:52 +00:00
}
}
stage('deploy'){
steps{
2024-10-02 14:17:24 +00:00
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)])
2024-10-01 09:04:52 +00:00
}
}
}
}