Skip to content

Commit fa982e7

Browse files
authored
Build arm64 packages for Debian and RPM (#3503)
1 parent a8073cc commit fa982e7

File tree

221 files changed

+6732
-2373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+6732
-2373
lines changed

.github/auto-label.yml

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ vendor/atmos:
4141
vendor/awless:
4242
- any: ["vendor/awless/**"]
4343
all: ["!bin/**", "!tasks/**"]
44+
vendor/aws-copilot-cli:
45+
- any: ["vendor/aws-copilot-cli/**"]
46+
all: ["!bin/**", "!tasks/**"]
4447
vendor/aws-iam-authenticator:
4548
- any: ["vendor/aws-iam-authenticator/**"]
4649
all: ["!bin/**", "!tasks/**"]

.github/package-template.yml

+43-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,30 @@ on:
2828
- vendor/%PACKAGE_NAME%/**
2929
- .github/workflows/%PACKAGE_NAME%.yml
3030

31+
#bridgecrew:skip=BC_REPO_GITHUB_ACTION_7:The whole point of the workflow dispatch is to feed in a version
32+
workflow_dispatch:
33+
inputs:
34+
package_version_override:
35+
description: 'Version of %PACKAGE_NAME% package to build. Defaults to vendor/%PACKAGE_NAME%/VERSION.'
36+
required: false
37+
type: string
38+
release_number_override:
39+
description: 'Zero-based release number of %PACKAGE_NAME% package to publish. Defaults to vendor/%PACKAGE_NAME%/RELEASE.'
40+
required: false
41+
type: string
42+
43+
env:
44+
%PACKAGE_NAME%_VERSION: ${{ github.event.inputs.package_version_override }}
45+
%PACKAGE_NAME%_RELEASE: ${{ github.event.inputs.release_number_override }}
46+
3147
jobs:
3248
matrix:
3349
if: github.event_name != 'schedule'
3450
runs-on: ubuntu-latest
3551
outputs:
3652
package-enabled: ${{ steps.info.outputs.package_enabled }}
3753
package-matrix: ${{steps.info.outputs.package_matrix}}
54+
arch-matrix: ${{steps.info.outputs.arch_matrix}}
3855
apk-enabled: ${{ steps.info.outputs.package_enabled == 'true' && steps.info.outputs.apk_package_enabled == 'true' }}
3956
steps:
4057
- uses: actions/checkout@v3
@@ -71,7 +88,12 @@ jobs:
7188
PACKAGER_PRIVKEY: /dev/shm/[email protected]
7289
PACKAGER_PUBKEY: ${{github.workspace}}/artifacts/[email protected]
7390

74-
container: cloudposse/packages-apkbuild:${{matrix.alpine}}
91+
container:
92+
image: cloudposse/packages-apkbuild:${{matrix.alpine}}
93+
credentials:
94+
username: ${{ secrets.DOCKERHUB_USERNAME }}
95+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
96+
7597
steps:
7698
# Checkout the packages repo so we can build the packages as a monorepo
7799
- name: "Checkout source code at current commit"
@@ -138,12 +160,25 @@ jobs:
138160
github.event_name != 'schedule' && needs.matrix.outputs.package-enabled != 'false'
139161
&& needs.matrix.outputs.package-matrix != '[]' && needs.matrix.outputs.package-matrix != '["apk"]'
140162
141-
runs-on: ubuntu-latest
142163
strategy:
143164
matrix:
144165
package-type: ${{ fromJSON(needs.matrix.outputs.package-matrix) }}
166+
arch: ${{ fromJSON(needs.matrix.outputs.arch-matrix) }}
145167
exclude:
146168
- package-type: 'apk'
169+
include:
170+
# Default value for runs-on. Original matrix values will not be overridden, but added ones (like runs-on) can be.
171+
# See https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
172+
- runs-on:
173+
- "self-hosted"
174+
- "arm64"
175+
# By including `arch: amd64` here, we override the `runs-on` value `arch` is `amd64`.
176+
# This also forces the matrix to include `arch: amd64` even if it is not in the original matrix.
177+
# This is why we do not default for amd64 and then override for arm64.
178+
- arch: amd64
179+
runs-on:
180+
- "ubuntu-latest"
181+
runs-on: ${{ matrix.runs-on }}
147182
env:
148183
# We are in a bit of a bind here because of how GitHub actions work as of 2020-11-19
149184
# Although the "workspace" is mounted to the container, it is not mounted
@@ -159,7 +194,12 @@ jobs:
159194
PACKAGE_RELPATH: artifacts/${{matrix.package-type}}/any-version
160195

161196
# Unfortunately, there is no reasonable way to configure the docker image tag based on the package-type
162-
container: cloudposse/packages-${{matrix.package-type}}build:latest
197+
container:
198+
image: cloudposse/packages-${{matrix.package-type}}build:latest
199+
credentials:
200+
username: ${{ secrets.DOCKERHUB_USERNAME }}
201+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
202+
163203
steps:
164204
# Checkout the packages repo so we can build the packages as a monorepo
165205
- name: "Checkout source code at current commit"

.github/workflows/amazon-ecr-credential-helper.yml

+43-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,30 @@ on:
2828
- vendor/amazon-ecr-credential-helper/**
2929
- .github/workflows/amazon-ecr-credential-helper.yml
3030

31+
#bridgecrew:skip=BC_REPO_GITHUB_ACTION_7:The whole point of the workflow dispatch is to feed in a version
32+
workflow_dispatch:
33+
inputs:
34+
package_version_override:
35+
description: 'Version of amazon-ecr-credential-helper package to build. Defaults to vendor/amazon-ecr-credential-helper/VERSION.'
36+
required: false
37+
type: string
38+
release_number_override:
39+
description: 'Zero-based release number of amazon-ecr-credential-helper package to publish. Defaults to vendor/amazon-ecr-credential-helper/RELEASE.'
40+
required: false
41+
type: string
42+
43+
env:
44+
amazon-ecr-credential-helper_VERSION: ${{ github.event.inputs.package_version_override }}
45+
amazon-ecr-credential-helper_RELEASE: ${{ github.event.inputs.release_number_override }}
46+
3147
jobs:
3248
matrix:
3349
if: github.event_name != 'schedule'
3450
runs-on: ubuntu-latest
3551
outputs:
3652
package-enabled: ${{ steps.info.outputs.package_enabled }}
3753
package-matrix: ${{steps.info.outputs.package_matrix}}
54+
arch-matrix: ${{steps.info.outputs.arch_matrix}}
3855
apk-enabled: ${{ steps.info.outputs.package_enabled == 'true' && steps.info.outputs.apk_package_enabled == 'true' }}
3956
steps:
4057
- uses: actions/checkout@v3
@@ -71,7 +88,12 @@ jobs:
7188
PACKAGER_PRIVKEY: /dev/shm/[email protected]
7289
PACKAGER_PUBKEY: ${{github.workspace}}/artifacts/[email protected]
7390

74-
container: cloudposse/packages-apkbuild:${{matrix.alpine}}
91+
container:
92+
image: cloudposse/packages-apkbuild:${{matrix.alpine}}
93+
credentials:
94+
username: ${{ secrets.DOCKERHUB_USERNAME }}
95+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
96+
7597
steps:
7698
# Checkout the packages repo so we can build the packages as a monorepo
7799
- name: "Checkout source code at current commit"
@@ -138,12 +160,25 @@ jobs:
138160
github.event_name != 'schedule' && needs.matrix.outputs.package-enabled != 'false'
139161
&& needs.matrix.outputs.package-matrix != '[]' && needs.matrix.outputs.package-matrix != '["apk"]'
140162
141-
runs-on: ubuntu-latest
142163
strategy:
143164
matrix:
144165
package-type: ${{ fromJSON(needs.matrix.outputs.package-matrix) }}
166+
arch: ${{ fromJSON(needs.matrix.outputs.arch-matrix) }}
145167
exclude:
146168
- package-type: 'apk'
169+
include:
170+
# Default value for runs-on. Original matrix values will not be overridden, but added ones (like runs-on) can be.
171+
# See https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
172+
- runs-on:
173+
- "self-hosted"
174+
- "arm64"
175+
# By including `arch: amd64` here, we override the `runs-on` value `arch` is `amd64`.
176+
# This also forces the matrix to include `arch: amd64` even if it is not in the original matrix.
177+
# This is why we do not default for amd64 and then override for arm64.
178+
- arch: amd64
179+
runs-on:
180+
- "ubuntu-latest"
181+
runs-on: ${{ matrix.runs-on }}
147182
env:
148183
# We are in a bit of a bind here because of how GitHub actions work as of 2020-11-19
149184
# Although the "workspace" is mounted to the container, it is not mounted
@@ -159,7 +194,12 @@ jobs:
159194
PACKAGE_RELPATH: artifacts/${{matrix.package-type}}/any-version
160195

161196
# Unfortunately, there is no reasonable way to configure the docker image tag based on the package-type
162-
container: cloudposse/packages-${{matrix.package-type}}build:latest
197+
container:
198+
image: cloudposse/packages-${{matrix.package-type}}build:latest
199+
credentials:
200+
username: ${{ secrets.DOCKERHUB_USERNAME }}
201+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
202+
163203
steps:
164204
# Checkout the packages repo so we can build the packages as a monorepo
165205
- name: "Checkout source code at current commit"

.github/workflows/amtool.yml

+43-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,30 @@ on:
2828
- vendor/amtool/**
2929
- .github/workflows/amtool.yml
3030

31+
#bridgecrew:skip=BC_REPO_GITHUB_ACTION_7:The whole point of the workflow dispatch is to feed in a version
32+
workflow_dispatch:
33+
inputs:
34+
package_version_override:
35+
description: 'Version of amtool package to build. Defaults to vendor/amtool/VERSION.'
36+
required: false
37+
type: string
38+
release_number_override:
39+
description: 'Zero-based release number of amtool package to publish. Defaults to vendor/amtool/RELEASE.'
40+
required: false
41+
type: string
42+
43+
env:
44+
amtool_VERSION: ${{ github.event.inputs.package_version_override }}
45+
amtool_RELEASE: ${{ github.event.inputs.release_number_override }}
46+
3147
jobs:
3248
matrix:
3349
if: github.event_name != 'schedule'
3450
runs-on: ubuntu-latest
3551
outputs:
3652
package-enabled: ${{ steps.info.outputs.package_enabled }}
3753
package-matrix: ${{steps.info.outputs.package_matrix}}
54+
arch-matrix: ${{steps.info.outputs.arch_matrix}}
3855
apk-enabled: ${{ steps.info.outputs.package_enabled == 'true' && steps.info.outputs.apk_package_enabled == 'true' }}
3956
steps:
4057
- uses: actions/checkout@v3
@@ -71,7 +88,12 @@ jobs:
7188
PACKAGER_PRIVKEY: /dev/shm/[email protected]
7289
PACKAGER_PUBKEY: ${{github.workspace}}/artifacts/[email protected]
7390

74-
container: cloudposse/packages-apkbuild:${{matrix.alpine}}
91+
container:
92+
image: cloudposse/packages-apkbuild:${{matrix.alpine}}
93+
credentials:
94+
username: ${{ secrets.DOCKERHUB_USERNAME }}
95+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
96+
7597
steps:
7698
# Checkout the packages repo so we can build the packages as a monorepo
7799
- name: "Checkout source code at current commit"
@@ -138,12 +160,25 @@ jobs:
138160
github.event_name != 'schedule' && needs.matrix.outputs.package-enabled != 'false'
139161
&& needs.matrix.outputs.package-matrix != '[]' && needs.matrix.outputs.package-matrix != '["apk"]'
140162
141-
runs-on: ubuntu-latest
142163
strategy:
143164
matrix:
144165
package-type: ${{ fromJSON(needs.matrix.outputs.package-matrix) }}
166+
arch: ${{ fromJSON(needs.matrix.outputs.arch-matrix) }}
145167
exclude:
146168
- package-type: 'apk'
169+
include:
170+
# Default value for runs-on. Original matrix values will not be overridden, but added ones (like runs-on) can be.
171+
# See https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
172+
- runs-on:
173+
- "self-hosted"
174+
- "arm64"
175+
# By including `arch: amd64` here, we override the `runs-on` value `arch` is `amd64`.
176+
# This also forces the matrix to include `arch: amd64` even if it is not in the original matrix.
177+
# This is why we do not default for amd64 and then override for arm64.
178+
- arch: amd64
179+
runs-on:
180+
- "ubuntu-latest"
181+
runs-on: ${{ matrix.runs-on }}
147182
env:
148183
# We are in a bit of a bind here because of how GitHub actions work as of 2020-11-19
149184
# Although the "workspace" is mounted to the container, it is not mounted
@@ -159,7 +194,12 @@ jobs:
159194
PACKAGE_RELPATH: artifacts/${{matrix.package-type}}/any-version
160195

161196
# Unfortunately, there is no reasonable way to configure the docker image tag based on the package-type
162-
container: cloudposse/packages-${{matrix.package-type}}build:latest
197+
container:
198+
image: cloudposse/packages-${{matrix.package-type}}build:latest
199+
credentials:
200+
username: ${{ secrets.DOCKERHUB_USERNAME }}
201+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
202+
163203
steps:
164204
# Checkout the packages repo so we can build the packages as a monorepo
165205
- name: "Checkout source code at current commit"

.github/workflows/argocd.yml

+43-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,30 @@ on:
2828
- vendor/argocd/**
2929
- .github/workflows/argocd.yml
3030

31+
#bridgecrew:skip=BC_REPO_GITHUB_ACTION_7:The whole point of the workflow dispatch is to feed in a version
32+
workflow_dispatch:
33+
inputs:
34+
package_version_override:
35+
description: 'Version of argocd package to build. Defaults to vendor/argocd/VERSION.'
36+
required: false
37+
type: string
38+
release_number_override:
39+
description: 'Zero-based release number of argocd package to publish. Defaults to vendor/argocd/RELEASE.'
40+
required: false
41+
type: string
42+
43+
env:
44+
argocd_VERSION: ${{ github.event.inputs.package_version_override }}
45+
argocd_RELEASE: ${{ github.event.inputs.release_number_override }}
46+
3147
jobs:
3248
matrix:
3349
if: github.event_name != 'schedule'
3450
runs-on: ubuntu-latest
3551
outputs:
3652
package-enabled: ${{ steps.info.outputs.package_enabled }}
3753
package-matrix: ${{steps.info.outputs.package_matrix}}
54+
arch-matrix: ${{steps.info.outputs.arch_matrix}}
3855
apk-enabled: ${{ steps.info.outputs.package_enabled == 'true' && steps.info.outputs.apk_package_enabled == 'true' }}
3956
steps:
4057
- uses: actions/checkout@v3
@@ -71,7 +88,12 @@ jobs:
7188
PACKAGER_PRIVKEY: /dev/shm/[email protected]
7289
PACKAGER_PUBKEY: ${{github.workspace}}/artifacts/[email protected]
7390

74-
container: cloudposse/packages-apkbuild:${{matrix.alpine}}
91+
container:
92+
image: cloudposse/packages-apkbuild:${{matrix.alpine}}
93+
credentials:
94+
username: ${{ secrets.DOCKERHUB_USERNAME }}
95+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
96+
7597
steps:
7698
# Checkout the packages repo so we can build the packages as a monorepo
7799
- name: "Checkout source code at current commit"
@@ -138,12 +160,25 @@ jobs:
138160
github.event_name != 'schedule' && needs.matrix.outputs.package-enabled != 'false'
139161
&& needs.matrix.outputs.package-matrix != '[]' && needs.matrix.outputs.package-matrix != '["apk"]'
140162
141-
runs-on: ubuntu-latest
142163
strategy:
143164
matrix:
144165
package-type: ${{ fromJSON(needs.matrix.outputs.package-matrix) }}
166+
arch: ${{ fromJSON(needs.matrix.outputs.arch-matrix) }}
145167
exclude:
146168
- package-type: 'apk'
169+
include:
170+
# Default value for runs-on. Original matrix values will not be overridden, but added ones (like runs-on) can be.
171+
# See https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
172+
- runs-on:
173+
- "self-hosted"
174+
- "arm64"
175+
# By including `arch: amd64` here, we override the `runs-on` value `arch` is `amd64`.
176+
# This also forces the matrix to include `arch: amd64` even if it is not in the original matrix.
177+
# This is why we do not default for amd64 and then override for arm64.
178+
- arch: amd64
179+
runs-on:
180+
- "ubuntu-latest"
181+
runs-on: ${{ matrix.runs-on }}
147182
env:
148183
# We are in a bit of a bind here because of how GitHub actions work as of 2020-11-19
149184
# Although the "workspace" is mounted to the container, it is not mounted
@@ -159,7 +194,12 @@ jobs:
159194
PACKAGE_RELPATH: artifacts/${{matrix.package-type}}/any-version
160195

161196
# Unfortunately, there is no reasonable way to configure the docker image tag based on the package-type
162-
container: cloudposse/packages-${{matrix.package-type}}build:latest
197+
container:
198+
image: cloudposse/packages-${{matrix.package-type}}build:latest
199+
credentials:
200+
username: ${{ secrets.DOCKERHUB_USERNAME }}
201+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
202+
163203
steps:
164204
# Checkout the packages repo so we can build the packages as a monorepo
165205
- name: "Checkout source code at current commit"

0 commit comments

Comments
 (0)