Skip to content

Commit

Permalink
ci: cleanup workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasgerstmayr committed Mar 4, 2022
1 parent fc10ac4 commit 58cb6cc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ max_line_length = 120
[*.{js,ts,tsx,scss}]
quote_type = single

[*.{jsonnet,libsonnet}]
[*.{yml,jsonnet,libsonnet}]
indent_size = 2

[Makefile]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
- name: Create plugin zip file
run: make zip

- name: Run linters
run: make lint
- name: Run plugincheck
run: make plugincheck
# ignore unsigned plugin error in CI
continue-on-error: true

Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ jobs:
- name: Install dependencies
run: make deps

- name: Test backend
run: make test-backend

- name: Test frontend & Build plugin
run: make build
- name: Test & Build plugin
run: |
make test-backend
make build # also runs frontend tests
- name: Check if package version and git tag matches
run: |
Expand All @@ -43,8 +42,8 @@ jobs:
- name: Create plugin zip file
run: make zip

- name: Run linters
run: make lint
- name: Run plugincheck
run: make plugincheck
# ignore unsigned plugin error
continue-on-error: true

Expand Down
23 changes: 0 additions & 23 deletions ci/scripts/github-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@
#

GRAFANA_PLUGIN_ID="$(jq -r '.id' dist/plugin.json)"
GRAFANA_PLUGIN_TYPE="$(jq -r '.type' dist/plugin.json)"
GRAFANA_PLUGIN_VERSION="$(jq -r '.info.version' dist/plugin.json)"
GRAFANA_PLUGIN_SHA="$(git rev-parse HEAD)"
GRAFANA_PLUGIN_ARTIFACT="${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}.zip"
GRAFANA_PLUGIN_ARTIFACT_CHECKSUM="${GRAFANA_PLUGIN_ARTIFACT}.md5"
GRAFANA_PLUGIN_CHECKSUM=$(cut -d' ' -f1 "build/${GRAFANA_PLUGIN_ARTIFACT_CHECKSUM}")

RELEASE_NOTES=$(awk '/^## / {s++} s == 1 {print}' CHANGELOG.md)
PRERELEASE_ARG=""
Expand All @@ -26,23 +23,3 @@ hub release create \
-a "build/${GRAFANA_PLUGIN_ARTIFACT_CHECKSUM}" \
$PRERELEASE_ARG \
"v${GRAFANA_PLUGIN_VERSION}"

echo Publish your plugin to grafana.com/plugins by opening a PR to https://github.com/grafana/grafana-plugin-repository with the following entry:
jq <<EOF
{
"id": "${GRAFANA_PLUGIN_ID}",
"type": "${GRAFANA_PLUGIN_TYPE}",
"url": "https://github.com/${GITHUB_REPOSITORY}",
"versions": [{
"version": "${GRAFANA_PLUGIN_VERSION}",
"commit": "${GRAFANA_PLUGIN_SHA}",
"url": "https://github.com/${GITHUB_REPOSITORY}",
"download": {
"any": {
"url": "https://github.com/${GITHUB_REPOSITORY}/releases/download/v${GRAFANA_PLUGIN_VERSION}/${GRAFANA_PLUGIN_ARTIFACT}",
"md5": "${GRAFANA_PLUGIN_CHECKSUM}"
}
}
}]
}
EOF

0 comments on commit 58cb6cc

Please sign in to comment.