Browse Source

init-repo

pull/1/head
fedy95 4 years ago
parent
commit
3a32d3be8e
  1. 44
      .drone.yml
  2. 11
      Dockerfile
  3. 18
      Makefile
  4. 9
      README.md

44
.drone.yml

@ -0,0 +1,44 @@
---
kind: pipeline
type: docker
name: default
image_pull_secrets:
- dockerconfigjson
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
steps:
- name: lint yaml
image: registry.fedy95.com/baseimage-yamllint:latest
commands:
- yamllint -c /yamllint/relaxed.yaml .
when:
event: pull_request
- name: release
image: docker:dind
volumes:
- name: dockersock
path: /var/run/docker.sock
settings:
repo: baseimage/plantuml
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-plantuml:"$DRONE_TAG" .
- docker build -t "$REGISTRY"/baseimage-plantuml:latest image -f image/Dockerfile
- docker login "$REGISTRY" -u"$REGISTRY_USERNAME" -p"$REGISTRY_PASSWORD"
- docker push "$REGISTRY"/baseimage-plantuml:"$DRONE_TAG"
- docker push "$REGISTRY"/baseimage-plantuml:latest
- docker logout "$REGISTRY"
when:
event: tag
...

11
Dockerfile

@ -0,0 +1,11 @@
FROM openjdk:17-jdk-alpine
ENV PLANTUML_VERSION=1.2021.7
ENV LANG en_US.UTF-8
RUN \
apk add --no-cache graphviz wget ca-certificates ttf-dejavu fontconfig && \
wget "https://downloads.sourceforge.net/project/plantuml/${PLANTUML_VERSION}/plantuml.${PLANTUML_VERSION}.jar" -O plantuml.jar && \
apk del wget ca-certificates
RUN ["java", "-Djava.awt.headless=true", "-jar", "plantuml.jar", "-version"]
RUN ["dot", "-version"]

18
Makefile

@ -0,0 +1,18 @@
MAKEFLAGS += --silent
.PHONY: *
LOCAL_REPOSITORY=fedy95/baseimage:plantuml
PLANTUML_TAG=latest
build:
docker build -t ${LOCAL_REPOSITORY}-${PLANTUML_TAG} .
REGISTRY=registry.fedy95.com
YAMLLINT_TAG=baseimage-yamllint:latest
lint-yaml:
docker pull ${REGISTRY}/${YAMLLINT_TAG}
docker run --rm -it -v $(PWD):/data ${REGISTRY}/${YAMLLINT_TAG} .
.DEFAULT_GOAL := lint-yaml

9
README.md

@ -1,3 +1,8 @@
### template [![Build Status](https://drone.fedy95.com/api/badges/infra/template/status.svg)](https://drone.fedy95.com/infra/template)
### plantuml [![Build Status](https://drone.fedy95.com/api/badges/baseimage/plantuml/status.svg)](https://drone.fedy95.com/baseimage/plantuml)
Base repository for new infra-repos
Baseimage for generate uml-diagrams
---
- [plantuml jar vesions](https://plantuml.com/download)
- [openjdk docker hub](https://hub.docker.com/_/openjdk)