This repository has been archived on 2025-07-06. You can view files and clone it, but cannot push or open issues or pull requests.
docker-almalinux-base/.drone.yml
Ben Vincent 84bd7fafd9
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
feat: first build testing
- add README
- update build steps to use docker.sock
2024-08-25 22:08:00 +10:00

60 lines
1.2 KiB
YAML

kind: pipeline
type: docker
name: build-docker-image
steps:
- name: build
image: docker:dind
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- apk add --no-cache make bash git
- make build
- name: push
image: docker:dind
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
volumes:
- name: dockersock
path: /var/run/docker.sock
when:
branch:
- master
event:
- push
commands:
- apk add --no-cache make bash git
- echo "$DOCKER_PASSWORD" | docker login --username=$DOCKER_USERNAME --password-stdin git.query.consul
- make push
- name: clean
image: docker:dind
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- apk add --no-cache make bash git
- make clean
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
trigger:
event:
- push
- pull_request
secrets:
- source: docker_username
target: DOCKER_USERNAME
- source: docker_password
target: DOCKER_PASSWORD