2022-08-25 00:56:49 +01:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: lint
|
|
|
|
steps:
|
|
|
|
- name: lint
|
2022-08-27 20:52:15 +01:00
|
|
|
image: python:3-alpine
|
2022-08-25 00:56:49 +01:00
|
|
|
commands:
|
|
|
|
- echo "Installing lint dependencies..."
|
|
|
|
- pip install --no-cache-dir .[lint] > /dev/null
|
|
|
|
- echo "Running flake8..."
|
|
|
|
- flake8 src
|
|
|
|
- echo "Running pylint..."
|
|
|
|
- pylint src
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: test
|
2022-08-25 00:59:59 +01:00
|
|
|
steps:
|
2022-08-25 00:56:49 +01:00
|
|
|
- name: test
|
2022-08-27 20:52:15 +01:00
|
|
|
image: python:3-alpine
|
2022-08-25 00:56:49 +01:00
|
|
|
commands:
|
|
|
|
- echo "Installing test dependencies..."
|
|
|
|
- pip install --no-cache-dir .[test] > /dev/null
|
|
|
|
- echo "Running tests..."
|
|
|
|
- pytest
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2022-08-27 19:31:48 +01:00
|
|
|
name: build-pypi
|
2022-08-25 00:56:49 +01:00
|
|
|
depends_on:
|
|
|
|
- lint
|
|
|
|
- test
|
|
|
|
steps:
|
|
|
|
- name: build
|
2022-08-27 20:52:15 +01:00
|
|
|
image: python:3-alpine
|
2022-08-25 00:56:49 +01:00
|
|
|
commands:
|
|
|
|
- pip install --no-cache-dir build
|
|
|
|
- python -m build --wheel
|
|
|
|
- name: publish
|
|
|
|
image: plugins/pypi
|
2022-08-27 19:31:48 +01:00
|
|
|
depends_on:
|
|
|
|
- build
|
2022-08-25 00:56:49 +01:00
|
|
|
when:
|
|
|
|
branch:
|
2022-08-25 01:01:45 +01:00
|
|
|
- main
|
2022-08-27 21:00:43 +01:00
|
|
|
event:
|
|
|
|
- push
|
2022-08-25 00:56:49 +01:00
|
|
|
settings:
|
|
|
|
username: jackhadrill
|
|
|
|
password:
|
|
|
|
from_secret: password
|
|
|
|
repository: https://git.jacknet.io/api/packages/jackhadrill/pypi
|
2022-08-27 19:31:48 +01:00
|
|
|
skip_build: true
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: build-docker-amd64
|
2022-08-27 21:00:43 +01:00
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
- push
|
2022-08-27 19:31:48 +01:00
|
|
|
depends_on:
|
|
|
|
- build-pypi
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
dockerfile: Dockerfile
|
2022-08-27 19:36:35 +01:00
|
|
|
repo: git.jacknet.io/jackhadrill/container-spawner
|
2022-08-27 19:31:48 +01:00
|
|
|
tags: amd64
|
|
|
|
username: jackhadrill
|
|
|
|
password:
|
|
|
|
from_secret: password
|
|
|
|
registry: git.jacknet.io
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: build-docker-arm64
|
2022-08-27 21:00:43 +01:00
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
- push
|
2022-08-27 19:31:48 +01:00
|
|
|
depends_on:
|
|
|
|
- build-pypi
|
|
|
|
platform:
|
|
|
|
arch: arm64
|
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
repo: git.jacknet.io/jackhadrill/container-spawner
|
|
|
|
tags: arm64
|
|
|
|
username: jackhadrill
|
|
|
|
password:
|
|
|
|
from_secret: password
|
|
|
|
registry: git.jacknet.io
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2022-08-27 19:45:59 +01:00
|
|
|
name: combine-manifests
|
2022-08-27 21:00:43 +01:00
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
- push
|
2022-08-27 19:31:48 +01:00
|
|
|
depends_on:
|
|
|
|
- build-docker-amd64
|
|
|
|
- build-docker-arm64
|
2022-08-27 20:44:33 +01:00
|
|
|
clone:
|
|
|
|
disable: true
|
2022-08-27 19:31:48 +01:00
|
|
|
steps:
|
2022-08-27 19:45:59 +01:00
|
|
|
- name: publish
|
2022-08-27 19:31:48 +01:00
|
|
|
image: plugins/manifest
|
|
|
|
settings:
|
2022-08-27 20:44:33 +01:00
|
|
|
username: jackhadrill
|
2022-08-27 19:31:48 +01:00
|
|
|
password:
|
|
|
|
from_secret: password
|
|
|
|
target: git.jacknet.io/jackhadrill/container-spawner:latest
|
|
|
|
template: git.jacknet.io/jackhadrill/container-spawner:ARCH
|
|
|
|
platforms:
|
|
|
|
- linux/amd64
|
|
|
|
- linux/arm64
|