-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(github-actions): setup action for enabling bazel remote exec (#898)
This will be useful for actions like the dev-app previews in the components repo. We wouldn't want to use CircleCI there. The action relies on the Circle logic- but that is acceptable since CircleCI is still our primary provider here. PR Close #898
- Loading branch information
1 parent
9bc16c6
commit bea95d6
Showing
5 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
load("@build_bazel_rules_nodejs//:index.bzl", "generated_file_test") | ||
|
||
package(default_visibility = ["//github-actions/slash-commands:__subpackages__"]) | ||
|
||
generated_file_test( | ||
name = "setup_remote_exec_script", | ||
src = "setup_remote_exec.sh", | ||
generated = "//circleci-orb/scripts/setup-bazel-remote-exec:script", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: 'Setup Bazel remote execution' | ||
description: 'Sets up Bazel remote execution.' | ||
author: 'Angular' | ||
inputs: | ||
bazelrc: | ||
description: | | ||
If specified, the given `bazelrc` file is being updated to always run | ||
with the `--config=remote` flag. | ||
runs: | ||
using: composite | ||
steps: | ||
- run: ${{github.action_path}}/setup_remote_exec.sh | ||
env: | ||
BAZELRC_PATH: ${{ inputs.bazelrc }} | ||
NGAT: 'HlA2BJMJAXPDI1UAn5gytw==' | ||
shell: bash |
14 changes: 14 additions & 0 deletions
14
github-actions/setup-bazel-remote-exec/setup_remote_exec.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
node <<"NGEOF" | ||
"use strict";(()=>{var n=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,s)=>(typeof require<"u"?require:r)[s]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var u=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var p=e=>new Uint8Array(Buffer.from(e,"base64"));var g=u((A,_)=>{_.exports=p("M+ThJ6FvJx5X3mB3AOFdU7EhCathz6gP3c7YsHkQQiqdn1hKjQ15i/uSc07q9n/8qGhzmfoM1w5H0fMy6FTdsMFjoI9EVoWuPuxkB22UJgey1LoEj9HlJM73vOZN3HuU5rIPS1nNviM7yOELIrLdIMnPJIlj66IyalbX7RALp8azsF901CJ6MqmsoRDwMU2s3GWJ5FBxU4y5LvQzvV/dzBs7Wg5Xsz5Hl6+UVkDHzkmpC6fxgUv87MUm89CYXca0rZTg1e/AUFAaHWv9UoTF+bIa+mKPjwKYZ4SC/ooOwHGxnGb8eQTFkAF5NJuh7MTvHeXffNirv8uUNK44LHTSGLF/mzkWr1lyzQw5A8Wf1Y55Nmv1BRHUb0p5b5aKQoLi1KfKw85wRTQdFrBKHm9hfWUXSBdz5wNg0EF7BESnsdxEd5Uv7ZKUTcaI7FT5wXVJZ8kzapPNV6utVJAb83GFe64r/vtoQBYjdsDdukdzsKyIBKvIkROR1LXfMG4i+5CI7B7PTRZrl3TPuKkY9gaviDhb8SPzmTDF1UX/ib0AWEGig0Yram0qVQ+hSzWbEU2Hoj24YQ3HmWbo8zJvn70hRBCu9GNiiHpw5hIzp9VnhhzKQfx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FQPas32bOjLrYNQdmmFtc1w8wPYGwrsd1EVmFqCAsVoXi/6CCs2ckVkHCbNdNN7niu9ZsILPFnXVQhg0V0dviwLmazDbthE9JmDNT7xS69icDETS1rUraemeXuDshKvws9Kq17dsLMG8ChdtsS2K8h8kdXTY/PIo1Y7czJTpFSnU5ybvQmKTT4vwkZgycnBXfb1zCITmMGif3cGkDIQ5v5XPUNePmMSHw30klFhviN/mkjyXMheXOZ+x7PWxdig1x38dq3S9+6JJC9PNX9UYHbw9g8R3NO")});var k=u(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.iv=t.k=t.at=t.alg=void 0;var y=process.env.CIRCLE_PROJECT_USERNAME??process.env.GITHUB_REPOSITORY_OWNER;t.alg="aes-256-gcm";t.at=process.env.NGAT;t.k=y.padEnd(32,"<");t.iv="000003213213123213"});var q=u(o=>{var c=o&&o.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0});var M=c(g()),i=k(),m=n("crypto"),f=c(n("path")),a=c(n("fs")),w=c(n("os"));async function E(e){let r=M.default,s=(0,m.createDecipheriv)(i.alg,i.k,i.iv).setAuthTag(Buffer.from(i.at,"base64")),v=s.update(r,void 0,"utf8")+s.final("utf8"),l=w.default.platform()==="win32"?f.default.join(process.env.APPDATA,"gcloud/application_default_credentials.json"):f.default.join(process.env.HOME,".config/gcloud/application_default_credentials.json");if(await a.default.promises.mkdir(f.default.dirname(l),{recursive:!0}),await a.default.promises.writeFile(l,v,"utf8"),e){let d=await R(e);d+=` | ||
build --config=remote`,await a.default.promises.writeFile(e,d,"utf8")}}async function R(e){try{return await a.default.promises.readFile(e,"utf8")}catch{return""}}E(process.env.BAZELRC_PATH).catch(e=>{console.error(e),process.exitCode=1})});q();})(); | ||
/** | ||
* @license | ||
* Copyright Google LLC All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
//# sourceMappingURL=bundle.js.map | ||
NGEOF |