From 98fd6bb9f831dd191a03739ca116bcddee2b4243 Mon Sep 17 00:00:00 2001 From: Till Witt Date: Tue, 2 Apr 2019 03:08:03 +0200 Subject: [PATCH] adding drone.io build automation (#44) * adding drone continuous delivery platform see drone.io for more info * fixed typo, removed default secret * reworked according to comments changed file name to reflect gitea specific configuration added infos to instructions.start and renamed file --- public/v1/apps/drone-gitea.json | 102 ++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 public/v1/apps/drone-gitea.json diff --git a/public/v1/apps/drone-gitea.json b/public/v1/apps/drone-gitea.json new file mode 100644 index 0000000..ecf1a84 --- /dev/null +++ b/public/v1/apps/drone-gitea.json @@ -0,0 +1,102 @@ +{ + "captainVersion": "1", + "documentation": "Taken from https://docs.drone.io/intro/gitea/single-machine/", + "dockerCompose": { + "version": "2", + "services": { + "$$cap_appname-agent": { + "image": "drone/agent:$$cap_drone_version", + "notExposeAsWebApp": "true", + "restart": "always", + "environment": { + "DRONE_SERVER": "srv-captain--$$cap_appname-server:9000", + "DRONE_SECRET": "$$cap_drone_secret" + } + }, + "$$cap_appname-server": { + "depends_on": [ + "$$cap_appname-agent" + ], + "image": "drone/drone:$$cap_drone_version", + "containerHttpPort": "80", + "volumes": [ + "/var/run/docker.sock:/var/run/docker.sock", + "$$cap_appname-server:/data" + + ], + "restart": "always", + "environment": { + "DRONE_GITEA_SERVER": "$$cap_drone_gitea_server", + "DRONE_GIT_ALWAYS_AUTH": "$$cap_drone_gitea_always_auth", + "DRONE_RUNNER_CAPACITY": "$$cap_drone_runner_capacity", + "DRONE_SERVER_PROTO": "$$cap_drone_server_proto", + "DRONE_SERVER_HOST": "$$cap_drone_server_host", + "DRONE_TLS_AUTOCERT": "$$cap_drone_tls_autocert", + "DRONE_SECRET": "$$cap_drone_secret" + } + } + } + }, + "instructions": { + "start": "Drone is a self-service Continuous Delivery platform for busy development teams. It can be used with different GIT servers like gogs, gitea as well as services like gitlab and github. This installer is gitea focused and requires a running gitea instances (which you can install via one-click-apps in caprover).\n\n Enter your Drone for Gitea configuration parameters and click on next. The process will take about a minute to finish.", + "end": "Drone is deployed and available as $$cap_appname-server.\n\n IMPORTANT: It will take up to 2 minutes for Drone for Gitea to be ready. Before that, you might see 502 error page.\n" + }, + "variables": [ + { + "id": "$$cap_drone_version", + "label": "drone Version", + "defaultValue": "1.0.0-rc.6", + "description": "Checkout their docker page for the valid tags https://hub.docker.com/r/drone/drone/tags", + "validRegex": "" + }, + { + "id": "$$cap_drone_gitea_server", + "label": "DRONE_GITEA_SERVER", + "defaultValue": "https://your.server", + "description": "A string containing your Gitea server address.", + "validRegex": "" + }, + { + "id": "$$cap_drone_gitea_always_auth", + "label": "DRONE_GIT_ALWAYS_AUTH", + "defaultValue": "false", + "description": "Boolean value configures Drone to authenticate when cloning public repositories. This is only required when your source code management system (e.g. GitHub Enterprise) has private mode enabled.", + "validRegex": "" + }, + { + "id": "$$cap_drone_runner_capacity", + "label": "DRONE_RUNNER_CAPACITY", + "defaultValue": "2", + "description": "An integer defining the maximum number of pipelines the agent should execute concurrently. The default value is two pipelines.", + "validRegex": "/^[0-9]+$/" + }, + { + "id": "$$cap_drone_server_proto", + "label": "DRONE_SERVER_PROTO", + "defaultValue": "https", + "description": "A string containing your Drone server protocol scheme. This value should be set to http or https. This field defaults to https if you configure ssl or acme.", + "validRegex": "/^([Hh][Tt][Tt][Pp]|[Hh][Tt][Tt][Pp][Ss])$/" + }, + { + "id": "$$cap_drone_server_host", + "label": "DRONE_SERVER_HOST", + "defaultValue": "drone.yourhost.com", + "description": "A string containing your Drone server hostname or IP address.", + "validRegex": "" + }, + { + "id": "$$cap_drone_tls_autocert", + "label": "DRONE_TLS_AUTOCERT", + "defaultValue": "false", + "description": "An boolean indicating debug level logs should be use for automatic SSL certification generation and configuration. The default value is false..", + "validRegex": "/^([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])$/" + }, + { + "id": "$$cap_drone_secret", + "label": "secret for linking drone and agent", + "description": "some random secret here (min 10 characters)", + "defaultValue": "", + "validRegex": "/.{10,}/" + } + ] +}