added deployment
Some checks failed
CSGOWTF/csgowtf/pipeline/head There was a failure building this commit
Some checks failed
CSGOWTF/csgowtf/pipeline/head There was a failure building this commit
This commit is contained in:
27
Jenkinsfile
vendored
27
Jenkinsfile
vendored
@@ -1,6 +1,11 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
FTP_HOST = credentials('csgowtf-deploy-host')
|
||||
FTP_PASSWORD = credentials('csgowtf-deploy-password')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Prepare') {
|
||||
steps {
|
||||
@@ -18,5 +23,27 @@ pipeline {
|
||||
archiveArtifacts artifacts: '**/dist/**', excludes: '**/node_modules/**'
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
environment {
|
||||
FTP_USERNAME = credentials('csgowtf-deploy-user')
|
||||
}
|
||||
steps {
|
||||
sh 'deploy.sh'
|
||||
}
|
||||
}
|
||||
stage('Deploy Dev') {
|
||||
when {
|
||||
branch 'dev'
|
||||
}
|
||||
environment {
|
||||
FTP_USERNAME = credentials('csgowtf-deploy-user-dev')
|
||||
}
|
||||
steps {
|
||||
sh 'deploy.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
12
deploy.sh
Normal file
12
deploy.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
lftp -c "open -e \"set ftp:ssl-auth TLS; \
|
||||
set ftp:ssl-force true; \
|
||||
set ftp:ssl-protect-list yes; \
|
||||
set ftp:ssl-protect-data yes; \
|
||||
set ftp:ssl-protect-fxp yes; \
|
||||
set ssl:verify-certificate no; \
|
||||
rm -r *; \
|
||||
mput dist/*; \" \
|
||||
-u '$FTP_USERNAME','$FTP_PASSWORD' \
|
||||
ftps://$FTP_HOST"
|
Reference in New Issue
Block a user