Files
user-microservice/.woodpecker/build.yaml
Marcin-Ramotowski 2520776ffe
All checks were successful
ci/woodpecker/push/build Pipeline was successful
Added test pod
2025-07-22 18:19:58 +02:00

36 lines
1.1 KiB
YAML

when:
- event: push
branch: woodpecker
steps:
- name: code-tests
image: python:3.11.7-alpine
commands:
- cd api
- python3 -m venv env
- source env/bin/activate
- pip install -r requirements.txt pytest
- python3 -m pytest --junit-xml=pytest_junit.xml
- name: build-and-push
image: marcin00.azurecr.io/azure-cli-docker:slim-bookworm
commands:
- dockerd &
- docker build -t marcin00.azurecr.io/user-microservice:${CI_COMMIT_SHA} --build-arg APP_VERSION=${CI_COMMIT_SHA} --build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") .
- az login --identity --client-id c302726f-fafb-4143-94c1-67a70975574a
- az acr login --name marcin00
- docker push marcin00.azurecr.io/user-microservice:${CI_COMMIT_SHA}
backend_options:
kubernetes:
annotations:
io.kubernetes.cri-o.userns-mode: "auto:size=65536"
runtimeClassName: sysbox-runc
- name: test-env
image: alpine
environment:
MY_VAR: test-value
commands:
- echo "Value of MY_VAR $MY_VAR"
- env | grep MY_VAR