mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 08:56:29 +00:00
generating documentation
This commit is contained in:
parent
7190facb41
commit
a4eee9e510
18 changed files with 43 additions and 169 deletions
|
@ -151,7 +151,7 @@ func toPage(site *Site, el *goquery.Selection) (*Page, error) {
|
||||||
// follow the link to see if this is a page
|
// follow the link to see if this is a page
|
||||||
// that should be added to our documentation.
|
// that should be added to our documentation.
|
||||||
href, ok := el.Attr("href")
|
href, ok := el.Attr("href")
|
||||||
if !ok {
|
if !ok || href == "#" {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
{
|
|
||||||
"number": 1,
|
|
||||||
"status": "success",
|
|
||||||
"started_at": 5788800,
|
|
||||||
"finished_at": 5789500,
|
|
||||||
|
|
||||||
"head_commit": {
|
|
||||||
"sha": "d101ef3ed6e973b039c3fd5ccdec378b0fa8684c",
|
|
||||||
"ref": "refs\/heads\/master",
|
|
||||||
"branch": "master",
|
|
||||||
"message": "updated the README.md file",
|
|
||||||
"timestamp": "",
|
|
||||||
"remote": "https:\/\/github.com\/drone\/drone.git",
|
|
||||||
"author": {
|
|
||||||
"login": "bradrydzewski",
|
|
||||||
"email": "brad.rydzewski@gmail.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"jobs": [
|
|
||||||
{
|
|
||||||
"number": 1,
|
|
||||||
"status": "success",
|
|
||||||
"started_at": 5788800,
|
|
||||||
"finished_at": 5789500,
|
|
||||||
"exit_code": 0,
|
|
||||||
"environment": { "GO_VERSION": "1.4" }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"number": 2,
|
|
||||||
"status": "success",
|
|
||||||
"started_at": 5788800,
|
|
||||||
"finished_at": 5789500,
|
|
||||||
"exit_code": 0,
|
|
||||||
"environment": { "GO_VERSION": "1.5" }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"number": 1,
|
|
||||||
"status": "success",
|
|
||||||
"started_at": 5788800,
|
|
||||||
"finished_at": 5789500,
|
|
||||||
"head_commit": {
|
|
||||||
"sha": "d101ef3ed6e973b039c3fd5ccdec378b0fa8684c",
|
|
||||||
"ref": "refs\/heads\/master",
|
|
||||||
"branch": "master",
|
|
||||||
"message": "updated the README.md file",
|
|
||||||
"timestamp": "",
|
|
||||||
"remote": "https:\/\/github.com\/drone\/drone.git",
|
|
||||||
"author": {
|
|
||||||
"login": "bradrydzewski",
|
|
||||||
"email": "brad.rydzewski@gmail.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
]
|
|
|
@ -1,9 +0,0 @@
|
||||||
<Projects>
|
|
||||||
<Project
|
|
||||||
name="foo/bar"
|
|
||||||
activity="Sleeping"
|
|
||||||
lastBuildStatus="Success"
|
|
||||||
lastBuildLabel="8e88d525"
|
|
||||||
lastBuildTime="2015-06-24T14:27:49-04:00"
|
|
||||||
webUrl="http://localhost:8080/foo/bar" />
|
|
||||||
</Projects>
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"number": 1,
|
|
||||||
"status": "success",
|
|
||||||
"started_at": 5788800,
|
|
||||||
"finished_at": 5789500,
|
|
||||||
"exit_code": 0,
|
|
||||||
"environment": { "GO_VERSION": "1.4" }
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
{
|
|
||||||
"owner":"drone",
|
|
||||||
"name":"drone-test-go",
|
|
||||||
"full_name":"drone/drone-test-go",
|
|
||||||
"self_url":"http://localhost:8080/drone/drone-test-go",
|
|
||||||
"link_url":"https://github.com/drone/drone-test-go",
|
|
||||||
"clone_url":"https://github.com/drone/drone-test-go.git",
|
|
||||||
"default_branch":"master",
|
|
||||||
"private":true,
|
|
||||||
"trusted":false,
|
|
||||||
"timeout":60,
|
|
||||||
"hooks":{
|
|
||||||
"pull_request":true,
|
|
||||||
"push":true,
|
|
||||||
"tags":false
|
|
||||||
},
|
|
||||||
"keypair":{
|
|
||||||
"public": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDwXK..."
|
|
||||||
},
|
|
||||||
"permissions":{
|
|
||||||
"pull":true,
|
|
||||||
"push":true,
|
|
||||||
"admin":true
|
|
||||||
},
|
|
||||||
"params": {
|
|
||||||
"HEROKU_KEY": "f0e4c2f76c58916ec258f24"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"owner":"drone",
|
|
||||||
"name":"drone-test-go",
|
|
||||||
"full_name":"drone/drone-test-go",
|
|
||||||
"self_url":"http://localhost:8080/drone/drone-test-go",
|
|
||||||
"link_url":"https://github.com/drone/drone-test-go",
|
|
||||||
"clone_url":"https://github.com/drone/drone-test-go.git",
|
|
||||||
"default_branch":"master",
|
|
||||||
"private":true,
|
|
||||||
"trusted":false,
|
|
||||||
"timeout":60,
|
|
||||||
"hooks":{
|
|
||||||
"pull_request":true,
|
|
||||||
"push":true,
|
|
||||||
"tags":false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"label":"brads_token",
|
|
||||||
"issued_at":1435289846,
|
|
||||||
"hash":"yUQJHM4YfNZcCLlikAshgjM6hCMlFXmHuABAECGsMQ"
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"label":"brads_token",
|
|
||||||
"issued_at":1435289846
|
|
||||||
}
|
|
||||||
]
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Octocat",
|
|
||||||
"email": "octocat@github.com",
|
|
||||||
"avatar": "https://www.gravatar.com/avatar/7194e8d48fa1d2b689f99443b767316c",
|
|
||||||
"admin": false,
|
|
||||||
"active": true
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"name": "Octocat",
|
|
||||||
"email": "octocat@github.com",
|
|
||||||
"avatar": "https://www.gravatar.com/avatar/7194e8d48fa1d2b689f99443b767316c",
|
|
||||||
"admin": false,
|
|
||||||
"active": true
|
|
||||||
}
|
|
||||||
]
|
|
|
@ -1,13 +1,13 @@
|
||||||
* [Install](#)
|
* Install
|
||||||
* [Ubuntu](ubuntu.md)
|
* [Ubuntu](ubuntu.md)
|
||||||
* [Docker](install.md)
|
* [Docker](install.md)
|
||||||
* [Setup](#)
|
* Setup
|
||||||
* [Server](server.md)
|
* [Server](server.md)
|
||||||
* [Docker](docker.md)
|
* [Docker](docker.md)
|
||||||
* [GitHub](github.md)
|
* [GitHub](github.md)
|
||||||
* [GitLab](gitlab.md)
|
* [GitLab](gitlab.md)
|
||||||
* [Bitbucket](bitbucket.md)
|
* [Bitbucket](bitbucket.md)
|
||||||
* [Database](#)
|
* Database
|
||||||
* [SQLite](sqlite.md)
|
* [SQLite](sqlite.md)
|
||||||
* [MySQL](mysql.md)
|
* [MySQL](mysql.md)
|
||||||
* [Postgres](postgres.md)
|
* [Postgres](postgres.md)
|
||||||
|
|
|
@ -410,6 +410,9 @@ func (e *engine) runJobNotify(r *Task, client dockerclient.Client) error {
|
||||||
|
|
||||||
log.Infof("preparing container %s", name)
|
log.Infof("preparing container %s", name)
|
||||||
info, err := docker.Run(client, conf, name)
|
info, err := docker.Run(client, conf, name)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Error starting notification container %s. %s", name, err)
|
||||||
|
}
|
||||||
|
|
||||||
// for debugging purposes we print a failed notification executions
|
// for debugging purposes we print a failed notification executions
|
||||||
// output to the logs. Otherwise we have no way to troubleshoot failed
|
// output to the logs. Otherwise we have no way to troubleshoot failed
|
||||||
|
|
|
@ -8,7 +8,9 @@ import (
|
||||||
|
|
||||||
//go:generate go run ../contrib/generate-js.go -dir scripts/ -o scripts_gen/drone.min.js
|
//go:generate go run ../contrib/generate-js.go -dir scripts/ -o scripts_gen/drone.min.js
|
||||||
//go:generate go run ../contrib/generate-api-docs.go -input ../docs/swagger.yml -template ../template/amber/swagger.amber -output docs_gen/api/index.html
|
//go:generate go run ../contrib/generate-api-docs.go -input ../docs/swagger.yml -template ../template/amber/swagger.amber -output docs_gen/api/index.html
|
||||||
//go:generate go run ../contrib/generate-docs.go -input ../docs/build/README.md -template ../template/amber/docs.amber -output docs_gen/build/
|
//go:generate go run ../contrib/generate-docs.go -input ../docs/build/README.md -name Builds -template ../template/amber/docs.amber -output docs_gen/build/
|
||||||
|
//go:generate go run ../contrib/generate-docs.go -input ../docs/plugin/README.md -name Plugins -template ../template/amber/docs.amber -output docs_gen/plugin/
|
||||||
|
//go:generate go run ../contrib/generate-docs.go -input ../docs/setup/README.md -name Install -template ../template/amber/docs.amber -output docs_gen/setup/
|
||||||
|
|
||||||
//go:generate sassc --style compact styles/style.sass styles_gen/style.css
|
//go:generate sassc --style compact styles/style.sass styles_gen/style.css
|
||||||
//go:generate go-bindata-assetfs -ignore "\\.go" -pkg static -o static_gen.go ./...
|
//go:generate go-bindata-assetfs -ignore "\\.go" -pkg static -o static_gen.go ./...
|
||||||
|
|
|
@ -237,14 +237,21 @@
|
||||||
padding:0px;
|
padding:0px;
|
||||||
margin:0px;
|
margin:0px;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
a
|
li
|
||||||
|
position:relative;
|
||||||
|
color: rgba(0,0,0,0.5);
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 13px;
|
||||||
|
li a
|
||||||
color:rgba(43, 48, 59, 0.8);
|
color:rgba(43, 48, 59, 0.8);
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
display: block;
|
display: block;
|
||||||
li
|
font-size: 16px;
|
||||||
position:relative;
|
text-transform: none;
|
||||||
li.active a
|
li.active a
|
||||||
color:#2b303b;
|
color:#2b303b;
|
||||||
|
font-size: 16px;
|
||||||
|
text-transform: none;
|
||||||
li.active:before
|
li.active:before
|
||||||
content: "";
|
content: "";
|
||||||
border-left: 4px solid #2b303b;
|
border-left: 4px solid #2b303b;
|
||||||
|
@ -252,6 +259,9 @@
|
||||||
top: 0px;
|
top: 0px;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
left: -20px;
|
left: -20px;
|
||||||
|
ul
|
||||||
|
margin-bottom: 25px;
|
||||||
|
margin-top: 5px;
|
||||||
.content-main
|
.content-main
|
||||||
max-width: 900px;
|
max-width: 900px;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
|
|
|
@ -381,14 +381,16 @@ body.login div.alert { position: fixed; top: 0px; left: 0px; right: 0px; line-he
|
||||||
|
|
||||||
.docs-usage .row .content-nav ul { padding: 0px; margin: 0px; list-style-type: none; }
|
.docs-usage .row .content-nav ul { padding: 0px; margin: 0px; list-style-type: none; }
|
||||||
|
|
||||||
.docs-usage .row .content-nav ul a { color: rgba(43, 48, 59, 0.8); line-height: 30px; display: block; }
|
.docs-usage .row .content-nav ul li { position: relative; color: rgba(0, 0, 0, 0.5); text-transform: uppercase; font-size: 13px; }
|
||||||
|
|
||||||
.docs-usage .row .content-nav ul li { position: relative; }
|
.docs-usage .row .content-nav ul li a { color: rgba(43, 48, 59, 0.8); line-height: 30px; display: block; font-size: 16px; text-transform: none; }
|
||||||
|
|
||||||
.docs-usage .row .content-nav ul li.active a { color: #2b303b; }
|
.docs-usage .row .content-nav ul li.active a { color: #2b303b; font-size: 16px; text-transform: none; }
|
||||||
|
|
||||||
.docs-usage .row .content-nav ul li.active:before { content: ""; border-left: 4px solid #2b303b; position: absolute; top: 0px; bottom: 0px; left: -20px; }
|
.docs-usage .row .content-nav ul li.active:before { content: ""; border-left: 4px solid #2b303b; position: absolute; top: 0px; bottom: 0px; left: -20px; }
|
||||||
|
|
||||||
|
.docs-usage .row .content-nav ul ul { margin-bottom: 25px; margin-top: 5px; }
|
||||||
|
|
||||||
.docs-usage .row .content-main { max-width: 900px; margin: 0px auto; margin-bottom: 40px; font-size: 14px; }
|
.docs-usage .row .content-main { max-width: 900px; margin: 0px auto; margin-bottom: 40px; font-size: 14px; }
|
||||||
|
|
||||||
.docs-usage .row .content-main p { line-height: 20px; margin: 20px 0px; }
|
.docs-usage .row .content-main p { line-height: 20px; margin: 20px 0px; }
|
||||||
|
|
|
@ -8,13 +8,19 @@ block header
|
||||||
li Documentation
|
li Documentation
|
||||||
ul.nav.nav-tabs
|
ul.nav.nav-tabs
|
||||||
li.nav-item
|
li.nav-item
|
||||||
a.nav-link[href="#"] Install
|
a[class="nav-link"][href="../setup/ubuntu.html"]
|
||||||
|
.active ? Site.Name == "Install"
|
||||||
|
| Install
|
||||||
li.nav-item
|
li.nav-item
|
||||||
a.nav-link[href="#"] Builds
|
a[class="nav-link"][href="../build/overview.html"]
|
||||||
|
.active ? Site.Name == "Builds"
|
||||||
|
| Builds
|
||||||
li.nav-item
|
li.nav-item
|
||||||
a.nav-link[href="#"] Plugins
|
a[class="nav-link"][href="../plugin/overview.html"]
|
||||||
|
.active ? Site.Name == "Plugins"
|
||||||
|
| Plugins
|
||||||
li.nav-item
|
li.nav-item
|
||||||
a.nav-link[href="#"] API Reference
|
a.nav-link[href="../api/index.html"] API Reference
|
||||||
|
|
||||||
block content
|
block content
|
||||||
div.container-fluid.docs.docs-usage
|
div.container-fluid.docs.docs-usage
|
||||||
|
|
|
@ -8,11 +8,11 @@ block header
|
||||||
li Documentation
|
li Documentation
|
||||||
ul.nav.nav-tabs
|
ul.nav.nav-tabs
|
||||||
li.nav-item
|
li.nav-item
|
||||||
a.nav-link[href="#"] Install
|
a.nav-link[href="../setup/ubuntu.html"] Install
|
||||||
li.nav-item
|
li.nav-item
|
||||||
a.nav-link[href="#"] Builds
|
a.nav-link[href="../build/overview.html"] Builds
|
||||||
li.nav-item
|
li.nav-item
|
||||||
a.nav-link[href="#"] Plugins
|
a.nav-link[href="../plugin/overview.html"] Plugins
|
||||||
li.nav-item
|
li.nav-item
|
||||||
a.nav-link.active[href="#"] API Reference
|
a.nav-link.active[href="#"] API Reference
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ block content
|
||||||
ul
|
ul
|
||||||
each $op in $tag.Ops
|
each $op in $tag.Ops
|
||||||
li
|
li
|
||||||
a[href="#"+$op.ID][data-method=$op.Method] #{$op.Path}
|
a[href="#"+$op.ID][data-method=$op.Method] #{$op.Summary}
|
||||||
div.row
|
div.row
|
||||||
each $tag in Swagger.Tags
|
each $tag in Swagger.Tags
|
||||||
each $op in $tag.Ops
|
each $op in $tag.Ops
|
||||||
|
|
Loading…
Reference in a new issue