Skip to content

Commit

Permalink
ci: add docs/cli job and validate docs formatting (#746)
Browse files Browse the repository at this point in the history
Co-authored-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
  • Loading branch information
zepatrik and aeneasr committed Oct 9, 2020
1 parent dfa2ec5 commit f1dadc7
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 26 deletions.
37 changes: 28 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ orbs:
slack: circleci/slack@3.4.2
sdk: ory/sdk@0.1.37
nancy: ory/nancy@0.0.12
docs: ory/docs@0.0.4
golangci: ory/golangci@0.0.4
docs: ory/docs@0.0.8
golangci: ory/golangci@0.0.8

jobs:
test:
Expand Down Expand Up @@ -119,12 +119,23 @@ jobs:
- "/go/pkg/mod"
- run: ./test/e2e/run.sh << parameters.flavor >>

validate:
docker:
- image: circleci/golang:1.15-node
environment:
GO111MODULE: 'on'
working_directory: /go/src/github.com/ory/hydra
steps:
- checkout
- golangci/lint
- docs/check-format

workflows:
tbr:
jobs:
- nancy/test
-
golangci/lint:
validate:
filters:
tags:
only: /.*/
Expand All @@ -134,7 +145,7 @@ workflows:
requires:
- test
- nancy/test
- golangci/lint
- validate
filters:
tags:
only: /.*/
Expand Down Expand Up @@ -175,20 +186,28 @@ workflows:
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- golangci/lint
- validate
filters:
tags:
only: /.*/
branches:
ignore: /master/
- docs/cli:
requires:
- test
- test-e2e-sqlite
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- validate
- docs/build:
requires:
- test
- test-e2e-sqlite
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- golangci/lint
- validate
filters:
tags:
only: /.*/
Expand All @@ -201,7 +220,7 @@ workflows:
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- golangci/lint
- validate
- sdk/generate
- goreleaser/release
filters:
Expand All @@ -216,7 +235,7 @@ workflows:
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- golangci/lint
- validate
filters:
tags:
only: /.*/
Expand All @@ -236,7 +255,7 @@ workflows:
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- golangci/lint
- validate
filters:
branches:
ignore: /.*/
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ endef
$(foreach dep, $(GO_DEPENDENCIES), $(eval $(call make-go-dependency, $(dep))))
$(call make-lint-dependency)

.bin/clidoc:
go build -o .bin/clidoc ./cmd/clidoc/.

docs/cli: .bin/clidoc
clidoc .

.bin/traefik:
https://github.com/containous/traefik/releases/download/v2.3.0-rc4/traefik_v2.3.0-rc4_linux_amd64.tar.gz \
tar -zxvf traefik_${traefik_version}_linux_${arch}.tar.gz
Expand Down
5 changes: 0 additions & 5 deletions docs/.prettierrc

This file was deleted.

3 changes: 1 addition & 2 deletions docs/docs/cli/kratos-identities-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ kratos identities list [<page> <per-page>] [flags]

### SEE ALSO

- [kratos identities](kratos-identities) - Tools to interact with remote
identities
- [kratos identities](kratos-identities) - Tools to interact with remote identities
6 changes: 2 additions & 4 deletions docs/docs/cli/kratos-identities-patch.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
id: kratos-identities-patch
title: kratos identities patch
description:
kratos identities patch Patch identities by ID (not yet implemented)
description: kratos identities patch Patch identities by ID (not yet implemented)
---

<!--
Expand Down Expand Up @@ -39,5 +38,4 @@ kratos identities patch <file.json [file-2.json [file-3.json] ...]> [flags]

### SEE ALSO

- [kratos identities](kratos-identities) - Tools to interact with remote
identities
- [kratos identities](kratos-identities) - Tools to interact with remote identities
3 changes: 1 addition & 2 deletions docs/docs/cli/kratos-jsonnet-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ kratos jsonnet format path/to/files/*.jsonnet [more/files.jsonnet, [supports/**/

### SEE ALSO

- [kratos jsonnet](kratos-jsonnet) - Helpers for linting and formatting JSONNet
code
- [kratos jsonnet](kratos-jsonnet) - Helpers for linting and formatting JSONNet code
6 changes: 2 additions & 4 deletions docs/docs/cli/kratos-jsonnet-lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ To improve this file please make your change against the appropriate "./cmd/*.go

### Synopsis

Lints JSONNet files using the official JSONNet linter and exits with a status
code of 1 when issues are detected.
Lints JSONNet files using the official JSONNet linter and exits with a status code of 1 when issues are detected.

Glob Syntax:

Expand Down Expand Up @@ -54,5 +53,4 @@ kratos jsonnet lint path/to/files/*.jsonnet [more/files.jsonnet, [supports/**/{f

### SEE ALSO

- [kratos jsonnet](kratos-jsonnet) - Helpers for linting and formatting JSONNet
code
- [kratos jsonnet](kratos-jsonnet) - Helpers for linting and formatting JSONNet code
36 changes: 36 additions & 0 deletions docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,42 @@
"cli/kratos-remote-version"
]
},
{
"items": [
"cli/kratos",
"cli/kratos-identities",
"cli/kratos-identities-delete",
"cli/kratos-identities-get",
"cli/kratos-identities-import",
"cli/kratos-identities-list",
"cli/kratos-identities-patch",
"cli/kratos-identities-validate",
"cli/kratos-jsonnet",
"cli/kratos-jsonnet-format",
"cli/kratos-jsonnet-lint",
"cli/kratos-remote",
"cli/kratos-remote-status",
"cli/kratos-remote-version"
]
},
{
"items": [
"cli/kratos",
"cli/kratos-identities",
"cli/kratos-identities-delete",
"cli/kratos-identities-get",
"cli/kratos-identities-import",
"cli/kratos-identities-list",
"cli/kratos-identities-patch",
"cli/kratos-identities-validate",
"cli/kratos-jsonnet",
"cli/kratos-jsonnet-format",
"cli/kratos-jsonnet-lint",
"cli/kratos-remote",
"cli/kratos-remote-status",
"cli/kratos-remote-version"
]
},
{
"items": [
"cli/kratos",
Expand Down

0 comments on commit f1dadc7

Please sign in to comment.