Commit Graph

53 Commits

Author SHA1 Message Date
J.C. Jones c2443e2b58
Package ct-test-srv into the Boulder tarball (#7131)
SRE is moving ct-test-srv into Nomad, so we need this binary available
(somehow), and for now this is the means by which to do so.
2023-11-02 14:22:54 -04:00
Samantha bc1bf0fde4
test: Support multiple database schemas (#6344)
In dev docker we've always used a single schema (`boulder_sa`), with two
environments (`test` and `integration`) making for a combined total of two
databases sharing the same users and schema (e.g. `boulder_sa_test` and
`boulder_sa_integration`). There are also two versions of this schema. `db` and
`db-next`. The former is the schema as it should exist in production and the
latter is everything from `db` with some un-deployed schema changes. This change
adds support for additional schemas with the same aforementioned environments
and versions.

- Add support for additional schemas in `test/create_db.sh` and sa/migrations.sh
- Add new schema `incidents_sa` with its own users
- Replace `bitbucket.org/liamstask/goose/` with `github.com/rubenv/sql-migrate`

Part of #6328
2022-09-07 14:59:08 -07:00
lenaunderwood22 367c20f691
Add tar build to makefile (#6302)
Provide a new make command which uses fpm to produce
a tarball, rather than a deb or an rpm.
2022-08-18 12:58:03 -07:00
Matthew McPherrin 455cdade69
Add phony rules to .PHONY (#6301)
build_cmds, rpm, and deb are all phony rules:  They don't produce a
file named build_cmds, rpm, or deb.
2022-08-17 12:31:19 -07:00
Jacob Hoffman-Andrews 23dd1e21f9
Build all boulder binaries into a single binary (#5693)
The resulting `boulder` binary can be invoked by different names to
trigger the behavior of the relevant subcommand. For instance, symlinking
and invoking as `boulder-ca` acts as the CA. Symlinking and invoking as
`boulder-va` acts as the VA.

This reduces the .deb file size from about 200MB to about 20MB.

This works by creating a registry that maps subcommand names to `main`
functions. Each subcommand registers itself in an `init()` function. The
monolithic `boulder` binary then checks what name it was invoked with
(`os.Args[0]`), looks it up in the registry, and invokes the appropriate
`main`. To avoid conflicts, all of the old `package main` are replaced
with `package notmain`.

To get the list of registered subcommands, run `boulder --list`. This
is used when symlinking all the variants into place, to ensure the set
of symlinked names matches the entries in the registry.

Fixes #5692
2021-10-20 17:05:45 -07:00
Aaron Gable 6fb1d606f7
Package ct-test-srv into .deb (#5465)
Because ct-test-srv is lives in `//test` instead of in `//cmd`, it is not
included by default in the set of objects which are bundled into the
.deb and .rpb packages produced by the Makefile (although it is
compiled by the `make build` command). Add it to the set of files
bundled into the .deb, for the sake of our SREs.
2021-06-08 13:49:03 -07:00
Phil Porada b01be4678f
Remove libtool-ltdl dependency in the Makefile (#5427)
- Remove irrelevant `libtool-ltdl` dependency from Makefile for
  both `deb` and `rpm`
2021-05-20 14:28:30 -07:00
Amir Omidi 4205363ae3
Add deb target to the Makefile (#5375)
Enables the use of `make deb` to build and then generate a deb package using `fpm`.
2021-04-02 13:13:27 -07:00
Samantha cdce9f0f2f
Remove Travis-CI (#5356)
- Remove `.travis.yml`
- Remove references to Travis in `test.sh`
- Update documentation in `test/boulder-tools/README.md`, `README.MD`,
  and `CONTRIBUTING.MD`
- Update comments in `.github/workflows/boulder-ci.yml`

Fixes #5329
2021-03-19 17:49:05 -07:00
Jacob Hoffman-Andrews d47e65e1a8
build: always use 8-char git short id. (#5129)
The short id length can vary based on the size of the repo:

https://git-scm.com/docs/git-config

> If unspecified or set to "auto", an appropriate value
> is computed based on the approximate number of packed
> objects in your repository
2020-10-15 16:23:01 -07:00
Jacob Hoffman-Andrews 1014a81606 Switch to modules (#4211)
Because the package versions in go.mod match what we use in Godeps.json,
there are no substantive code diffs. However, there are some tiny
differences resulting from how go mod vendors things differently than
godep:

go mod does not preserve executable permissions on shell scripts
Some packages have import lines like:
package ocsp // import "golang.org/x/crypto/ocsp"

godep used to remove the comment from these lines, but go mod vendor does not.

This introduces several indirect dependencies that we didn't have
before. This is because godep used to operate at a package level, but
go mod operates at a module (~= repository) level. So if we used a
given repository, but didn't use all of its packages, we wouldn't
previously care about the transitive dependencies of the packages we
weren't using. However, in the go mod world, once we care about the
repository, we care about all of that repository's transitive
dependencies. AFAICT this doesn't affect vendoring.

Fixes #4116
2019-05-23 14:14:00 -07:00
Daniel McCarney 62b3e5b750 Makefile: remove clean/install/archive targets. (#4204)
They are bit-rotten and Let's Encrypt doesn't use them.

This leaves the Makefile with two jobs: building the project and
building an RPM.
2019-05-07 17:26:05 -07:00
Jacob Hoffman-Andrews cb86f9e850 Copy boulder-va to boulder-remoteva. (#4128)
This will make it easier to distinguish in logs.
2019-03-20 16:07:51 -04:00
Jacob Hoffman-Andrews 22bb47a275 Remove GO15VENDOREXPERIMENT and docker-environment (#3459)
* Remove GO15VENDOREXPERIMENT.

* Remove docker-environment (not used).
2018-02-19 09:06:41 -05:00
Jacob Hoffman-Andrews 580c25286a Switch back to go 1.5 in Travis. (#2261)
* Switch back to go 1.5 in Travis.

* Add back GO15VENDOREXPERIMENT.

* Add GO15VENDOREXPERIMENT to Dockerfile

* Revert FAKE_DNS change.

* Revert "Properly close test servers (#2110)"

* Revert "Close VA HTTP test servers (#2111)"

* Change Godep version to 1.5.

* Standardize on issue number
2016-10-20 14:11:26 -04:00
Roland Bracewell Shoemaker e3266a1684 Switch to Golang 1.6.3 (#2105)
* Switch to golang 1.6

* Update docker image references

* Update godep major version

* Remove GO15VENDOREXPERIMENT references

* Fix errcheck ignore path
2016-08-05 16:35:43 -04:00
Daniel McCarney 2a89063fce Create rpm during CI run. (#2087)
This PR modifies the `test.sh` script to allow a `rpm` value in the `RUN` parameter passed to the script via the environment. When present, `make rpm` is invoked and a good status is required for the build to pass.

The `Makefile` was modified to add a `-f` to the `fpm` invocation used by the `rpm` build task to allow the output rpm to be overwritten if present. Otherwise multiple runs of identical bulld (e.g. on a local dev machine) would collide on the .rpm already being present.

Finally `.travis.yml` is updated to include `rpm` in the `RUN` used during CI such that an RPM is built by default for CI runs. I left the default `RUN` in `test.sh` unmodified, so an RPM will not be built for local runs (e.g. `docker-compose run boulder ./test.sh`).

This fixes #2085
2016-07-26 18:00:36 -04:00
Daniel McCarney 98ffa9be29 Fix `rpm` make target for split config. (#2084)
After #2069 landed we no longer have a `boulder-config.json` file. This breaks the `make rpm` flow because the `rpm` make target has an explicit reference to this file as an argument to `fpm`.

This commit replaces the `test/boulder-config.json` reference with its replacement, the `test/config/` directory.
2016-07-26 14:23:42 -04:00
Jacob Hoffman-Andrews 6f082f397b Improve error logging in test.js (#1829)
Also fix a typo in startservers.py and quote variables in Makefile (provides more meaningful errors when they are unset).
2016-05-19 15:54:53 -07:00
Jacob Hoffman-Andrews e6c17e1717 Switch to new vendor style (#1747)
* Switch to new vendor style.

* Fix metrics generate command.

* Fix miekg/dns types_generate.

* Use generated copies of files.

* Update miekg to latest.

Fixes a problem with `go generate`.

* Set GO15VENDOREXPERIMENT.

* Build in letsencrypt/boulder.

* fix travis more.

* Exclude vendor instead of godeps.

* Replace some ...

* Fix unformatted cmd

* Fix errcheck for vendorexp

* Add GO15VENDOREXPERIMENT to Makefile.

* Temp disable errcheck.

* Restore master fetch.

* Restore errcheck.

* Build with 1.6 also.

* Match statsd.*"

* Skip errcheck unles Go1.6.

* Add other ignorepkg.

* Fix errcheck.

* move errcheck

* Remove go1.6 requirement.

* Put godep-restore with errcheck.

* Remove go1.6 dep.

* Revert master fetch revert.

* Remove -r flag from godep save.

* Set GO15VENDOREXPERIMENT in Dockerfile and remove _worskpace.

* Fix Godep version.
2016-04-18 12:51:36 -07:00
Kane York 9e4066e0c7 Remove std_json build tag
After a review of the logs, it seems that no clients are using
capitalized or duplicate keys in the JWS bodies. Remove the std_json
build tag.
2016-03-22 14:00:33 -07:00
Roland Shoemaker 4d8c7a323f Set std_json build flag in order to preserve case insensitive JSON key parsing 2016-03-15 14:25:03 -07:00
Roland Shoemaker 8e67bd5275 Makefile fixes 2016-02-24 10:36:43 -08:00
Jacob Hoffman-Andrews 5791c00f9e Set GOBIN to a relative path.
This is a revert of https://github.com/letsencrypt/boulder/pull/1474. Building
with that change meant that the Boulder RPM unpacked to
/opt/boulder/tmp/tmp.<generated>/src/github.com/letsencrypt/boulder/ instead of
/opt/boulder.
2016-02-17 10:46:51 -08:00
Jeff Hodges f7ea0290fa use absolute GOBIN path for Go 1.6 2016-02-09 11:53:47 -08:00
Jeff Hodges b3ac3ccf94 ignore the cmd/testdata dir in the Makefile
testdata won't ever be producing a binary, and "testdata" is a fairly
common name to find in Go projects for the tests to use, so just ignore it.
2016-02-02 13:42:07 -08:00
Jacob Hoffman-Andrews ad5ac41d67 Add email templates to RPM.
Also add a test that templates compile and run with current code.
2016-01-25 16:40:58 -08:00
Jacob Hoffman-Andrews 6ef48e2f81 remove pkcs11bench. 2015-10-03 14:21:53 -07:00
Jacob Hoffman-Andrews 17918010dc Allow override of all build flags in Makefile.
I think even the ldflags that did not change between subsequent invocations of
./start.py, e.g. BUILD_HOST_VAR, were different between ./start.py and
`go test ./...`, which would cause test runs to be unnecessarily slow.

Open question: To keep local developer builds fast, maybe we should enable race
detection only in Travis? Otherwise, `go test ./...` runs with one set of
ldflags, and then `ampq-integration-test.py` runs with a different set, which I
think makes both of them slower.
2015-10-03 12:45:06 -07:00
Jacob Hoffman-Andrews b3aca1ff2b Speed up tests.
Make `make` aware of output files so it doesn't always have to rebuild. Also
make it use `go install`, which is faster than building files individually.

Now that make is faster, use it in startservers.py to consolidate building
logic. This also has the handy side-effect that ./start.py exposes useful build
information through /build, whereas before only the .rpm packaged version did.

Additionally, this allows us to remove `make` from the Travis matrix, since we
are running `make` as part of the integration test. This means each PR only
triggers two Travis builds instead of one, which means we will get results from
Travis faster.

Also, change the Travis matrix logic to be a list of actions to run, rather than
a list of actions to skip. That fixes
https://github.com/letsencrypt/boulder/issues/817.

Enumerate specific sections of test.sh to run, rather than sections to skip.

Note: ./start.py now installs into ./bin/ instead of $GOPATH/bin.

Only set up GitHub secret file (for PR status reporting) when available, and
decrypt it into /tmp rather than $HOME, to avoid accidentally caching it once
Travis' caching features are available.

Clone letsencrypt repo into $HOME instead of $TMP, to make it possible to cache
eventually.

Remove unused `mysql` dependency in Travis.

Override default Travis install command to prevent it from adding
Godeps/_workspace to GOPATH. When that happens, it hides failures that should
arise from importing non-vendorized paths.
2015-10-01 16:28:17 -07:00
J.C. Jones 5831a56bca Fix rpm build error on bench test.
RPM Builds were failing because they attempted to package "bin/bin/pkcs11bench"
due to semantics on line 75. This patch renames the target from "bin/pkcs11bench"
to simply "pkcs11bench" to bypass the issue.
2015-09-23 12:17:24 -07:00
Jacob Hoffman-Andrews d05b9b833f Update cfssl to latest master.
This pulls in the pkcs11key change from
https://github.com/cloudflare/cfssl/pull/330, and updates the Boulder code to
match.

Note: This change overwrites the local changes to our vendored CFSSL made in
https://github.com/letsencrypt/boulder/pull/784. That's intentional: The
upstream changes in https://github.com/cloudflare/cfssl/pull/330 accomplish the
same thing, more cleanly.
2015-09-20 20:44:44 -07:00
Jeff Hodges c9e7d3e1f6 add pkcs11bench to Makefile 2015-09-15 16:36:33 -07:00
J.C. Jones f6c934030a Add database migrations to the RPM
- Add database migrations to the RPM, so that they're available
  without needing to obtain the source code.
- Use Go 1.5+ syntax for the build strings
2015-09-01 13:19:53 -07:00
Jeff Hodges 3833276a62 correct Makefile on linux 2015-08-21 14:29:11 -07:00
Jacob Hoffman-Andrews 3afc1bb71a Merge pull request #624 from letsencrypt/mysql_unit
use MariaDB in the unit tests
2015-08-15 01:01:39 -07:00
Jeff Hodges 5e97aa23c6 use MariaDB in the unit tests
And delete the uses of sqlite3
2015-08-14 17:13:15 -07:00
Jeff Hodges 71c2e55f77 add all of cmd/ to test.sh and Makefile
Plus, add to test.sh all future possible packages by using `go list` and
all future possible cmd's to the Makefile with `find`.

Also, fix a bug in external-cert-importer from a bad merge somewhere.
2015-08-14 12:21:44 -07:00
Jacob Hoffman-Andrews 30624a332d Merge pull request #554 from letsencrypt/remove-monolith
Remove monolith
2015-08-05 11:45:44 -07:00
Roland Shoemaker 6dc00d4e7f Typo 2015-07-29 15:51:00 -07:00
Roland Shoemaker abd06564ec Merge branch 'master' into mailer 2015-07-27 12:46:19 -07:00
Jeff Hodges cfcd6dfc88 remove pkcs11 tag for build and test scripts
With #525 in place, we no longer need to worry about setting the pkcs11
tag everywhere.
2015-07-24 16:33:05 -07:00
Roland Shoemaker 960af78955 cleanup 2015-07-23 17:59:03 -07:00
J.C. Jones 79415f3fd1 Support RPM builds for those who want them. 2015-07-23 11:41:52 -07:00
Jacob Hoffman-Andrews 079f019533 Support forked-repo Travis build. 2015-06-18 16:57:39 -07:00
J.C. Jones 76f7b1c1e4 Improve build identification
New example:

2015/06/09 09:20:13 Versions: boulder=(generate_ocsp +0c101f2 Tue Jun  9 16:20:06 UTC 2015) Golang=(devel +46b4f67 Thu Apr 16 20:01:13 2015 +0000) BuildHost=(user@vm.local)
2015-06-09 09:22:29 -07:00
Jacob Hoffman-Andrews 8606973ac4 Add pkcs11 tag to makefile. 2015-06-05 09:21:02 -07:00
Roland Shoemaker a5e54727a4 Fix revoker->ca RPC client, and add admin-revoker to Makefile 2015-05-30 22:12:14 -07:00
J.C. Jones d999f416e1 Add responder to Makefile 2015-05-28 23:11:03 -07:00
J.C. Jones 8766edaa93 Issue #239 - Add a build ID method to WFE, and print Info on startup for all 2015-05-28 11:13:09 -07:00