raspi-image/.drone.yml

56 lines
1.9 KiB
YAML
Raw Normal View History

2021-07-09 14:48:37 +02:00
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
2021-07-09 14:52:22 +02:00
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
2021-07-09 14:48:37 +02:00
commands:
2021-07-09 14:54:05 +02:00
- sleep 10
2021-07-09 14:52:22 +02:00
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin registry.kmlabz.com
2021-07-09 14:53:14 +02:00
- docker run -i -v $PWD/output:/output registry.kmlabz.com/birbnetes/raspi-alpine-builder
2021-07-09 17:01:12 +02:00
- 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
2021-07-09 17:02:27 +02:00
- 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
2021-07-09 14:48:37 +02:00
- 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: {}