Skip to content

Commit

Permalink
Make exec run be detected as WoodpeckerCI (woodpecker-ci#1218)
Browse files Browse the repository at this point in the history
and exclude docs/docs/40-cli.md from git as it will be generated by CI
  • Loading branch information
6543 authored Sep 27, 2022
1 parent 7838f84 commit a39e8a0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 887 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ docs/venv
# helm charts
.cr-index/
.cr-release-packages/

### Generated by CI ###
docs/docs/40-cli.md
9 changes: 7 additions & 2 deletions .woodpecker/docs.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
variables:
- &golang_image 'golang:1.18'
- &node_image 'node:16-alpine'
- &when_path
- "docs/**"
- ".woodpecker/docs.yml"
# since we genereate docs for cli tool we have to watch this too
- "cli/**"
- "cmd/cli/**"

pipeline:
build-cli:
image: golang:1.18
image: *golang_image
commands:
- make docs
when:
path: *when_path

build:
image: *node_image
Expand All @@ -17,7 +23,6 @@ pipeline:
- yarn install --frozen-lockfile
- yarn build
when:
event: [push, pull_request]
path: *when_path

securitycheck:
Expand Down
4 changes: 2 additions & 2 deletions cli/exec/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ var flags = []cli.Flag{
&cli.StringFlag{
EnvVars: []string{"CI_SYSTEM_NAME"},
Name: "system-name",
Value: "pipec",
Value: "woodpecker",
},
&cli.StringFlag{
EnvVars: []string{"CI_SYSTEM_LINK"},
Name: "system-link",
Value: "https://github.com/cncd/pipec",
Value: "https://github.com/woodpecker-ci/woodpecker",
},
&cli.StringFlag{
EnvVars: []string{"CI_REPO_NAME"},
Expand Down
Loading

0 comments on commit a39e8a0

Please sign in to comment.