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

Add deploy/build scripts to decouple build process from identity-devops. #1989

Merged
merged 2 commits into from
Feb 15, 2018

Conversation

brodygov
Copy link
Contributor

Previously these deploy steps were performed by chef cookbooks in the identity-devops repo. This made it more difficult to make changes like moving from npm to yarn or switching to webpacker because we had to tightly coordinate rolling out changes in sync between identity-idp and identity-devops.

With these changes, move build bootstrapping steps into the identity-idp repo so that the idp repo knows how to bootstrap itself.

**Why**:

Previously these deploy steps were performed by chef cookbooks in the
identity-devops repo. This was an abstraction layer violation because it
required identity-devops to be aware of the internals of how
identity-idp builds and bootstrapps the application, which made it more
difficult to make changes.

**How**:

Move several build steps into a build script in the identity-idp repo,
which is called at boostrapping time by identity-devops cookbooks.
@jmhooper
Copy link
Member

What would be the best way to test changes like the webpacker before starting the release so we'll be aware of issues? My thinking is that before we merged the PR we should have tried to deploy that code to QA. Should we do something similar here?

@brodygov
Copy link
Contributor Author

Ideally deploys would be fast and easy enough that you can deploy a feature branch to an environment and then move it back to master. Improvements there are still a ways off. In the meantime, one option would be to split dev and qa to keep one on master and the other on a stages/env branch.

Right now dev/qa both just always deploy from master, which makes it harder to test a branch prior to merging it. We can also designate a different environment for this if the dev/qa naming would be confusing.

**Why**:

The rake assets:precompile process has to be run after deploy/activate
because it relies on the full database configuration being available.

We still want to run as many of the build steps earlier so that they can
be part of a static deploy artifact in a future build system.

**How**:

Create a separate build-post-config script. The full order of
bootstrapping will now be:

- deploy/build
- deploy/activate
- deploy/build-post-config
@brodygov brodygov merged commit 16ad503 into master Feb 15, 2018
@brodygov brodygov deleted the brody/build-script branch February 15, 2018 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants