├── .drone.yml ├── .github └── workflows │ └── scip.yml ├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── DCO ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── check.go ├── check ├── dns │ ├── dns.go │ └── dns_test.go ├── exec │ ├── exec.go │ ├── exec_test.go │ └── testdata │ │ └── exec.sh ├── http │ ├── http.go │ └── http_test.go ├── tcp │ ├── tcp.go │ ├── tcp_test.go │ └── testdata │ │ ├── Makefile │ │ ├── client.debug.crt │ │ ├── client.key │ │ ├── client.pem │ │ ├── leaf.debug.crt │ │ ├── leaf.key │ │ ├── leaf.pem │ │ ├── root.debug.crt │ │ ├── root.key │ │ └── root.pem └── tls │ ├── tls.go │ └── tls_test.go ├── checkup.go ├── checkup_test.go ├── cmd ├── checkup │ └── main.go ├── every.go ├── message.go ├── provision.go ├── root.go └── serve.go ├── docker-compose.yml ├── errors.go ├── go.mod ├── go.sum ├── interfaces.go ├── notifier.go ├── notifier ├── discord │ ├── discord.go │ └── types.go ├── mail │ └── mail.go ├── mailgun │ └── mailgun.go ├── pushover │ └── pushover.go └── slack │ └── slack.go ├── statuspage ├── css │ └── style.css ├── images │ ├── checkup.png │ ├── degraded.png │ ├── favicon.png │ ├── incident.png │ ├── ok.png │ ├── status-gray.png │ ├── status-green.png │ ├── status-red.png │ └── status-yellow.png ├── index.html └── js │ ├── checkup.js │ ├── config.js │ ├── config_s3.js │ ├── d3.v3.min.js │ ├── fs.js │ ├── s3.js │ └── statuspage.js ├── storage.go ├── storage ├── appinsights │ ├── appinsights.go │ └── appinsights_test.go ├── fs │ ├── fs.go │ ├── fs_test.go │ └── types.go ├── github │ ├── github.go │ └── github_test.go ├── mysql │ ├── mysql.go │ ├── mysql_test.go │ └── types.go ├── postgres │ ├── postgres.go │ ├── postgres_test.go │ └── types.go ├── s3 │ ├── s3.go │ └── s3_test.go ├── sql │ ├── sql.go │ ├── sql_disabled.go │ ├── sql_test.go │ └── types.go └── sqlite3 │ ├── sqlite.go │ ├── sqlite_disabled.go │ ├── sqlite_test.go │ └── types.go ├── testdata └── config.json └── types ├── attempt.go ├── errors.go ├── errors_test.go ├── provisioner.go ├── result.go ├── stats.go ├── status.go └── util.go /.drone.yml: -------------------------------------------------------------------------------- 1 | workspace: 2 | base: /checkup 3 | 4 | kind: pipeline 5 | name: checkup 6 | 7 | steps: 8 | - name: test-mysql 9 | image: golang:1.14 10 | pull: always 11 | commands: 12 | - make test-mysql 13 | - make build-mysql 14 | 15 | - name: test-postgres 16 | image: golang:1.14 17 | pull: always 18 | commands: 19 | - make test-postgres 20 | - make build-postgres 21 | 22 | - name: test-sqlite3 23 | image: golang:1.14 24 | pull: always 25 | commands: 26 | - make test-sqlite3 27 | - make build-sqlite3 28 | 29 | services: 30 | - name: postgres-test-db 31 | image: postgres:12-alpine 32 | environment: 33 | POSTGRES_PASSWORD: test 34 | POSTGRES_USER: test 35 | POSTGRES_DB: test 36 | 37 | - name: mysql-test-db 38 | pull: always 39 | image: percona/percona-server:8.0.17 40 | environment: 41 | MYSQL_RANDOM_ROOT_PASSWORD: true 42 | MYSQL_USER: test 43 | MYSQL_PASSWORD: test 44 | MYSQL_DATABASE: test 45 | -------------------------------------------------------------------------------- /.github/workflows/scip.yml: -------------------------------------------------------------------------------- 1 | name: SCIP 2 | 'on': 3 | - push 4 | jobs: 5 | scip-go: 6 | runs-on: ubuntu-latest 7 | container: sourcegraph/scip-go 8 | steps: 9 | - uses: actions/checkout@v1 10 | - name: Get src-cli 11 | run: curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o /usr/local/bin/src; 12 | chmod +x /usr/local/bin/src 13 | - name: Set directory to safe for git 14 | run: git config --global --add safe.directory $GITHUB_WORKSPACE 15 | - name: Generate SCIP data 16 | run: scip-go 17 | - name: Upload SCIP data to Cloud 18 | run: src code-intel upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress 19 | env: 20 | SRC_ENDPOINT: https://sourcegraph.com 21 | SRC_ACCESS_TOKEN: ${{ secrets.SRC_ACCESS_TOKEN_DOTCOM }} 22 | - name: Upload SCIP to S2 23 | run: src code-intel upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress 24 | env: 25 | SRC_ENDPOINT: https://sourcegraph.sourcegraph.com/ 26 | SRC_ACCESS_TOKEN: ${{ secrets.SRC_ACCESS_TOKEN_S2 }} 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _gitignore/ 2 | .DS_Store 3 | checkup.json 4 | src/ 5 | pkg/ 6 | bin/ 7 | builds/ 8 | dist/ 9 | checks/ 10 | .envrc -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.14 -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | This Sourcegraph project is [MIT licensed](LICENSE) and accepts 4 | contributions via GitHub pull requests. This document outlines some of 5 | the conventions on development workflow, commit message formatting, 6 | contact points and other resources to make it easier to get your 7 | contribution accepted. 8 | 9 | # Certificate of Origin 10 | 11 | By contributing to this project you agree to the [Developer Certificate of Origin 12 | (DCO)](https://developercertificate.org/). This document was created by the Linux Kernel community 13 | and is a simple statement that you, as a contributor, have the legal right to make the 14 | contribution. See the [DCO](DCO) file for details. 15 | 16 | ## Getting Started 17 | 18 | You'll need Go 1.10 or newer installed. 19 | 20 | 1. [Fork this repo](https://github.com/sourcegraph/checkup). This makes a copy of the code you can write to. 21 | 2. If you don't already have this repo (sourcegraph/checkup.git) repo on your computer, get it with `go get github.com/sourcegraph/checkup/cmd/checkup`. 22 | 3. Tell git that it can push the sourcegraph/checkup.git repo to your fork by adding a remote: `git remote add myfork https://github.com/you/checkup.git` 23 | 4. Make your changes in the sourcegraph/checkup.git repo on your computer. 24 | 5. Push your changes to your fork: `git push myfork` 25 | 6. [Create a pull request](https://github.com/sourcegraph/checkup/pull/new/master) to merge your changes into sourcegraph/checkup @ master. (Click "compare across forks" and change the head fork.) 26 | 27 | You can test your changes with `go run main.go` or `go build` if you want a binary plopped on disk. Use `go test -race ./...` from the root of the repo to run tests and make sure they pass! 28 | 29 | 30 | ## Contribution Flow 31 | 32 | This is a rough outline of what a contributor's workflow looks like: 33 | 34 | - Create a topic branch from where you want to base your work (usually master). 35 | - Make commits of logical units. 36 | - Make sure your commit messages are in the proper format (see below). 37 | - Push your changes to a topic branch in your fork of the repository. 38 | - Make sure the tests pass, and add any new tests as appropriate. 39 | - Submit a pull request to the original repository. 40 | 41 | Thanks for your contributions! 42 | 43 | ### Format of the Commit Message 44 | 45 | We follow a rough convention for commit messages that is designed to answer two 46 | questions: what changed and why. The subject line should feature the what and 47 | the body of the commit should describe the why. 48 | 49 | ``` 50 | scripts: add the test-cluster command 51 | 52 | this uses tmux to setup a test cluster that you can easily kill and 53 | start for debugging. 54 | 55 | Fixes #38 56 | ``` 57 | 58 | The format can be described more formally as follows: 59 | 60 | ``` 61 | : 62 | 63 | 64 | 65 |