diff --git a/dawn-user/staging b/dawn-user/staging index 4dd1f464d1d624b671eb4275b0d6ca623c2dafd6..d286bb57aa8752ece9fdfbdcbca92af0b67f129d 100644 --- a/dawn-user/staging +++ b/dawn-user/staging @@ -1,3 +1,7 @@ +@Library('shared-library') _ + +def config = [name: 'Newman', dayOfWeek: 'Friday'] + pipeline { agent any tools { @@ -44,6 +48,12 @@ pipeline { """ } } + + stage('test library') { + steps { + test(config) + } + } } post { always { diff --git a/deploy/staging b/deploy/staging index 2b2dd15982285435f5bd5610f10735bb65f4ac35..f2cb8143f4869f6c0572e6488ceb2673f1459295 100644 --- a/deploy/staging +++ b/deploy/staging @@ -30,6 +30,8 @@ pipeline { steps { sh ''' docker image prune --filter "until=168h" --filter "label!=latest" || true + ''' + sh ''' docker rmi $(docker images | grep 'dev-test') || true ''' } diff --git a/test.groovy b/test.groovy new file mode 100644 index 0000000000000000000000000000000000000000..bd92cc248a42ad47cac158296e136b4c42e885c4 --- /dev/null +++ b/test.groovy @@ -0,0 +1,5 @@ +def call(Map config = [:]) { + + sh "echo Hello ${config.name}. Today is ${config.dayOfWeek}." + +} \ No newline at end of file