-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from promhippie/docs-improvement
Improvements for automated documentation
- Loading branch information
Showing
16 changed files
with
422 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ def testing(ctx): | |
'steps': [ | ||
{ | ||
'name': 'generate', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make generate', | ||
|
@@ -47,7 +47,7 @@ def testing(ctx): | |
}, | ||
{ | ||
'name': 'vet', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make vet', | ||
|
@@ -61,7 +61,7 @@ def testing(ctx): | |
}, | ||
{ | ||
'name': 'staticcheck', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make staticcheck', | ||
|
@@ -75,7 +75,7 @@ def testing(ctx): | |
}, | ||
{ | ||
'name': 'lint', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make lint', | ||
|
@@ -89,7 +89,7 @@ def testing(ctx): | |
}, | ||
{ | ||
'name': 'build', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make build', | ||
|
@@ -103,7 +103,7 @@ def testing(ctx): | |
}, | ||
{ | ||
'name': 'test', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make test', | ||
|
@@ -179,7 +179,7 @@ def docker(ctx, arch): | |
'dry_run': True, | ||
'tags': 'linux-%s' % (arch), | ||
'dockerfile': 'docker/Dockerfile.linux.%s' % (arch), | ||
'repo': ctx.repo.slug, | ||
'repo': ctx.repo.slug.replace('_', '-'), | ||
} | ||
else: | ||
docker = { | ||
|
@@ -192,7 +192,7 @@ def docker(ctx, arch): | |
'auto_tag': True, | ||
'auto_tag_suffix': 'linux-%s' % (arch), | ||
'dockerfile': 'docker/Dockerfile.linux.%s' % (arch), | ||
'repo': ctx.repo.slug, | ||
'repo': ctx.repo.slug.replace('_', '-'), | ||
} | ||
|
||
return { | ||
|
@@ -204,24 +204,9 @@ def docker(ctx, arch): | |
'arch': agent, | ||
}, | ||
'steps': [ | ||
{ | ||
'name': 'version', | ||
'image': 'webhippie/golang:1.15', | ||
'pull': 'always', | ||
'environment': environment, | ||
'commands': [ | ||
'go env', | ||
], | ||
'volumes': [ | ||
{ | ||
'name': 'gopath', | ||
'path': '/srv/app', | ||
}, | ||
], | ||
}, | ||
{ | ||
'name': 'generate', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'environment': environment, | ||
'commands': [ | ||
|
@@ -236,7 +221,7 @@ def docker(ctx, arch): | |
}, | ||
{ | ||
'name': 'build', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'environment': environment, | ||
'commands': [ | ||
|
@@ -286,7 +271,7 @@ def binary(ctx, name): | |
'steps': [ | ||
{ | ||
'name': 'generate', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make generate', | ||
|
@@ -300,7 +285,7 @@ def binary(ctx, name): | |
}, | ||
{ | ||
'name': 'build', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make release-%s' % (name), | ||
|
@@ -314,7 +299,7 @@ def binary(ctx, name): | |
}, | ||
{ | ||
'name': 'finish', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make release-finish', | ||
|
@@ -459,6 +444,22 @@ def docs(ctx): | |
'arch': 'amd64', | ||
}, | ||
'steps': [ | ||
{ | ||
'name': 'envvars', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make envvars', | ||
], | ||
}, | ||
{ | ||
'name': 'labels', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make labels', | ||
], | ||
}, | ||
{ | ||
'name': 'generate', | ||
'image': 'webhippie/hugo:latest', | ||
|
@@ -534,17 +535,33 @@ def changelog(ctx): | |
}, | ||
}, | ||
}, | ||
{ | ||
'name': 'envvars', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make envvars', | ||
], | ||
}, | ||
{ | ||
'name': 'labels', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make labels', | ||
], | ||
}, | ||
{ | ||
'name': 'generate', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'make changelog', | ||
], | ||
}, | ||
{ | ||
'name': 'changes', | ||
'image': 'webhippie/golang:1.15', | ||
'image': 'webhippie/golang:1.16', | ||
'pull': 'always', | ||
'commands': [ | ||
'git diff CHANGELOG.md', | ||
|
@@ -559,7 +576,7 @@ def changelog(ctx): | |
'commit', | ||
'push', | ||
], | ||
'message': 'Automated changelog update [skip ci]', | ||
'message': 'Automated changelog and docs update [skip ci]', | ||
'branch': 'master', | ||
'author_email': '[email protected]', | ||
'author_name': 'Drone', | ||
|
@@ -612,7 +629,7 @@ def readme(ctx): | |
'from_secret': 'docker_password', | ||
}, | ||
'DOCKERHUB_REPO_PREFIX': ctx.repo.namespace, | ||
'DOCKERHUB_REPO_NAME': ctx.repo.name, | ||
'DOCKERHUB_REPO_NAME': ctx.repo.name.replace('_', '-'), | ||
'SHORT_DESCRIPTION': description, | ||
'README_PATH': 'README.md', | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Change: Improvements for automated documentation | ||
|
||
We have added some simple scripts that gets executed by Drone to keep moving | ||
documentation parts like the available labels or the available environment | ||
variables always up to date. No need to update the docs related to that manually | ||
anymore. | ||
|
||
https://github.com/promhippie/prometheus-hcloud-sd/pull/44 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
public/ | ||
resources/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{- $file := printf "/partials/%s" (.Get 0) -}}{{- $file | readFile | markdownify -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
PROMETHEUS_HCLOUD_LOG_LEVEL | ||
: Only log messages with given severity, defaults to `info` | ||
|
||
PROMETHEUS_HCLOUD_LOG_PRETTY | ||
: Enable pretty messages for logging, defaults to `false` | ||
|
||
PROMETHEUS_HCLOUD_WEB_ADDRESS | ||
: Address to bind the metrics server, defaults to `0.0.0.0:9000` | ||
|
||
PROMETHEUS_HCLOUD_WEB_PATH | ||
: Path to bind the metrics server, defaults to `/metrics` | ||
|
||
PROMETHEUS_HCLOUD_OUTPUT_FILE | ||
: Path to write the file_sd config, defaults to `/etc/prometheus/hcloud.json` | ||
|
||
PROMETHEUS_HCLOUD_OUTPUT_REFRESH | ||
: Discovery refresh interval in seconds, defaults to `30` | ||
|
||
PROMETHEUS_HCLOUD_TOKEN | ||
: Access token for the HetznerCloud API | ||
|
||
PROMETHEUS_HCLOUD_CONFIG | ||
: Path to HetznerCloud configuration file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
* `__address__` | ||
* `__meta_hcloud_city` | ||
* `__meta_hcloud_cores` | ||
* `__meta_hcloud_country` | ||
* `__meta_hcloud_cpu` | ||
* `__meta_hcloud_datacenter` | ||
* `__meta_hcloud_disk` | ||
* `__meta_hcloud_image_name` | ||
* `__meta_hcloud_image_type` | ||
* `__meta_hcloud_label_<name>` | ||
* `__meta_hcloud_location` | ||
* `__meta_hcloud_memory` | ||
* `__meta_hcloud_name` | ||
* `__meta_hcloud_os_flavor` | ||
* `__meta_hcloud_os_version` | ||
* `__meta_hcloud_project` | ||
* `__meta_hcloud_public_ipv4` | ||
* `__meta_hcloud_public_ipv6` | ||
* `__meta_hcloud_status` | ||
* `__meta_hcloud_storage` | ||
* `__meta_hcloud_type` |
Oops, something went wrong.