Skip to content

Commit

Permalink
feat: remove check steps from drone
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney committed Feb 14, 2024
1 parent 74c6c80 commit 71db0de
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 76 deletions.
13 changes: 0 additions & 13 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -601,30 +601,17 @@ local build_image_tag = '0.33.0';
path: 'loki',
},
steps: [
make('check-drone-drift', container=false) { depends_on: ['clone'] },
make('check-generated-files', container=false) { depends_on: ['clone'] },
run('clone-target-branch', commands=[
'cd ..',
'echo "cloning "$DRONE_TARGET_BRANCH ',
'git clone -b $DRONE_TARGET_BRANCH $CI_REPO_REMOTE loki-target-branch',
'cd -',
]) { depends_on: ['clone'], when: onPRs },
make('test', container=false) { depends_on: ['clone-target-branch', 'check-generated-files'] },
make('lint', container=false) { depends_on: ['check-generated-files'] },
make('check-mod', container=false) { depends_on: ['test', 'lint'] },
{
name: 'shellcheck',
image: 'koalaman/shellcheck-alpine:stable',
commands: ['apk add make bash && make lint-scripts'],
},
make('loki', container=false) { depends_on: ['check-generated-files'] },
make('check-doc', container=false) { depends_on: ['loki'] },
make('check-format', container=false, args=[
'GIT_TARGET_BRANCH="$DRONE_TARGET_BRANCH"',
]) { depends_on: ['loki'], when: onPRs },
make('validate-example-configs', container=false) { depends_on: ['loki'] },
make('validate-dev-cluster-config', container=false) { depends_on: ['validate-example-configs'] },
make('check-example-config-doc', container=false) { depends_on: ['clone'] },
{
name: 'build-docs-website',
image: 'grafana/docs-base:e6ef023f8b8',
Expand Down
64 changes: 1 addition & 63 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,20 +177,6 @@ workspace:
kind: pipeline
name: check
steps:
- commands:
- make BUILD_IN_CONTAINER=false check-drone-drift
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.33.0
name: check-drone-drift
- commands:
- make BUILD_IN_CONTAINER=false check-generated-files
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.33.0
name: check-generated-files
- commands:
- cd ..
- 'echo "cloning "$DRONE_TARGET_BRANCH '
Expand All @@ -204,47 +190,13 @@ steps:
when:
event:
- pull_request
- commands:
- make BUILD_IN_CONTAINER=false test
depends_on:
- clone-target-branch
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.33.0
name: test
- commands:
- make BUILD_IN_CONTAINER=false lint
depends_on:
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.33.0
name: lint
- commands:
- make BUILD_IN_CONTAINER=false check-mod
depends_on:
- test
- lint
environment: {}
image: grafana/loki-build-image:0.33.0
name: check-mod
- commands:
- apk add make bash && make lint-scripts
image: koalaman/shellcheck-alpine:stable
name: shellcheck
- commands:
- make BUILD_IN_CONTAINER=false loki
depends_on:
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.33.0
name: loki
- commands:
- make BUILD_IN_CONTAINER=false check-doc
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.33.0
name: check-doc
- commands:
- make BUILD_IN_CONTAINER=false check-format GIT_TARGET_BRANCH="$DRONE_TARGET_BRANCH"
depends_on:
Expand All @@ -255,27 +207,13 @@ steps:
when:
event:
- pull_request
- commands:
- make BUILD_IN_CONTAINER=false validate-example-configs
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.33.0
name: validate-example-configs
- commands:
- make BUILD_IN_CONTAINER=false validate-dev-cluster-config
depends_on:
- validate-example-configs
environment: {}
image: grafana/loki-build-image:0.33.0
name: validate-dev-cluster-config
- commands:
- make BUILD_IN_CONTAINER=false check-example-config-doc
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.33.0
name: check-example-config-doc
- commands:
- mkdir -p /hugo/content/docs/loki/latest
- cp -r docs/sources/* /hugo/content/docs/loki/latest/
Expand Down Expand Up @@ -1975,6 +1913,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: 808ed3fdd8a5d161d7d8f2907dd74b13ebe2b2e6ed76e409afc3ac6485c92290
hmac: 07c4412faebf5affd662ec20ea50be4f89e0ad132942d7c6a76c91f7aee9facc

...
9 changes: 9 additions & 0 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ jobs:
- run: make check-drone-drift
- run: make check-generated-files
- run: make test
shellcheck:
runs-on: ubuntu-latest
container:
image: koalaman/shellcheck-alpine:stable
steps:
- uses: actions/checkout@v4
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- run: apk add make bash
- run: make lint-scripts
check-title:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 71db0de

Please sign in to comment.