Compare commits

..

5 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
4 changed files with 43 additions and 206 deletions

View File

@ -1,10 +1,10 @@
kind: pipeline
type: docker
name: default
type: docker
steps:
- name: build
image: golang
image: golang:alpine
commands:
- go test ./...
- sh scripts/build.sh
@ -12,162 +12,17 @@ steps:
- name: docker
image: plugins/docker
settings:
repo: plugins/buildah-docker
auto_tag: true
auto_tag_suffix: linux-amd64
daemon_off: false
repo: cr.smcm.xyz/drone-plugins/buildah
tags:
- latest
- ${DRONE_COMMIT_SHA}
daemon_off: true
dockerfile: docker/docker/Dockerfile.linux.amd64
username:
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
cache_from: cr.smcm.xyz/drone-plugins/buildah
trigger:
ref:
- refs/heads/master
- "refs/tags/**"
depends_on:
- default
branch: master
event:
- push
- custom
- cron

View File

@ -1,40 +1,28 @@
FROM fedora
FROM alpine:3.18
RUN dnf -y install \
make \
golang \
bats \
btrfs-progs-devel \
device-mapper-devel \
glib2-devel \
gpgme-devel \
libassuan-devel \
libseccomp-devel \
git \
bzip2 \
go-md2man \
runc \
containers-common \
skopeo-containers
RUN addgroup \
-g 1000 \
build
# Workaround - the first install somehow leaves the golang in a bad state
RUN dnf -y install golang
RUN adduser \
-h /home/build \
-s /bin/sh \
-u 1000 \
-G build \
-D \
build
RUN mkdir /root/buildah && \
cd /root/buildah && \
git clone https://github.com/harness/buildah.git ./src/github.com/containers/buildah
RUN echo -e "build:1:999\nbuild:1001:64535" > /etc/subuid && \
echo -e "build:1:999\nbuild:1001:64535" > /etc/subgid && \
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/
FROM quay.io/buildah/stable:v1.23.0
ENV STORAGE_DRIVER vfs
USER 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"]

View File

@ -1,6 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
]
}

View File

@ -10,8 +10,8 @@ set -e
set -x
# 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-ecr ./cmd/drone-ecr
# 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-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-heroku ./cmd/drone-heroku
# 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