Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

Add Heroku GitHub integration #589

Merged
merged 1 commit into from
Nov 8, 2018

Conversation

helfi92
Copy link
Contributor

@helfi92 helfi92 commented Nov 5, 2018

I added the following env vars in Heroku https://github.com/taskcluster/taskcluster-tools/blob/46b8ccb2f209f4dc7a5ea667be29d0233a9b82b5/.env. I did however notice there were 2 additional variables only defined in the Travis site, namely AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. I don't see them being used in the repository. Do we need them?

Once this is merged and things look ok, we should enable automatic deploys from Heroku.

Relates to #587.

@helfi92 helfi92 self-assigned this Nov 5, 2018
@helfi92 helfi92 requested a review from djmitche November 5, 2018 16:49
@eliperelman
Copy link
Contributor

One reason this was moved from Heroku to Travis was to not pay the cost of 2 builds per deploy. Meaning from a merge to production could take upwards of 30 minutes.

@helfi92
Copy link
Contributor Author

helfi92 commented Nov 5, 2018

@eliperelman Which 2 builds are you referring to? This PR removes the build from Travis.

@eliperelman
Copy link
Contributor

The settings in Heroku, in the past, are to not deploy a master branch until the build passes in CI. This is to keep broken builds from being deployed to production. This means the master branch builds in both Travis and Heroku.

@eliperelman
Copy link
Contributor

I guess I'm wondering why you would want to remove Travis and risk deploying broken builds.

@helfi92
Copy link
Contributor Author

helfi92 commented Nov 5, 2018

This is to keep broken builds from being deployed to production

I thought deploys won't happen if yarn build exits with a non-zero code. I guess I was wrong. I'll add back Travis.

@eliperelman We are switching the Mozilla Heroku team to have SSO login and so there are extra security guidelines to follow to generate non-expiry access tokens (like regenerating the access token). Given that taskcluster-tools is going away soon, we thought we should just stop deploying from Travis even if there's a performance penalty to avoid having to generate a new access token. The new process at Mozilla requires creating a new service account to manage the app for non-expiry tokens.

@helfi92 helfi92 force-pushed the heroku-github-integration branch from e89a8d3 to e88d19d Compare November 5, 2018 17:11
@helfi92 helfi92 changed the title Add Heroku GitHub integration and remove Travis Add Heroku GitHub integration Nov 5, 2018
@djmitche
Copy link
Contributor

djmitche commented Nov 5, 2018

I'm for whatever is quickest here to keep the focus on tc-web. If that means we run a risk of deploying something with a broken build, that's OK by me -- I think it's rare to click "merge" on a red PR anyway. And, since we don't have any testing, there's not much to prevent shipping a "broken" master anyway, outside of "so broken that yarn build fails" :)

Copy link
Contributor

@djmitche djmitche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little surprised that Heroku deploys something if the build process fails. I know it happily deploys dynos even if they crash on startup (a "feature" Kubernetes happily does not share), but I feel like I've seen build failures abort a deploy before. Anyway, it's a risk I'm willing to take if you are :)

@helfi92
Copy link
Contributor Author

helfi92 commented Nov 7, 2018

@djmitche I noticed there were 2 additional variables only defined in the Travis site, namely AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. I don't see them being used in the repository. Do we need them? I wonder why they were there in the first place.

@djmitche
Copy link
Contributor

djmitche commented Nov 7, 2018

We used to upload the built site from Travis to an S3 bucket, so those were probably in place to support that upload. If you look up the Access Key ID in the IAM console, you can probably find the relevant IAM user and delete it.

@helfi92 helfi92 merged commit e76b5df into taskcluster:master Nov 8, 2018
helfi92 added a commit that referenced this pull request Nov 8, 2018
helfi92 added a commit that referenced this pull request Nov 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants