Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: buildkite-plugins/plugin-linter-buildkite-plugin
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.1.0
Choose a base ref
...
head repository: buildkite-plugins/plugin-linter-buildkite-plugin
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.2.0
Choose a head ref
  • 15 commits
  • 6 files changed
  • 3 contributors

Commits on Mar 30, 2023

  1. Copy the full SHA
    0c10be4 View commit details
  2. Copy the full SHA
    2e31615 View commit details
  3. Disable dependency dashboard

    toote committed Mar 30, 2023
    Copy the full SHA
    814911c View commit details
  4. Update testing instructions

    toote committed Mar 30, 2023
    Copy the full SHA
    2427329 View commit details

Commits on Apr 4, 2023

  1. Merge pull request #50 from buildkite-plugins/toote_plugin_tester

    Use Plugin Tester
    toote authored Apr 4, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    291905d View commit details

Commits on Apr 10, 2023

  1. Copy the full SHA
    5cd5755 View commit details
  2. Correct tests

    toote committed Apr 10, 2023
    Copy the full SHA
    623a671 View commit details
  3. Copy the full SHA
    f9da305 View commit details
  4. Correct shellcheck warning

    toote committed Apr 10, 2023
    Copy the full SHA
    0256f10 View commit details

Commits on Apr 21, 2023

  1. Update image version

    pzeballos authored Apr 21, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fb64de6 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1540462 View commit details
  3. update tests

    pzeballos authored Apr 21, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5b2956e View commit details

Commits on Apr 24, 2023

  1. Merge pull request #51 from buildkite-plugins/toote_pull_latest

    Pulling latest image
    toote authored Apr 24, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    520e29e View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1c1cbb3 View commit details
  3. Merge pull request #52 from buildkite-plugins/update-linter-version

    Update linter version
    toote authored Apr 24, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    969cfd4 View commit details
Showing with 34 additions and 32 deletions.
  1. +14 −8 .buildkite/pipeline.yml
  2. +9 −3 README.md
  3. +0 −6 docker-compose.yml
  4. +4 −4 hooks/command
  5. +3 −7 renovate.json
  6. +4 −4 tests/command.bats
22 changes: 14 additions & 8 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
steps:
- label: ":sparkles: Lint"
- label: ":bash: Shellcheck"
plugins:
$BUILDKITE_REPO#$BUILDKITE_COMMIT:
id: plugin-linter
- shellcheck#v1.3.0:
files: hooks/**

- label: ":bash: Shellcheck"
- label: ":sparkles: Stable linting"
plugins:
shellcheck#v1.3.0:
files: hooks/**
- plugin-linter#v3.1.0:
id: plugin-linter

- label: ":bash: Tests"
plugins:
docker-compose#v4.5.0:
run: tests
- plugin-tester#v1.0.0: ~

- wait

- label: ":sparkles: Self-test"
plugins:
- $BUILDKITE_REPO#$BUILDKITE_COMMIT:
id: plugin-linter
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -26,18 +26,24 @@ The id of the plugin (e.g. `my-org/my-plugin`)

### `image-version`

The docker tag of the `buildkite/plugin-linter` image to use. Default is `2.0.2`
The docker tag of the `buildkite/plugin-linter` image to use. Default is `2.0.3`

### `readme` (optional)

The filename of the plugin’s readme. Default is `README.md`

## Developing

To run the tests:
To run testing, shellchecks and plugin linting use use `bk run` with the [Buildkite CLI](https://github.com/buildkite/cli).

```bash
docker-compose run --rm tests
bk run
```

Or if you want to run just the tests, you can use the docker [Plugin Tester](https://github.com/buildkite-plugins/buildkite-plugin-tester):

```bash
docker run --rm -ti -v "${PWD}":/plugin buildkite/plugin-tester:latest
```

## License
6 changes: 0 additions & 6 deletions docker-compose.yml

This file was deleted.

8 changes: 4 additions & 4 deletions hooks/command
Original file line number Diff line number Diff line change
@@ -7,9 +7,11 @@ if [ -z "${BUILDKITE_PLUGIN_PLUGIN_LINTER_ID:-}" ]; then
exit 1
fi

echo "--- :docker: Fetching the latest buildkite/plugin-linter"
TAG=${BUILDKITE_PLUGIN_PLUGIN_LINTER_IMAGE_VERSION:-v2.0.3}

docker pull buildkite/plugin-linter
echo "--- :docker: Fetching buildkite/plugin-linter:${TAG}"

docker pull "buildkite/plugin-linter:${TAG}"

echo "+++ Linting"

@@ -20,8 +22,6 @@ args=(
"--env" "PLUGIN_ID=$BUILDKITE_PLUGIN_PLUGIN_LINTER_ID"
)

TAG=${BUILDKITE_PLUGIN_PLUGIN_LINTER_IMAGE_VERSION:-v2.0.2}

if [[ -n "${BUILDKITE_PLUGIN_PLUGIN_LINTER_README:-}" ]] ; then
args+=("--env" "PLUGIN_README=$BUILDKITE_PLUGIN_PLUGIN_LINTER_README")
fi
10 changes: 3 additions & 7 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": [
"config:base"
],
"docker-compose": {
"digest": {
"enabled": false
}
}
"config:base",
":disableDependencyDashboard"
]
}
8 changes: 4 additions & 4 deletions tests/command.bats
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ setup() {

@test "Runs the linter via Docker" {
stub docker \
"pull buildkite/plugin-linter : echo pulled image" \
"pull buildkite/plugin-linter:latest : echo pulled image" \
"run -it --rm --volume /plugin:/plugin:ro --env PLUGIN_ID=my-plugin buildkite/plugin-linter:latest : echo linted"

run "$PWD"/hooks/command
@@ -37,7 +37,7 @@ setup() {
export BUILDKITE_PLUGIN_PLUGIN_LINTER_README=some-readme.yml

stub docker \
"pull buildkite/plugin-linter : echo pulled image" \
"pull buildkite/plugin-linter:latest : echo pulled image" \
"run -it --rm --volume /plugin:/plugin:ro --env PLUGIN_ID=my-plugin --env PLUGIN_README=some-readme.yml buildkite/plugin-linter:latest : echo linted"

run "$PWD"/hooks/command
@@ -52,8 +52,8 @@ setup() {
unset BUILDKITE_PLUGIN_PLUGIN_LINTER_IMAGE_VERSION

stub docker \
"pull buildkite/plugin-linter : echo pulled image" \
"run -it --rm --volume /plugin:/plugin:ro --env PLUGIN_ID=my-plugin buildkite/plugin-linter:v2.0.2 : echo linted"
"pull buildkite/plugin-linter:v2.0.3 : echo pulled image" \
"run -it --rm --volume /plugin:/plugin:ro --env PLUGIN_ID=my-plugin buildkite/plugin-linter:v2.0.3 : echo linted"

run "$PWD"/hooks/command