Skip to content

Commit

Permalink
stash
Browse files Browse the repository at this point in the history
  • Loading branch information
carstene1ns committed Dec 3, 2023
1 parent 2688b31 commit 63a041c
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions player/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@

/* custom, shared checkout function */
/* custom, shared functions */
def myCheckout() {
dir('player') {
git url: 'https://github.com/EasyRPG/Player.git'
}
}

def myStash(String name = 'stash') {
stash includes: '*.zip,*.tar.gz', name: name
}

/* Player */

pipeline {
Expand Down Expand Up @@ -47,6 +51,13 @@ pipeline {
echo "Install"
}
}
stage('Prepare Artifacts') {
steps {
echo "Artifacts"
sh 'touch port.tar.gz'
myStash('port')
}
}
}
}
stage('Linux') {
Expand All @@ -73,6 +84,13 @@ pipeline {
echo "Install"
}
}
stage('Prepare Artifacts') {
steps {
echo "Artifacts"
sh 'touch linux.tar.gz'
myStash('linux')
}
}
}
}
stage('Windows') {
Expand Down Expand Up @@ -101,13 +119,24 @@ pipeline {
echo "Install"
}
}
stage('Prepare Artifacts') {
steps {
echo "Artifacts"
sh 'touch windows.tar.gz'
myStash('windows')
}
}
}
}
}
}
stage('Artifacts') {
stage('Publish Artifacts') {
steps {
echo "Artifacts"
unstash 'port'
unstash 'linux'
unstash 'windows'
sh 'ls -Ral'
}
}
}
Expand Down

0 comments on commit 63a041c

Please sign in to comment.