build/cmd/relui
Rob Findley 4999efa2a6 internal/task, cmd/relui: add definitions for tagging x/telemetry/config
Add a new workflow definition to automate the updating and tagging of
the x/telemetry/config module.

Change-Id: I5bbf46f88b025587ffba6e0c6960e1e22f04139e
Reviewed-on: https://go-review.googlesource.com/c/build/+/522178
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2023-08-24 17:19:39 +00:00
..
.eslintrc.yaml all: add missing license headers 2023-04-24 13:52:27 +00:00
.prettierrc.yaml all: add missing license headers 2023-04-24 13:52:27 +00:00
.stylelintrc.yaml all: add missing license headers 2023-04-24 13:52:27 +00:00
Dockerfile cmd/relui: add ca-certificates 2023-07-14 15:39:11 +00:00
Dockerfile.node internal/relui: format javascript and css 2022-06-16 21:04:17 +00:00
Dockerfile.test cmd/relui: update all containers to Debian 12 bookworm 2023-07-11 17:00:54 +00:00
Makefile internal/relui: format javascript and css 2022-06-16 21:04:17 +00:00
README.md all: clean up and consolidate deployment documentation 2022-07-07 18:00:38 +00:00
cloudbuild.yaml all: make copyright headers consistent 2023-03-01 01:31:01 +00:00
deployment-prod.yaml cmd/relui: send emails on scheduled workflow failures 2023-05-08 21:41:10 +00:00
main.go internal/task, cmd/relui: add definitions for tagging x/telemetry/config 2023-08-24 17:19:39 +00:00
package-lock.json internal/relui: format javascript and css 2022-06-16 21:04:17 +00:00
package.json internal/relui: format javascript and css 2022-06-16 21:04:17 +00:00
sqlc.yaml all: make copyright headers consistent 2023-03-01 01:31:01 +00:00

README.md

golang.org/x/build/cmd/relui

               ▀▀█             ▀
  ▄ ▄▄   ▄▄▄     █    ▄   ▄  ▄▄▄
  █▀  ▀ █▀  █    █    █   █    █
  █     █▀▀▀▀    █    █   █    █
  █     ▀█▄▄▀    ▀▄▄  ▀▄▄▀█  ▄▄█▄▄

relui is a web interface for managing the release process of Go.

Development

Run the command with the appropriate libpq-style environment variables set.

PGHOST=localhost PGDATABASE=relui-dev PGUSER=postgres go run . -listen-http=localhost:8080

Alternatively, using docker:

make dev

Updating Queries

Create or edit SQL files in internal/relui/queries. After editing the query, run sqlc generate in this directory. The internal/relui/db package contains the generated code.

See sqlc documentation for further details.

Creating & Running Database Migrations

Migrations are managed using github.com/golang-migrate/migrate.

Creating

go run -tags pgx github.com/golang-migrate/migrate/v4/cmd/migrate \
  create \
  --dir ../../internal/relui/migrations/ \
  -ext sql \
  my_fancy_migration
# alternatively, install the migrate command with pgx support.

Running

Migrations are automatically ran on application launch. "Down" migrations are not automatically run and must be manually invoked in psql, or by the --migrate-down-up flag or make migrate-down-up.

Testing

Run go test with the appropriate libpq-style environment variables set. If the database connection fails, database integration tests will be skipped. If PGDATABASE is unset, relui-test is created, migrated, and used by default.

PGHOST=localhost PGUSER=postgres go test -v ./... ../../internal/relui/...

Alternatively, using docker:

make test

Deployment

See the documentation on deployment.

JS/CSS formatting and lint

This project uses eslint and stylelint to format JavaScript and CSS files.

To run:

npm run lint

Alternatively, using Docker:

make lint