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

build: setup preview builds for dev-app #23825

Merged

Conversation

devversion
Copy link
Member

@devversion devversion commented Oct 23, 2021

Sets up preview builds for the dev-app. Whenever the dev-app preview
label is applied to pull requests, a Github action will build the
dev-app using RBE and deploy it to a preview channel within a Firebase
project. This can help with reviews of pull requests as an example.

The deployment and building is split up into two individual workflows
to guarantee a secure exeuction of these steps. This follows the
concept as outlined in
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.

In the future, we can try extracting some of this logic into a common
tool in the dev-infra repository.. allowing preview builds to be used
for other things, or in other repositories as well (or switching AIO
away from the rather-complicated docker preview build setup).

Example PR on my fork: devversion#57.

Note: We can also run this regardless of a label, so that previews are always available. We probably would also need a team-owned Firebase instance. Right now this is just using my testing one.

@devversion devversion requested a review from a team as a code owner October 23, 2021 15:28
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 23, 2021
@devversion devversion requested review from jelbourn, crisbeto and josephperrott and removed request for a team October 23, 2021 15:28
@devversion devversion added merge safe target: patch This PR is targeted for the next patch release labels Oct 23, 2021
@devversion devversion force-pushed the build/preview-builds-for-devapp branch from d308a6d to b539fbe Compare October 23, 2021 15:56
@devversion devversion force-pushed the build/preview-builds-for-devapp branch 7 times, most recently from 292095d to 4784df7 Compare October 24, 2021 15:01
@devversion
Copy link
Member Author

@crisbeto updated to have the workflow artifact fetching script as external script. The downside is that we now need to install node modules in the deploy workflow as well, but I was able to share the yarn install logic to avoid duplication; so we are good.

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

.github/workflows/deploy-dev-app.yml Show resolved Hide resolved
scripts/github/fetch-workflow-artifact.js Outdated Show resolved Hide resolved
scripts/github/fetch-workflow-artifact.js Outdated Show resolved Hide resolved
@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Oct 26, 2021
Sets up preview builds for the dev-app. Whenever the `dev-app preview`
label is applied to pull requests, a Github action will build the
dev-app using RBE and deploy it to a preview channel within a Firebase
project.

The deployment and building is split up into two individual workflows
to guarantee a secure exeuction of these steps. This follows the
concept as outlined in https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.

In the future, we can try extracting some of this logic into a common
tool in the dev-infra repository.. allowing preview builds to be used
for other things, or in other repositories as well (or switching AIO
away from the rather-complicated docker preview build setup).
@devversion devversion force-pushed the build/preview-builds-for-devapp branch from aabdb16 to 2f6ee6d Compare October 26, 2021 20:14
@wagnermaciel wagnermaciel merged commit 7ec0139 into angular:master Oct 27, 2021
wagnermaciel pushed a commit that referenced this pull request Oct 27, 2021
* build: setup preview builds for dev-app

Sets up preview builds for the dev-app. Whenever the `dev-app preview`
label is applied to pull requests, a Github action will build the
dev-app using RBE and deploy it to a preview channel within a Firebase
project.

The deployment and building is split up into two individual workflows
to guarantee a secure exeuction of these steps. This follows the
concept as outlined in https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.

In the future, we can try extracting some of this logic into a common
tool in the dev-infra repository.. allowing preview builds to be used
for other things, or in other repositories as well (or switching AIO
away from the rather-complicated docker preview build setup).

* fixup! build: setup preview builds for dev-app

Address feedback

* fixup! build: setup preview builds for dev-app

Update old links

(cherry picked from commit 7ec0139)
wagnermaciel pushed a commit that referenced this pull request Oct 27, 2021
* build: setup preview builds for dev-app

Sets up preview builds for the dev-app. Whenever the `dev-app preview`
label is applied to pull requests, a Github action will build the
dev-app using RBE and deploy it to a preview channel within a Firebase
project.

The deployment and building is split up into two individual workflows
to guarantee a secure exeuction of these steps. This follows the
concept as outlined in https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.

In the future, we can try extracting some of this logic into a common
tool in the dev-infra repository.. allowing preview builds to be used
for other things, or in other repositories as well (or switching AIO
away from the rather-complicated docker preview build setup).

* fixup! build: setup preview builds for dev-app

Address feedback

* fixup! build: setup preview builds for dev-app

Update old links

(cherry picked from commit 7ec0139)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants