Adding the sha based version pinnig
This commit is contained in:
1 parent
cf3e12e9d2
commit
34d8b5a299
11 files changed
+2266
-55
No files matched your search
@@ -0,0 +1,70 @@
|
||||
package:
|
||||
name: apcupsd-client-build
|
||||
version: 1.0.0
|
||||
epoch: 0
|
||||
description: Build stage for apcupsd-client dev image (not installed directly)
|
||||
copyright:
|
||||
- license: MIT
|
||||
|
||||
environment:
|
||||
contents:
|
||||
repositories:
|
||||
- https://dl-cdn.alpinelinux.org/alpine/v3.21/main
|
||||
- https://dl-cdn.alpinelinux.org/alpine/v3.21/community
|
||||
packages:
|
||||
- alpine-baselayout
|
||||
- busybox
|
||||
- python3
|
||||
- py3-pip
|
||||
- py3-virtualenv
|
||||
|
||||
pipeline:
|
||||
- name: Create virtualenv and install dependencies
|
||||
runs: |
|
||||
set -ex
|
||||
mkdir -p "${{targets.destdir}}/app"
|
||||
python3 -m virtualenv "${{targets.destdir}}/app/.venv"
|
||||
"${{targets.destdir}}/app/.venv/bin/pip" install \
|
||||
--no-cache-dir \
|
||||
--only-binary :all: \
|
||||
--require-hashes \
|
||||
-r requirements.dev.txt
|
||||
|
||||
- name: Copy application source
|
||||
runs: |
|
||||
set -ex
|
||||
cp -r app/ "${{targets.destdir}}/app/app/"
|
||||
|
||||
- name: Fix virtualenv shebangs
|
||||
runs: |
|
||||
set -ex
|
||||
find "${{targets.destdir}}/app/.venv/bin" -type f -exec \
|
||||
sed -i "s|${{targets.destdir}}||g" {} +
|
||||
|
||||
- name: Strip build artifacts from virtualenv
|
||||
runs: |
|
||||
set -ex
|
||||
rm -rf "${{targets.destdir}}/app/.venv/bin/pip"*
|
||||
rm -rf "${{targets.destdir}}/app/.venv/bin/wheel"*
|
||||
rm -rf "${{targets.destdir}}/app/.venv/lib/python*/site-packages/pip"
|
||||
rm -rf "${{targets.destdir}}/app/.venv/lib/python*/site-packages/pip-*"
|
||||
rm -rf "${{targets.destdir}}/app/.venv/lib/python*/site-packages/setuptools"
|
||||
rm -rf "${{targets.destdir}}/app/.venv/lib/python*/site-packages/setuptools-*"
|
||||
rm -rf "${{targets.destdir}}/app/.venv/lib/python*/site-packages/wheel"
|
||||
rm -rf "${{targets.destdir}}/app/.venv/lib/python*/site-packages/wheel-*"
|
||||
find "${{targets.destdir}}/app/.venv" -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
|
||||
find "${{targets.destdir}}/app/.venv" -name "*.pyc" -delete 2>/dev/null || true
|
||||
|
||||
subpackages:
|
||||
- name: apcupsd-client
|
||||
description: FastAPI + Redis UPS monitoring dashboard with dev dependencies
|
||||
options:
|
||||
no-depends: true
|
||||
dependencies:
|
||||
runtime:
|
||||
- python3
|
||||
pipeline:
|
||||
- runs: |
|
||||
set -ex
|
||||
mkdir -p "${{targets.subpkgdir}}"
|
||||
mv "${{targets.destdir}}/app" "${{targets.subpkgdir}}/app"
|
||||
Reference in new issue
Block a user