Compare commits

..

6 Commits

Author SHA1 Message Date
3f9f65c60e test
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2023-08-12 00:02:39 -04:00
fcdfc4e202 test
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-11 23:57:50 -04:00
508df82452 update
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-11 23:40:43 -04:00
TP Honey
018dd9ef61
Merge pull request #8 from tphoney/harness_move
(maint) move to harness.drone.io
2022-12-07 14:01:27 +00:00
TP Honey
a6e0171dd5 (maint) move to harness.drone.io 2022-12-07 13:58:28 +00:00
TP Honey
8ad8465153
fix docs link 2022-05-31 12:00:36 +01:00
4 changed files with 44 additions and 201 deletions

View File

@ -1,10 +1,10 @@
kind: pipeline kind: pipeline
type: docker
name: default name: default
type: docker
steps: steps:
- name: build - name: build
image: golang image: golang:alpine
commands: commands:
- go test ./... - go test ./...
- sh scripts/build.sh - sh scripts/build.sh
@ -12,162 +12,17 @@ steps:
- name: docker - name: docker
image: plugins/docker image: plugins/docker
settings: settings:
repo: plugins/buildah-docker repo: cr.smcm.xyz/drone-plugins/buildah
auto_tag: true tags:
auto_tag_suffix: linux-amd64 - latest
daemon_off: false - ${DRONE_COMMIT_SHA}
daemon_off: true
dockerfile: docker/docker/Dockerfile.linux.amd64 dockerfile: docker/docker/Dockerfile.linux.amd64
username: cache_from: cr.smcm.xyz/drone-plugins/buildah
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
exclude:
- pull_request
- name: gcr
image: plugins/docker
settings:
repo: plugins/buildah-gcr
auto_tag: true
auto_tag_suffix: linux-amd64
daemon_off: false
dockerfile: docker/gcr/Dockerfile.linux.amd64
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
exclude:
- pull_request
- name: ecr
image: plugins/docker
settings:
repo: plugins/buildah-ecr
auto_tag: true
auto_tag_suffix: linux-amd64
daemon_off: false
dockerfile: docker/ecr/Dockerfile.linux.amd64
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
exclude:
- pull_request
- name: acr
image: plugins/docker
settings:
repo: plugins/buildah-acr
auto_tag: true
auto_tag_suffix: linux-amd64
daemon_off: false
dockerfile: docker/acr/Dockerfile.linux.amd64
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
exclude:
- pull_request
- name: heroku
image: plugins/docker
settings:
repo: plugins/buildah-heroku
auto_tag: true
auto_tag_suffix: linux-amd64
daemon_off: false
dockerfile: docker/heroku/Dockerfile.linux.amd64
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
exclude:
- pull_request
---
kind: pipeline
type: docker
name: notifications-docker
platform:
os: linux
arch: amd64
steps:
- name: manifest-docker
pull: always
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: docker_password
spec: docker/docker/manifest.tmpl
username:
from_secret: docker_username
- name: manifest-gcr
pull: always
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: docker_password
spec: docker/gcr/manifest.tmpl
username:
from_secret: docker_username
- name: manifest-ecr
pull: always
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: docker_password
spec: docker/ecr/manifest.tmpl
username:
from_secret: docker_username
- name: manifest-acr
pull: always
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: docker_password
spec: docker/acr/manifest.tmpl
username:
from_secret: docker_username
- name: manifest-heroku
pull: always
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: docker_password
spec: docker/heroku/manifest.tmpl
username:
from_secret: docker_username
trigger: trigger:
ref: branch: master
- refs/heads/master event:
- "refs/tags/**" - push
- custom
depends_on: - cron
- default

View File

@ -8,7 +8,7 @@
[![Go Doc](https://godoc.org/github.com/drone-plugins/drone-buildah?status.svg)](http://godoc.org/github.com/drone-plugins/drone-buildah) [![Go Doc](https://godoc.org/github.com/drone-plugins/drone-buildah?status.svg)](http://godoc.org/github.com/drone-plugins/drone-buildah)
[![Go Report](https://goreportcard.com/badge/github.com/drone-plugins/drone-buildah)](https://goreportcard.com/report/github.com/drone-plugins/drone-buildah) [![Go Report](https://goreportcard.com/badge/github.com/drone-plugins/drone-buildah)](https://goreportcard.com/report/github.com/drone-plugins/drone-buildah)
Drone plugin uses buildah to build and publish Docker images to a container registry. For the usage information and a listing of the available options please take a look at [the docs](http://plugins.drone.io/drone-plugins/drone-buildah/). Drone plugin uses buildah to build and publish Docker images to a container registry. For the usage information and a listing of the available options please take a look at [the docs](https://plugins.drone.io/plugins/buildah).
## Build ## Build

View File

@ -1,40 +1,28 @@
FROM fedora FROM alpine:3.18
RUN dnf -y install \ RUN addgroup \
make \ -g 1000 \
golang \ build
bats \
btrfs-progs-devel \
device-mapper-devel \
glib2-devel \
gpgme-devel \
libassuan-devel \
libseccomp-devel \
git \
bzip2 \
go-md2man \
runc \
containers-common \
skopeo-containers
# Workaround - the first install somehow leaves the golang in a bad state RUN adduser \
RUN dnf -y install golang -h /home/build \
-s /bin/sh \
-u 1000 \
-G build \
-D \
build
RUN mkdir /root/buildah && \ RUN echo -e "build:1:999\nbuild:1001:64535" > /etc/subuid && \
cd /root/buildah && \ echo -e "build:1:999\nbuild:1001:64535" > /etc/subgid && \
git clone https://github.com/harness/buildah.git ./src/github.com/containers/buildah mkdir -p /home/build/.local/share/containers && \
mkdir -p /home/build/.config/containers && \
chown -R build:build /home/build
RUN cd /root/buildah/src/github.com/containers/buildah && make && sudo make install RUN apk add --no-cache buildah
ADD release/linux/amd64/drone-docker /bin/
ENV STORAGE_DRIVER vfs
FROM quay.io/buildah/stable:v1.23.0
USER build USER build
WORKDIR /home/build WORKDIR /home/build
RUN export STORAGE_DRIVER=vfs
# Add plugin binary
ADD release/linux/amd64/drone-docker /bin/
COPY --from=0 /root/buildah/src/github.com/containers/buildah/bin/. /bin/
ENTRYPOINT ["/bin/drone-docker"] ENTRYPOINT ["/bin/drone-docker"]

View File

@ -10,8 +10,8 @@ set -e
set -x set -x
# linux # linux
GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-gcr ./cmd/drone-gcr # GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-gcr ./cmd/drone-gcr
GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-ecr ./cmd/drone-ecr # GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-ecr ./cmd/drone-ecr
GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-docker ./cmd/drone-docker GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-docker ./cmd/drone-docker
GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-acr ./cmd/drone-acr # GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-acr ./cmd/drone-acr
GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-heroku ./cmd/drone-heroku # GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-heroku ./cmd/drone-heroku