diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..fecbe71 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,36 @@ +--- +kind: pipeline +type: docker +name: default +image_pull_secrets: + - dockerconfigjson +volumes: + - name: dockersock + host: + path: /var/run/docker.sock +steps: + - name: release + image: docker:dind + volumes: + - name: dockersock + path: /var/run/docker.sock + settings: + repo: baseimage/autossl + tags: + - ${DRONE_TAG} + environment: + REGISTRY: registry.fedy95.com + REGISTRY_USERNAME: + from_secret: REGISTRY_USERNAME + REGISTRY_PASSWORD: + from_secret: REGISTRY_PASSWORD + commands: + - docker build -t "$REGISTRY"/baseimage-autossl:"$DRONE_TAG" . + - docker build -t "$REGISTRY"/baseimage-autossl:latest . + - docker login "$REGISTRY" -u"$REGISTRY_USERNAME" -p"$REGISTRY_PASSWORD" + - docker push "$REGISTRY"/baseimage-autossl:"$DRONE_TAG" + - docker push "$REGISTRY"/baseimage-autossl:latest + - docker logout "$REGISTRY" + when: + event: tag +... diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..40ef77a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM alpine + +RUN \ + apk add --no-cache git && \ + git clone https://github.com/acmesh-official/acme.sh.git && \ + apk del git + +WORKDIR /ache.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..90141b8 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +MAKEFLAGS += --silent +.PHONY: * + +LOCAL_REPOSITORY=fedy95/baseimage:autossl +JSONLINT_TAG=latest + +build: + docker build -t ${LOCAL_REPOSITORY}-${JSONLINT_TAG} . + +.DEFAULT_GOAL := build diff --git a/README.md b/README.md index 781ca69..596889d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ -### template [![Build Status](https://drone.fedy95.com/api/badges/infra/template/status.svg)](https://drone.fedy95.com/infra/template) +### autossl [![Build Status](https://drone.fedy95.com/api/badges/baseimage/autossl/status.svg)](https://drone.fedy95.com/baseimage/autossl) -Base repository for new infra-repos +Base image for generate ssl-certs + +- [acme git](https://github.com/acmesh-official/acme.sh)