feat: enable drone ci builds + add img metadata
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
* also add build status badges to README * add metadata to the image at build time using a build hook
This commit is contained in:
parent
47625bc364
commit
a85013bb78
29
.drone.yml
Normal file
29
.drone.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: dockerhub-build-trigger
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- cron
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: call webhook
|
||||||
|
pull: always
|
||||||
|
image: bash:latest
|
||||||
|
environment:
|
||||||
|
ENDPOINT:
|
||||||
|
from_secret: DOCKERHUB_ENDPOINT
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache curl
|
||||||
|
- curl -sO https://git.dotya.ml/${DRONE_REPO}/raw/branch/master/curl.it
|
||||||
|
- bash ./curl.it $ENDPOINT
|
@ -1,5 +1,12 @@
|
|||||||
FROM frolvlad/alpine-java:jdk8-full as build
|
FROM frolvlad/alpine-java:jdk8-full as build
|
||||||
MAINTAINER wanderer <wanderer at git.dotya.ml>
|
MAINTAINER wanderer <wanderer at git.dotya.ml>
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG VCS_REF
|
||||||
|
|
||||||
|
LABEL org.label-schema.build-date=$BUILD_DATE \
|
||||||
|
org.label-schema.vcs-url="https://git.dotya.ml/wanderer/docker-alpine-android.git" \
|
||||||
|
org.label-schema.vcs-ref=$VCS_REF \
|
||||||
|
org.label-schema.license=GPL-3.0
|
||||||
|
|
||||||
ENV VERSION_SDK_TOOLS "3859397"
|
ENV VERSION_SDK_TOOLS "3859397"
|
||||||
ENV VERSION_TOOLS "6609375"
|
ENV VERSION_TOOLS "6609375"
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
# docker-alpine-android
|
# docker-alpine-android
|
||||||
|
|
||||||
|
[![Build Status](https://drone.dotya.ml/api/badges/wanderer/docker-alpine-android/status.svg)](https://drone.dotya.ml/wanderer/docker-alpine-android)
|
||||||
|
[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/immawanderer/alpine-android)](https://hub.docker.com/r/immawanderer/alpine-android/builds)
|
||||||
|
|
||||||
push mirror lives in [this GitHub repo](https://github.com/wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf/docker-alpine-android)<br />
|
push mirror lives in [this GitHub repo](https://github.com/wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf/docker-alpine-android)<br />
|
||||||
development happens on [this Gitea instance](https://git.dotya.ml/wanderer/docker-alpine-android)
|
development happens on [this Gitea instance](https://git.dotya.ml/wanderer/docker-alpine-android)
|
||||||
|
|
||||||
|
7
curl.it
Executable file
7
curl.it
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ $# -gt 1 ]; then
|
||||||
|
curl -s -H 'Content-Type: application/json' --data '{"docker_tag":"nightly"}' -X POST $2
|
||||||
|
else
|
||||||
|
curl -s -H 'Content-Type: application/json' --data '{"docker_tag":"latest"}' -X POST $1
|
||||||
|
fi
|
10
hooks/build
Normal file
10
hooks/build
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# as per https://github.com/rossf7/label-schema-automated-build
|
||||||
|
|
||||||
|
# $IMAGE_NAME var is injected into the build so the tag is correct.
|
||||||
|
|
||||||
|
echo "Build hook running"
|
||||||
|
docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||||
|
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
||||||
|
-t $IMAGE_NAME .
|
Loading…
Reference in New Issue
Block a user