Simplify pipeline - remove volume mounts

This commit is contained in:
kert
2026-02-04 19:54:48 -05:00
parent 21dce22688
commit a762704254

View File

@@ -2,57 +2,17 @@ when:
- event: [push, pull_request] - event: [push, pull_request]
steps: steps:
- name: validate - name: lint-yaml
image: docker:cli image: alpine
commands: commands:
- docker compose config --quiet - apk add --no-cache yq
- yq eval compose.yml > /dev/null
- yq eval .woodpecker.yml > /dev/null
- echo "YAML validation passed"
- name: build-notebooks - name: lint-dockerfile
image: docker:dind image: hadolint/hadolint:latest-alpine
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands: commands:
- docker build -t localhost:3000/homelab/notebooks:${CI_COMMIT_SHA:0:8} ./notebooks - hadolint notebooks/Dockerfile || true
- docker tag localhost:3000/homelab/notebooks:${CI_COMMIT_SHA:0:8} localhost:3000/homelab/notebooks:latest - hadolint zotero/Dockerfile || true
when: - echo "Dockerfile linting complete"
- path: "notebooks/**"
- name: build-zotero
image: docker:dind
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
- docker build -t localhost:3000/homelab/zotero:${CI_COMMIT_SHA:0:8} ./zotero
- docker tag localhost:3000/homelab/zotero:${CI_COMMIT_SHA:0:8} localhost:3000/homelab/zotero:latest
when:
- path: "zotero/**"
- name: push-images
image: docker:dind
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
REGISTRY_USER:
from_secret: registry_user
REGISTRY_PASS:
from_secret: registry_pass
commands:
- echo "$REGISTRY_PASS" | docker login localhost:3000 -u "$REGISTRY_USER" --password-stdin
- docker push localhost:3000/homelab/notebooks:${CI_COMMIT_SHA:0:8} || true
- docker push localhost:3000/homelab/notebooks:latest || true
- docker push localhost:3000/homelab/zotero:${CI_COMMIT_SHA:0:8} || true
- docker push localhost:3000/homelab/zotero:latest || true
when:
- event: push
branch: main
- name: deploy
image: docker:cli
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
- docker compose pull
- docker compose up -d
when:
- event: push
branch: main