Skip to content

Commit

Permalink
Merge pull request #2518 from neilfordyce/update-ci
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
neilfordyce committed May 29, 2024
2 parents e25bc3e + 139a306 commit b0d6cd5
Show file tree
Hide file tree
Showing 13 changed files with 677 additions and 677 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
jobs:
checks:
name: Code style
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.13
go-version: 1.21
id: go
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -26,12 +26,12 @@ jobs:

generated:
name: Generated code
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.13
go-version: 1.21
id: go
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -42,12 +42,12 @@ jobs:

build_and_test:
name: Build and test
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.13
go-version: 1.21
id: go
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -61,7 +61,7 @@ jobs:
run: build/test-startup.sh

cross-compile:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
matrix:
os: [ "linux", "darwin", "windows" ]
Expand All @@ -72,6 +72,6 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "^1.13"
go-version: 1.21
- name: Build ${{ matrix.os }} binary
run: make build-${{ matrix.os }}
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
jobs:
sonarcloud:
name: Sonar static analysis
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.13
go-version: 1.21
id: go
- name: Checkout
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go
sudo: false
go:
- 1.13.x
- 1.21.x

env:
- GO111MODULE=on
Expand Down
64 changes: 32 additions & 32 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Contributing to bosun and scollector

We're glad you want to make a contribution!

Fork this repository and send in a pull request when you're finished with your changes. Link any relevant issues in too.
Take note of the build status of your pull request; only builds that pass will be accepted.

Take note of the build status of your pull request; only builds that pass will be accepted.
Please also keep to our conventions and style so we can keep this repository as clean as possible.

## Licence

By contributing your code, you agree to licence your contribution under the terms of the [MIT licence].

All files are released with the MIT licence.

## Before contributing

If you're about to raise an issue because you think you've found a bug, or you'd like to request a feature, or for any other reason, please read this first.

We're tracking issues in the issue tracker on GitHub. This includes bugs and feature requests.
We're tracking issues in the issue tracker on GitHub. This includes bugs and feature requests.
It's not a support forum where we can answer questions about concrete Bosun instances or their configuration; unless, of course, they expose a bug in Bosun itself.

Please use [StackOverflow] for support questions. There exists a Slack instance where general help questions can be asked or you can reach out to the developers. You can [request an invite here][SlackInvite].
Expand All @@ -26,11 +26,11 @@ Please also see also our [Code of Conduct].

### Setting up your build system

The repository contains a [Makefile] which should make it easy to install all dependencies. Other than that,
you're going to need a recent (1.13+) Go environment, NPM and GCC.
The repository contains a [Makefile] which should make it easy to install all dependencies. Other than that,
you're going to need a recent (1.21+) Go environment, NPM and GCC.
Run the following targets to get all dependencies:
- `make deps`
- `make testdeps`
- `make testdeps`

### Bug reports

Expand All @@ -41,53 +41,53 @@ Guidelines for bug reports:
1. **Use the GitHub issue search** — check if the issue has already been
reported.

1. **Check if the issue has been fixed** — look for [closed issues]
1. **Check if the issue has been fixed** — look for [closed issues]
or try to reproduce it using the latest code on the `master` branch.

A good bug report shouldn't leave others needing to chase you up for more information.
A good bug report shouldn't leave others needing to chase you up for more information.
Be sure to include the details of your environment and relevant tests that demonstrate the failure.

### Feature requests

Feature requests are very welcome. Please take a moment to make sure you consider the following:

1. **Use the GitHub search** to see if a request for that feature already exists.
1. **Use the GitHub search** to see if a request for that feature already exists.
If so, please contribute to the issue instead of raising a new one.
1. Take a moment to think about whether your idea fits with the scope and aims of the project.
1. Remember, it's up to *you* to make a strong case to convince the maintainers of the merits of this feature.
1. Remember, it's up to *you* to make a strong case to convince the maintainers of the merits of this feature.
Please provide as much detail and context as possible, this means explaining the use case and why it is likely to be common.

## Contributing code

Thank you for contributing to Bosun :raised_hands:

Before opening a pull request, please take a moment to raise an issue describing the change or addition you'd like to
contribute. We'll do our best to support and review contributions, but there will be some things that don't fit the
plans we have for the project, which we therefore cannot accept. Reaching out to us on an issue helps all of us to be on
Before opening a pull request, please take a moment to raise an issue describing the change or addition you'd like to
contribute. We'll do our best to support and review contributions, but there will be some things that don't fit the
plans we have for the project, which we therefore cannot accept. Reaching out to us on an issue helps all of us to be on
the same page and can save valuable time.

We're using Github's labels to tag certain issues that we'd like help with. If you're a first time contributor, look out
for issues tagged with [good first issue] for some of the easier issues to get you up to speed with the code base.

Use GitHub pull requests to submit code. General submission guidelines:

1. Add/update unit tests for your new feature or fix
1. Use the available targets in the [Makefile] (especially `make checks`) to perform the checks on your code.
For the full list of validation checks that will be run by the CI tool, see [.travis.yaml] and the Actions tab in
1. Add/update unit tests for your new feature or fix
1. Use the available targets in the [Makefile] (especially `make checks`) to perform the checks on your code.
For the full list of validation checks that will be run by the CI tool, see [.travis.yaml] and the Actions tab in
Github.
1. Add any new third party dependencies to the `go.mod` file
1. The commit message should indicate what folder is being changed
1. The commit message should indicate what folder is being changed
(example: `cmd/scollector: new xyz collector` or `docs: fix typo in window function`)
1. Documentation changes should be made in the same branch as code changes using the `docs` folder.
After the PR is approved is merged into the master branch it will show up on https://bosun.org
(and is rendered using Github Pages).
1. Documentation changes should be made in the same branch as code changes using the `docs` folder.
After the PR is approved is merged into the master branch it will show up on https://bosun.org
(and is rendered using Github Pages).

Unless otherwise noted, the source files are distributed under the MIT license found in the LICENSE file.

### Style guidelines

We use the golang [Go code review comments] document as the basis for our style.
Take particular note of Error Strings, Mixed Caps, and Indent Error Flow sections.
We use the golang [Go code review comments] document as the basis for our style.
Take particular note of Error Strings, Mixed Caps, and Indent Error Flow sections.
Also we don't have blank lines within functions.

The make target `checks` will be run to make sure that the basic style guidelines are adhered to and fail the build
Expand All @@ -96,13 +96,13 @@ if they weren't.
### Bosun submission guidelines

1. If changing HTML, JS, or other static content, run `make generate`.
1. [typescript][typescript] is required if changing JS files.
Invoke bosun with `-w` to watch for `.ts` changes and automatically run typescript.
1. [typescript][typescript] is required if changing JS files.
Invoke bosun with `-w` to watch for `.ts` changes and automatically run typescript.
We currently use typescript 2.4.2: `npm i -g [email protected]` (or `make deps`)

#### Note for vim users

As vim will usually save file in a temporary buffer, then will rename the file.
As vim will usually save file in a temporary buffer, then will rename the file.
So for the *-w* option to work, one could eventually at this in
`.vimrc`, assuming GOPATH is the homedir:

Expand All @@ -120,8 +120,8 @@ set backupskip+=*/cmd/bosun/{*.go\\,web/static/{js/*.ts\\,templates/*.html}}

### scollector submission guidelines

1. New scollector collectors must have units, types, and descriptions for all new metrics.
Descriptions should not be in the `Add()` line, but in another data structure or constant.
1. New scollector collectors must have units, types, and descriptions for all new metrics.
Descriptions should not be in the `Add()` line, but in another data structure or constant.
See [keepalive collectors] for the constants, and the [memcached] for good patterns.

[Code of Conduct]: CODE_OF_CONDUCT.md "Code of Conduct"
Expand Down
2 changes: 1 addition & 1 deletion build/dockerRelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ docker run --rm \
-w /src/bosun.org \
-e OUTPUTDIR=/output/ \
-e GITHUB_ACCESS_TOKEN=$GITHUB_ACCESS_TOKEN \
golang:1.13 /src/bosun.org/build/release.sh /src/bosun.org
golang:1.21 /src/bosun.org/build/release.sh /src/bosun.org
2 changes: 1 addition & 1 deletion cmd/bosun/web/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func RunTsc() {
tmp := filepath.Join(base, "bosun-new.js")
dst := filepath.Join(base, "bosun.js")
args := []string{
"--out", tmp,
"--outFile", tmp,
}
matches, _ := filepath.Glob(filepath.Join(base, "*.ts"))
sort.Strings(matches)
Expand Down
Loading

0 comments on commit b0d6cd5

Please sign in to comment.