raspi-image/.drone.yml
Torma Kristóf e28b2640fb
Some checks failed
continuous-integration/drone/push Build is failing
correct repo name
2021-07-09 17:02:27 +02:00

56 lines
1.9 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: build-raspi-image
image: docker:dind
volumes:
- name: dockersock
path: /var/run
environment:
ALPINE_BRANCH: v3.14
ALPINE_MIRROR: https://quantum-mirror.hu/mirrors/pub/alpine/
DEFAULT_TIMEZONE: Europe/Budapest
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
commands:
- sleep 10
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin registry.kmlabz.com
- docker run -i -v $PWD/output:/output registry.kmlabz.com/birbnetes/raspi-alpine-builder
- name: upload-results
image: alpine:latest
environment:
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
commands:
- apk update && apk add curl
- curl -v --user '$DOCKER_USERNAME:$DOCKER_PASSWORD' --upload-file ./output/sdcard.img.gz https://nexus.kmlabz.com/repository/raspi-image/sdcard.img.gz
- curl -v --user '$DOCKER_USERNAME:$DOCKER_PASSWORD' --upload-file ./output/sdcard.img.gz.sha256 https://nexus.kmlabz.com/repository/raspi-image/sdcard.img.gz.sha256
- curl -v --user '$DOCKER_USERNAME:$DOCKER_PASSWORD' --upload-file ./output/sdcard_update.img.gz https://nexus.kmlabz.com/repository/raspi-image/sdcard_update.img.gz
- curl -v --user '$DOCKER_USERNAME:$DOCKER_PASSWORD' --upload-file ./output/sdcard_update.img.gz.sha256 https://nexus.kmlabz.com/repository/raspi-image/sdcard_update.img.gz.sha256
- name: ms-teams
image: kuperiu/drone-teams
settings:
webhook:
from_secret: TEAMS_WEBHOOK
when:
status: [ failure ]
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes:
- name: dockersock
temp: {}