Commit Graph
48 Commits
Author SHA1 Message Date
Louis Ruch 281f217dcc feat(plugins): Refactor host plugins to boundary plugins (#3262) 2023-06-02 08:04:50 -07:00
Johan Brandhorst-Satzkorn 0c8177590f Upgrade grpc-gateway dependency (#3257)
* proto: correct classification of authz token

The target authorization token had the invalid classification
"private". Fortunately, classification is a fail-closed system,
so this won't have exposed users authorization tokens, but
we should still use the correct classification. Use "secret".

* scripts: add Go script to remove gotags comments

The new version of grpc-gateway includes our gotags
comments in the generate swagger documentation. This
script removes all mentions of these.

* Upgrade grpc-gateway dependency

Mainly we need this to fix generation of our docs side API docs,
but it also includes a nice fix for the new Download RPC, i.e. it
now contains the correct response schema (a binary stream).
2023-06-01 06:41:09 -07:00
Timothy Messier 9d2758368c doc(schema-diff): Add documentation on schema-diff script
This also will include a link to this documentation when leaving a
comment on a pull request.
2023-03-27 14:27:54 +00:00
Timothy Messier 04a6c310ee fix(schema-diff): Include foreign key constraints in diff
With the change to report changes to constraints instead of all of the
post-data section, foreign key constraints where no longer captured in
the diff. This now extracts the foreign key constraints and generates a
diff of them between versions.

Blame: b6d58d0c42
2023-03-27 14:27:54 +00:00
Timothy Messier b6d58d0c42 ci(schema-diff): Generate one file per constraint (#3082)
This yeilds a better diff when constraints are changed.
2023-03-14 12:57:07 -04:00
Timothy Messier 000fc7c0e0 ci: Remove CircleCI configuration (#3065)
CI is now performed via Github Actions. Some notable Github Action
workflows that replace the CircleCI jobs are:

- test: replaces CCI build, test-api, test-sdk
- test-sql: replaces CCI test-sql
- make-gen-delta: replaces CCI make-gen-delta

See:
    https://github.com/hashicorp/boundary/actions/workflows/test.yml
    https://github.com/hashicorp/boundary/actions/workflows/test-sql.yml
    https://github.com/hashicorp/boundary/actions/workflows/make-gen-delta.yml
    https://docs.github.com/en/actions
    https://cli.github.com/manual/gh_run
2023-03-08 14:23:33 -05:00
Jeff Mitchell b2bab45c13 Port over changes (#3061) (#3062) 2023-03-07 16:29:34 -05:00
Timothy MessierandHugo Vieira b00d888387 ci(schema-diff): Add script to generate diff of database schema (#2924)
The script should be given a base branch to compare against, if not set
it defaults to main. The script will apply the schema migrations for
both the base branch and the current commit and generate dumps that are
then compared to create a diff. The dumps are left in a temporary
directory so that they can be compared using a users preferred diff tool.

For example, generate the dumps and diff against main

    ./scripts/schema-diff.sh main

Examine the diff to database functions using delta:

    delta .schema-diff/funcs_$(git rev-parse main) .schema-diff/funcs_$(git rev-parse HEAD)

This also adds a github action that runs the script on pull-requests
that contain schema changes and reports the diffs as a comment on the
pull-request.

Co-authored-by: Hugo Vieira <hugoamvieira@users.noreply.github.com>
2023-03-03 16:21:33 -05:00
Zhihe Li 4f37319c6f Update ui build scripts to check edition (#3016) 2023-02-27 10:25:16 -05:00
Timothy Messier 39e1cd7dcf chore(ci): Add downstream merge trigger to github action (#3014) 2023-02-24 08:36:47 -05:00
86214a85e1 ci: Run go tests in github action (#2997)
This runs the make targets:

- make test
- make test-api
- make test-sdk

The go tests in the main module are split by package and run in parallel
in a matrix build with GOMAXPROCS=1. This is done primarily to work
around an issue that is only seen on the github runners.  When running
at a higher GOMAXPROCS tests that use vault instances in docker
containers start to intermitently fail with errors from vault, usually
either a 400, 403, or TLS error. It is not clear what the cause of this
is, since the same tests run fine on self hosted runners and on
CircleCI.

Co-authored-by: Sarah Thompson <sthompson@hashicorp.com>
Co-authored-by: Daniel Kimsey <daniel.kimsey@hashicorp.com>
2023-02-23 14:58:40 -05:00
Johan Brandhorst-Satzkorn 3c29308673 chore: Add license headers to all files 2023-02-03 15:54:27 -08:00
Irena Rindos c80d7eae65 use product version from file if env var not set (#2763) 2023-01-06 12:34:29 -05:00
Ryan Cragun 23f1cdea27 enos: make the local build target configurable (#2313)
This makes the `make` build target that is used for local builder
variant configurable. This will allow us to utilize the local builder
variant in downstreams that might use different targets for their build.

* Make the local build target configurable
* Allow cross compiling `linux/amd64` on different platforms.
2022-12-19 14:35:10 -05:00
Danielle 46037cf85a Add Staticcheck to Build Pipeline (#2421)
Run staticcheck linters on pull requests
2022-12-13 12:07:18 -05:00
emily neil 7cd5b5a320 Onboard boundary to use new version/VERSION file and reproducible actions-go-build (#2662)
* Onboard boundary to use new .release/VERSION file and reproducible actions-go-build

* Added automatic patch version bumps to end of release pipeline

* Added back VersionMetadata to internal directory

* Moved VERSION file to version/

* Update to current version

* Using prepare workflow for pre-stable channel workflow

* Test prepare workflow

* PR feedback: allow builds to run builds locally without setting BIN_PATH

* PR feedback: revert Enos changes

* PR Feedback

* Remove current branch from ci pipeline

* Run make fmt
2022-12-09 13:08:02 -08:00
Timothy Messier f39833ebad chore: Add downstream merge triggers (#2524)
Trigger a downstream merge. This requires that the DOWNSTREAM_SLUG
environment variable is set in CircleCI. This will trigger downstream
merges for main and all release branches.
2022-10-06 13:38:27 -04:00
Timothy Messier 01206eb586 chore(build): Allow for downloading pre-built admin ui assets (#2475)
The admin ui assets are built via a github workflow and published as
github a artifact. The artifact can be downloaded, avoiding the need to
build the assets again locally, and eliminating the need for front-end
build tools like yarn and npm.

This updates the `build-ui` target to use a new script that will attempt
to download the pre-built assets. Note that this script requires that
the `gh` cli is installed since an authenticated request is necessary to
download the workflow artifacts. If the artifact cannot be downloaded
either due to the lack of `gh` or because the artifact cannot be found,
it will fallback to using `git clone` (and will require yarn to build
the assets).

See:
    https://cli.github.com/
    https://docs.github.com/en/rest/actions/artifacts
    https://github.com/actions/upload-artifact/issues/51
2022-09-20 11:14:02 -04:00
Irena Rindos 4aa09242ab Fix dev Docker build (#2380)
* Fix dev Docker build
2022-08-24 09:05:25 -04:00
Michele Degges 63bfcaff61 [CI-only] Build updates (#2296) 2022-07-28 07:57:12 -07:00
Cameron Perera 20f5185a8c chore: Change how update-ui-version gets the latest commit sha (#2069)
* chore: Change how update-ui-version gets the latest commit sha on main

* remove changelog edits

* chore: refactor uiupdate.sh to use UI_COMMITISH instead of main
2022-05-12 09:32:39 -05:00
Jeff Mitchell f370abc1da Unify plugin building (#2013)
This causes the build.sh script to chain to plugins.sh which makes
plugin building behave the same for both local and release builds.
2022-04-15 09:17:43 -04:00
Johan Brandhorst-Satzkorn b1d6a1da9a Switch to buf for protobuf generation (#1944)
* Install buf with go install

This reduces the impact of using buf on our dependency
closure, which was significant. It also avoids potential
issues with building buf given our own internal dependency
constraints. This has caused issues (including crashes!)
in the past.

See https://github.com/cockroachdb/cockroach/issues/67216#issuecomment-874176186
for more discussion on using tool dependencies generally, and
https://github.com/bufbuild/buf/issues/52
for an example of where this sort of thing caused an issue for a user.

* Upgrade buf version

We should migrate to v1 sooner rather than later, as it has some
breaking changes from v0.

* Change buf lint/breaking commands

These commands were moved up one level for v1

* Migrate to buf.yaml to v1

* Remove unused imports

These were uncovered by using "buf lint".

* Use buf v1.3.1

* Depend on googleapis and grpc-gateway via BSR

* Switch to buf for proto generation

* Remove third party dependency

* Remove unused tools and scripts

* Move local protos up one level

* Temporarily don't fail on breaking changes

* Generate CI config

* Fix generation of controller.json

* Replace use of deprecated flag

* Remove unused import, regenerate files

* Remove temporary skipping over breaking check
2022-04-04 13:55:42 -04:00
Jeff Mitchell 7eb29261b2 Update to go-kms-wrapping version 2, and plugin-based KMS (#1901) 2022-03-16 17:04:07 -04:00
Jeff Mitchell b53e4d4c3e Update make targets: (#1900)
* Update make targets:

* `make dev` now shows a message indicating the new commands
* `make build` builds the binary into bin/
* `make install` will subsequently `mv` (not copy) the binary into
  GOPATH/bin

The reason for the `mv` is that M1 Macs seem to get pretty unhappy about
executing a copied binary if it's been modified, so an initial binary is
fine, then after changing and recompiling the command keeps getting
killed.

* Make the 'make install' text more clear
2022-03-09 16:20:44 -05:00
Timothy Messier a2dc9dfd40 fix(build): Use POSIX compatible comparison
In CI were errors/warnings like:

    ./scripts/plugins.sh: 7: [: windowsx: unexpected operator

This comparison is compatible with more versions of bash and other
shells and should prevent these messages.
2022-02-17 11:15:36 -05:00
Timothy Messier 44d269fdbd fix(build): Include .exe suffix when building plugins for Windows (#1867)
When moving to the new CRT build process, this was missed from the older
build scripts. When building the plugins for Windows, if the files do
not have the `.exe` suffix, boundary fails with errors like the
following:

    Error initializing controller: error creating aws host plugin: error fetching host plugin rpc client: exec:
    "C:\\Users\\alice\\AppData\\Local\\Temp\\441718622\\boundary-plugin-host-aws": file does not exist
2022-02-17 10:48:15 -05:00
84f6cc698c Onboard Boundary to CRT (#1786)
Onboard Boundary to Common Release Tooling

Co-authored-by: mdrake <mdrake@hashicorp.com>
Co-authored-by: jeanneryan <jeanneryan@hashicorp.com>
2022-02-01 07:41:27 -08:00
Jeff Mitchell 208895e38b Add a static README file to the host assets dir (#1730) 2021-11-17 22:30:22 -05:00
Jeff Mitchell 0fd906d964 Merge branch 'main' into plugin-hostcatalogs 2021-10-21 11:47:13 -04:00
Timothy Messier 4b6a16034e chore: Add ci job to trigger update to enterprise 2021-10-15 14:03:26 -04:00
Jeff Mitchell 1c8e0ed1e1 Add scaffolding for external host plugins and convert aws/azure over (#1581) 2021-10-14 11:56:08 -04:00
Jeff MitchellandSam Salisbury a90a64d787 Use Go 1.16 native embedding and remove go-bindata (#1151)
Co-authored-by: Sam Salisbury <samsalisbury@gmail.com>
2021-04-20 10:45:05 -04:00
Randall Morey 5f1e63be2f fix: install and build steps should be wrapped in parens, otherwise build may not execute (#1098) 2021-04-09 15:29:33 -04:00
dd0f34bc35 Add new OIDC auth method. (#1090)
Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-04-08 20:54:32 -04:00
Sam Salisbury 0e20514b2f fix 'make update-ui-version' (#933)
- When using a branch name rather than a commit, the branch was not being
  updated to the latest version.
2021-02-17 13:37:39 +00:00
Louis Ruch aa655f6991 Revert errorid (#797)
* Revert "Refactor domain error to use errorId (#790)"

This reverts commit d30dd0ff64.

* Revert "Create common errorID generation (#788)"

This reverts commit b8a5b9adf1.
2020-11-19 12:46:15 -08:00
Susmitha Girumala 7f1a12ecaa Update ui build to use 'admin' folder instead of 'core' (#792)
* Update ui build to use 'admin' folder instead of 'core'

Post release of v0.1.2, ui/core folder has been renamed to ui/admin.
Update ui build scripts to be aware of the path change.

* Update packagespec to reflect "admin" ui folder change
2020-11-18 16:29:48 -05:00
Louis Ruch b8a5b9adf1 Create common errorID generation (#788) 2020-11-16 13:51:11 -08:00
Jeff Malnick 038540f9ad feat: add official Dockerfile for Boundary (#755) 2020-10-29 08:44:57 -07:00
Jeff Mitchell bd271b707d Add version command (#604) 2020-10-09 19:35:04 -04:00
Sam Salisbury 560c727bcf make update-ui-version (#578)
* make update-ui-version

* make update-ui-version: default branch main

* make update-ui-version: actually checkout commit
2020-10-08 18:51:53 +01:00
Sam Salisbury 498a840862 Add packagespec CI (#479) 2020-09-28 17:15:28 +01:00
Jeff Mitchell 7ff4b7f106 Send connected RPC to controller (#386) 2020-09-20 23:09:42 -04:00
Jeff Mitchell 26ac00e67b Fix asset generation.
Apparently now it's not recursive?
2020-09-04 16:27:51 -04:00
Jeff Mitchell 6661117d4c The name. The name. The name! 2020-08-10 17:15:02 -04:00
Jeff MitchellandRandall Morey 8da4effd5e Add mechanism for bundling UI assets. (#153)
* Add mechanism for bundling UI assets.

The scripts/uigen.sh script will check out the UI repo, build assets,
create a static assets file, and clean up.

The dev Makefile target has been modified to run this script if no
assets file is found. There is also a build-ui target that will
unilaterally update (the dev target only builds if the file isn't found,
but doesn't update).

The handler has been updated to add the default org ID as a header if
the request path is "/".

Co-authored-by: Randall Morey <randall@randallmorey.com>
2020-06-30 11:26:22 -04:00
Jeff Mitchell 9fd86faf15 Adds a dev target to Makefile and ports over build script (#75)
* Initial work on dev builds

* Fix build script
2020-05-21 16:03:21 -04:00