From c4fa2ac4f387bdfeff9b02ff2fca3b9752a2eb92 Mon Sep 17 00:00:00 2001 From: jenkins Date: Mon, 24 Oct 2022 16:18:58 +0000 Subject: [PATCH] Add CI configuration (#1) Add Jenkinsfile to automate deployment Co-authored-by: Rene Luria Reviewed-on: https://gitea.parano.ch/Parano/TinderPokemon/pulls/1 --- Jenkinsfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..b63b1b5 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,34 @@ +pipeline { + agent { + kubernetes { + yaml ''' + apiVersion: v1 + kind: Pod + spec: + containers: + - name: python + image: python:3.10 + command: + - cat + tty: true + ''' + } + } + environment { + SWIFT_CREDENTIALS = credentials("swift") + } + stages { + stage('Deploy files') { + steps { + container('python') { + sh 'pip install python-swiftclient python-keystoneclient' + sh """ + . $SWIFT_CREDENTIALS + swift upload --changed tinderpokemon *html + swift upload --changed tinderpokemon assets/ + """ + } + } + } + } +}