Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not commit build artifacts #218

Closed
dmethvin-gov opened this issue Aug 10, 2018 · 3 comments · Fixed by #295
Closed

Do not commit build artifacts #218

dmethvin-gov opened this issue Aug 10, 2018 · 3 comments · Fixed by #295
Assignees
Labels
[practice] engineering Engineering related work
Milestone

Comments

@dmethvin-gov
Copy link
Contributor

For a fleeting moment we had a git pre-push hook in place but it didn't do what we wanted anyway.

If we are going to commit build artifacts with every commit, we need some way to ensure that they exactly represent the source committed along with them. It's a bit tricky, the CI can't do it because it's too late by then. We need to have each PR rebased against master at the point where it's landed and then rebuild the artifacts before committing. I don't see any GitHub hooks or API to do that. It's doable if one of us lands the PRs manually.

One possibility is to not commit built artifacts except on production. That wouldn't affect users of the library since they should be using versioned releases that would still include build artifacts. There are cons to that since it makes testing PRs a two-step process (you have to build after pulling).

@AndrewRayCode
Copy link

You don't need to commit anything since this is an npm package

If you want to provide a binary download, have maintainers compile a new version when the package.json version is bumped and upload it to a CDN. Cirlce could probably do this too automatically in response to detection of package.json version changes

@jcmeloni-usds
Copy link
Contributor

@dmethvin-gov Did we land on a strategy/plan? I've never been a fan of committing any build artifacts, but don't know the backstory here if there's a reason that we started doing it and it needs to stay.

@dmethvin-gov
Copy link
Contributor Author

I completely agree, I'd prefer to not commit any. Right now vets.gov is pulling in builds via a GitHub hash so they needed it in the past, but I think it's safe to get rid of them now. The npm releases will have everything built.

After our discussions with the vets.gov team yesterday I have some thoughts about how to do this, once we've finished Phase 1 I can get this done.

@jcmeloni-usds jcmeloni-usds added this to the 2.0.0-alpha.1 milestone Sep 20, 2018
@jcmeloni-usds jcmeloni-usds changed the title Strategy for committing build artifacts Do not commit build artifacts Sep 20, 2018
dmethvin-gov added a commit to dmethvin-gov/us-forms-system that referenced this issue Oct 4, 2018
@dmethvin-gov dmethvin-gov self-assigned this Oct 4, 2018
dmethvin-gov added a commit to dmethvin-gov/us-forms-system that referenced this issue Oct 23, 2018
dmethvin-gov added a commit that referenced this issue Oct 29, 2018
* [WIP] Remove build artifacts from the repo

Fixes #218

* Tidy up npm scripts and create a ci script

* CircleCI has a dumb shell

* Reduce some of the console noise

* Fix rebase mistake

* Move all build-related tasks into `npm run build`
dmethvin-gov added a commit to dmethvin-gov/us-forms-system that referenced this issue Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[practice] engineering Engineering related work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants