Skip to content

Commit

Permalink
Cleanups + prefer .yaml (woodpecker-ci#3069)
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
  • Loading branch information
2 people authored and fernandrone committed Feb 1, 2024
1 parent ec425e2 commit 16a0b8e
Show file tree
Hide file tree
Showing 117 changed files with 667 additions and 855 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ tasks:
go run go.woodpecker-ci.org/woodpecker/v2/cmd/agent
- name: Gitea
command: |
export DOCKER_COMPOSE_CMD="docker-compose -f docker-compose.gitpod.yml -p woodpecker"
export DOCKER_COMPOSE_CMD="docker-compose -f docker-compose.gitpod.yaml -p woodpecker"
export GITEA_CLI_CMD="$DOCKER_COMPOSE_CMD exec -u git gitea gitea"
$DOCKER_COMPOSE_CMD up -d
until curl --output /dev/null --silent --head --fail http://localhost:3000; do printf '.'; sleep 1; done
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ repos:
hooks:
- id: yamllint
args: [--strict, -c=.yamllint.yaml]
- repo: local
hooks:
- id: yaml-file-extension
name: Check if YAML files has *.yaml extension.
entry: YAML filenames must have .yaml extension.
language: fail
files: .yml$
exclude: '^.gitpod.yml$'

ci:
autofix_commit_msg: |
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .woodpecker/docs.yml → .woodpecker/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ variables:
- &alpine_image 'docker.io/alpine:3.19'
- path: &when_path
- 'docs/**'
- '.woodpecker/docs.yml'
- '.woodpecker/docs.yaml'
# since we generate docs for cli tool we have to watch this too
- 'cli/**'
- 'cmd/cli/**'
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .woodpecker/test.yml → .woodpecker/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ variables:
- &golang_image 'docker.io/golang:1.21.5'
- &when
- path: &when_path # related config files
- '.woodpecker/test.yml'
- '.woodpecker/test.yaml'
- '.golangci.yaml'
# go source code
- '**/*.go'
Expand Down
2 changes: 1 addition & 1 deletion .woodpecker/web.yml → .woodpecker/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ variables:
- &when
path:
# related config files
- '.woodpecker/web.yml'
- '.woodpecker/web.yaml'
# web source code
- 'web/**'
# api source code
Expand Down
5 changes: 0 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,3 @@ As of semver guidelines, breaking changes will be released as a major version. W
breaking changes to not release many majors each containing just a few breaking changes.
Prior to the release of a major version, a release candidate (RC) will be published to allow easy testing,
the actual release will be about a week later.

## Development

[pre-commit](https://pre-commit.com/) is used in this repository.
To apply it during local development, take a look at [`pre-commit`s documentation](https://pre-commit.com/#usage)
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,16 @@ bundle-prepare: ## Prepare the bundles
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.6.0

bundle-agent: bundle-prepare ## Create bundles for agent
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/nfpm-agent.yml --target ./dist --packager deb
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/nfpm-agent.yml --target ./dist --packager rpm
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/agent.yaml --target ./dist --packager deb
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/agent.yaml --target ./dist --packager rpm

bundle-server: bundle-prepare ## Create bundles for server
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/nfpm-server.yml --target ./dist --packager deb
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/nfpm-server.yml --target ./dist --packager rpm
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/server.yaml --target ./dist --packager deb
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/server.yaml --target ./dist --packager rpm

bundle-cli: bundle-prepare ## Create bundles for cli
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/nfpm-cli.yml --target ./dist --packager deb
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/nfpm-cli.yml --target ./dist --packager rpm
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/cli.yaml --target ./dist --packager deb
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/cli.yaml --target ./dist --packager rpm

.PHONY: bundle
bundle: bundle-agent bundle-server bundle-cli ## Create all bundles
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Security

We take security seriously.
If you discover a security issue, please bring it to their attention right away!
If you discover a security issue, please bring it to our attention right away!

## Reporting a Vulnerability

Expand Down
File renamed without changes.
File renamed without changes.
26 changes: 13 additions & 13 deletions docs/docs/10-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ If you are already using containers in your daily workflow, you'll for sure love

![woodpecker](woodpecker.png)

## .woodpecker.yml
## `.woodpecker.yaml`

- Place your pipeline in a file named `.woodpecker.yml` in your repository
- Place your pipeline in a file named `.woodpecker.yaml` in your repository
- Pipeline steps can be named as you like
- Run any command in the commands section

```yaml title=".woodpecker.yml"
```yaml title=".woodpecker.yaml"
steps:
build:
image: debian
Expand All @@ -31,20 +31,20 @@ steps:
- List the commands that should be executed in the container
```diff
steps:
build:
- image: debian
+ image: mycompany/image-with-awscli
commands:
- aws help
steps:
build:
- image: debian
+ image: mycompany/image-with-awscli
commands:
- aws help
```
### File changes are incremental
- Woodpecker clones the source code in the beginning
- File changes are persisted throughout individual steps as the same volume is being mounted in all steps
```yaml title=".woodpecker.yml"
```yaml title=".woodpecker.yaml"
steps:
build:
image: debian
Expand Down Expand Up @@ -73,15 +73,15 @@ ENTRYPOINT ["/usr/local/deploy"]
kubectl apply -f $PLUGIN_TEMPLATE
```

```yaml title=".woodpecker.yml"
```yaml title=".woodpecker.yaml"
steps:
deploy-to-k8s:
image: laszlocloud/my-k8s-plugin
settings:
template: config/k8s/service.yml
template: config/k8s/service.yaml
```
See [plugin docs](./20-usage/51-plugins/10-plugins.md).
See [plugin docs](./20-usage/51-plugins/10-overview.md).
## Continue reading
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/20-usage/10-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This is because webhooks are signed using a per-repository secret key which is n

## Configuration

To configure your pipeline you must create a `.woodpecker.yml` file in the root of your repository. The `.woodpecker.yml` file is used to define your pipeline steps.
To configure your pipeline you must create a `.woodpecker.yaml` file in the root of your repository. The `.woodpecker.yaml` file is used to define your pipeline steps.

:::note
We support most of YAML 1.2, but preserve some behavior from 1.1 for backward compatibility.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/20-usage/15-terminiology/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Sometimes there are multiple terms that can be used to describe something. This
[Pipeline]: ../20-workflow-syntax.md
[Workflow]: ../25-workflows.md
[Forge]: ../../30-administration/11-forges/10-overview.md
[Plugin]: ../51-plugins/10-plugins.md
[Plugin]: ../51-plugins/10-overview.md
[Workspace]: ../20-workflow-syntax.md#workspace
[Matrix]: ../30-matrix-workflows.md
[Docker]: ../../30-administration/22-backends/10-docker.md
Expand Down
Loading

0 comments on commit 16a0b8e

Please sign in to comment.