128 lines
2.4 KiB
YAML
128 lines
2.4 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: lint
|
|
steps:
|
|
- name: lint
|
|
image: python:3-alpine
|
|
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
|
|
steps:
|
|
- name: test
|
|
image: python:3-alpine
|
|
commands:
|
|
- echo "Installing test dependencies..."
|
|
- pip install --no-cache-dir .[test] > /dev/null
|
|
- echo "Running tests..."
|
|
- pytest
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: build-pypi
|
|
depends_on:
|
|
- lint
|
|
- test
|
|
steps:
|
|
- name: build
|
|
image: python:3-alpine
|
|
commands:
|
|
- pip install --no-cache-dir build
|
|
- python -m build --wheel
|
|
- name: publish
|
|
image: plugins/pypi
|
|
depends_on:
|
|
- build
|
|
when:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
settings:
|
|
username: jackhadrill
|
|
password:
|
|
from_secret: password
|
|
repository: https://git.jacknet.io/api/packages/jackhadrill/pypi
|
|
skip_build: true
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: build-docker-amd64
|
|
trigger:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
depends_on:
|
|
- build-pypi
|
|
platform:
|
|
arch: amd64
|
|
steps:
|
|
- name: build
|
|
image: plugins/docker
|
|
settings:
|
|
dockerfile: Dockerfile
|
|
repo: git.jacknet.io/jackhadrill/container-spawner
|
|
tags: amd64
|
|
username: jackhadrill
|
|
password:
|
|
from_secret: password
|
|
registry: git.jacknet.io
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: build-docker-arm64
|
|
trigger:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
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
|
|
name: combine-manifests
|
|
trigger:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
depends_on:
|
|
- build-docker-amd64
|
|
- build-docker-arm64
|
|
clone:
|
|
disable: true
|
|
steps:
|
|
- name: publish
|
|
image: plugins/manifest
|
|
settings:
|
|
username: jackhadrill
|
|
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
|