ci: simplify overcomplicated file copying

Overcomplicated for no reason.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-01-17 11:37:45 +01:00
parent 622aecb422
commit 012ef6089b
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
1 changed files with 1 additions and 38 deletions

39
ci/Jenkinsfile vendored
View File

@ -53,7 +53,6 @@ pipeline {
} }
stage('Publish') { stage('Publish') {
//when { expression { GIT_BRANCH.endsWith('master') } }
steps { script { steps { script {
sh "echo ${SITE_DOMAIN} > build/docs/CNAME" sh "echo ${SITE_DOMAIN} > build/docs/CNAME"
sshagent(credentials: ['status-im-auto-ssh']) { sshagent(credentials: ['status-im-auto-ssh']) {
@ -80,42 +79,6 @@ def buildExample(example=STAGE_NAME) {
def copyExample(example=STAGE_NAME) { def copyExample(example=STAGE_NAME) {
def source = "examples/${example}" def source = "examples/${example}"
def dest = "build/docs/${example}" def dest = "build/docs/${example}"
sh "mkdir -p ${dest}" sh "mkdir -p ${dest}"
sh "cp -r ${source}/. ${dest}"
try {
sh "cp ${source}/*.js ${dest}/"
} catch (e) {
echo "No JS files found."
}
try {
sh "cp ${source}/*.css ${dest}/"
} catch (e) {
echo "No CSS files found."
}
try {
sh "cp ${source}/*.html ${dest}/"
} catch (e) {
echo "No HTML files found."
}
try {
sh "cp ${source}/*.json ${dest}/"
} catch (e) {
echo "No JSON files found."
}
try {
sh "cp ${source}/*.png ${dest}/"
} catch (e) {
echo "No PNG files found."
}
try {
sh "cp ${source}/*.ico ${dest}/"
} catch (e) {
echo "No ICO files found."
}
} }