-
Notifications
You must be signed in to change notification settings - Fork 21
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
Create jobs to separate AWS environments from build environments #481
base: master
Are you sure you want to change the base?
Conversation
763a166
to
d43072d
Compare
os_version=$(git describe --abbrev=0) | ||
echo "os_version=${os_version#v*}" >>"${GITHUB_OUTPUT}" | ||
|
||
meta_balena_version="$(balena_lib_get_meta_balena_base_version)" |
Check failure
Code scanning / octoscan
Write to "$GITHUB_OUTPUT" in a bash script. Error
|
||
dt_arch="$(balena_lib_get_dt_arch "${MACHINE}")" | ||
echo "dt_arch=${dt_arch}" >>"${GITHUB_OUTPUT}" | ||
|
Check failure
Code scanning / octoscan
Use of "git checkout" in a bash script with a potentially dangerous reference. Error
env: | ||
# renovate: datasource=github-tags depName=aws/aws-cli | ||
AWSCLI_VERSION: 2.22.10 | ||
with: |
Check failure
Code scanning / octoscan
Write to "$GITHUB_OUTPUT" in a bash script. Error
3124776
to
5c257c4
Compare
This allows more granular control over which environments are used for which steps, and avoids requiring a single environment to define how to build, sign, and publish. This is better for security as it allows each job to only have the secrets it needs, and not all secrets for all steps. We retain backwards compatibility by falling back to the original monolith environment input for now. Change-type: minor Signed-off-by: Kyle Harding <[email protected]>
Signed-off-by: Kyle Harding <[email protected]>
This key was only used to fetch the supervisor image name from the API, but that endpoint does not need auth as the supervisor images are public. Change-type: patch Signed-off-by: Kyle Harding <[email protected]>
Signed-off-by: Kyle Harding <[email protected]>
script: | | ||
const result = await fetch(`https://api.${process.env.API_ENV}/${process.env.TRANSLATION}/device_type?\$filter=slug%20eq%20%27${process.env.DEVICE_SLUG}%27&\$select=slug,is_private`, { | ||
headers: { | ||
'Content-type': 'application/json', |
Check failure
Code scanning / octoscan
Write to "$GITHUB_OUTPUT" in a bash script. Error
'Authorization': `Bearer ${{ secrets.BALENA_API_DEPLOY_KEY }}` | ||
} | ||
}) | ||
const data = await result.json() |
Check failure
Code scanning / octoscan
Write to "$GITHUB_OUTPUT" in a bash script. Error
const data = await result.json() | ||
console.log(JSON.stringify(data, null, 2)) | ||
return data.d[0].is_private | ||
|
Check failure
Code scanning / octoscan
Write to "$GITHUB_OUTPUT" in a bash script. Error
f005d6e
to
a17f292
Compare
Signed-off-by: Kyle Harding <[email protected]>
a17f292
to
f446d4e
Compare
This allows more granular control over which environments are used for which steps, and avoids requiring a single environment to define how to build, sign, and publish.
Initially this workflow will still fallback to the existing monolith environments and the behaviour should be unchanged.
Change-type: minor