From 3555c07aa07afb6a491c3c1f3850033a14da0965 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 31 Jul 2022 10:34:02 -0500 Subject: [PATCH] ci: Begin Jenkins build pipeline --- ci/Jenkinsfile | 23 +++++++++++++++++++++++ ci/build-svc.sh | 7 +++++++ ci/podTemplate.yaml | 7 +++++++ 3 files changed, 37 insertions(+) create mode 100644 ci/Jenkinsfile create mode 100644 ci/build-svc.sh create mode 100644 ci/podTemplate.yaml diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile new file mode 100644 index 0000000..08f9388 --- /dev/null +++ b/ci/Jenkinsfile @@ -0,0 +1,23 @@ +// vim: set sw=4 ts=4 sts=4 et : +// vim: set ft=groovy : + +pipeline { + agent { + kubernetes { + yamlFile 'ci/podTemplate.yaml' + } + } + + stages { + stage('Build Backend') { + steps { + container('python') { + dir('svc') { + sh '. ../ci/build-svc.sh' + } + } + } + } + } + +} diff --git a/ci/build-svc.sh b/ci/build-svc.sh new file mode 100644 index 0000000..83d575e --- /dev/null +++ b/ci/build-svc.sh @@ -0,0 +1,7 @@ +#!/bin/sh -ex + +python -m venv .venv +.venv/bin/python -m pip install -U pip setuptools wheel +.venv/bin/python -m pip install poetry + +.venv/bin/poetry build diff --git a/ci/podTemplate.yaml b/ci/podTemplate.yaml new file mode 100644 index 0000000..67be8b1 --- /dev/null +++ b/ci/podTemplate.yaml @@ -0,0 +1,7 @@ +spec: + containers: + - name: python + image: docker.io/python:3.10 + command: + - sleep + - infinity