add jenkins file
This commit is contained in:
parent
15398dc8d1
commit
5e06348996
49
customer/jenkins/Jenkinsfile
vendored
Normal file
49
customer/jenkins/Jenkinsfile
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
pipeline {
|
||||
agent {
|
||||
docker { image 'node:14-alpine' }
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('checkout') {
|
||||
steps{
|
||||
git credentialsId: 'gitlab_token_api', poll: false, url: 'https://gitlab.com/group_rocho02/fitness-web.git'
|
||||
}
|
||||
}
|
||||
stage('Hello') {
|
||||
steps {
|
||||
|
||||
sh 'node --version'
|
||||
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
|
||||
sh '''cd customer/app
|
||||
npm i
|
||||
npm run build:prod-cutler-movar
|
||||
cd dist
|
||||
tar -czvf app.tar.gz app
|
||||
|
||||
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
stage('upload') {
|
||||
steps {
|
||||
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'websiter.hu', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''
|
||||
pwd
|
||||
#bash /home/fitnessa/backup_fw.sh
|
||||
cd rocho/work
|
||||
tar -xvf app.tar.gz
|
||||
chown -R fitnessa.fitnessa app
|
||||
rm -rf/home/fitnessa/public_html/group-training
|
||||
mv app /home/fitnessa/public_html/group-training
|
||||
''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: 'rocho/work', remoteDirectorySDF: false, removePrefix: 'customer/app/dist', sourceFiles: 'customer/app/dist/app.tar.gz')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: true)])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user