From f2687c0c60ca5530b8d1ac59d3a44ccdfcd09b9d Mon Sep 17 00:00:00 2001 From: zontreck Date: Tue, 3 Sep 2024 13:59:23 -0700 Subject: [PATCH] Adds a jenkinsfile --- Jenkinsfile | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ build.sh | 3 +-- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..d5b1cce --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,54 @@ +pipeline { + agent any + + options { + logRotator( + numToKeepStr: '5' + ) + } + + stages { + stage("Build Base Operating Systems") { + agent { + label 'dockermain' + } + + steps { + script { + sh ''' + #!/bin/bash + + docker build -t git.zontreck.com/ariascreations/yolks:alpine base/alpine + ''' + } + } + } + + stage("Push Operating System Bases") { + agent { + label 'dockermain' + } + + steps { + script { + sh ''' + #!/bin/bash + + docker push git.zontreck.com/ariascreations/yolks:alpine + + ''' + } + } + } + + stage("Cleanup") { + agent { + label 'dockermain' + } + + steps { + deleteDir() + } + } + } +} \ No newline at end of file diff --git a/build.sh b/build.sh index 101148a..5f37634 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,4 @@ #!/bin/bash -docker build -t git.zontreck.com/ariascreations/yolks:alpine base/alpine -docker push git.zontreck.com/ariascreations/yolks:alpine \ No newline at end of file +docker build -t git.zontreck.com/ariascreations/yolks:alpine base/alpine \ No newline at end of file