Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/example_mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,35 @@ jobs:
oc version
opm version

latest-version-linux-arm64:
name: Latest OCP tools on linux arm64
strategy:
fail-fast: false
matrix:
cache: [ true, false ]
runs-on: ubuntu-24.04-arm

steps:
- uses: actions/checkout@v2

- uses: ./
id: install_clients
with:
source: ${{ env.SOURCE }}
skip_cache: ${{ matrix.cache }}
oc: "latest"
openshift-install: "latest"

- name: Echo output of installer
if: always()
run: echo "${{ steps.install_clients.outputs.installed }}"

- name: Run installed tools
run: |
set -x
oc version
openshift-install version

latest-version-linux-windows:
name: Install CRC
strategy:
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/util/file-finder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ export async function findMatchingClient(source: string, client: InstallableClie
// Since directory name for opm is ocp (in case of mirror)
// but this filter pipeline is not valid for opm when source is github
else if (ClientDetailOverrides[client]?.mirror?.directoryName === "ocp" && source !== GITHUB) {
// the ocp directory is amd64 only,
// and we have to filter out the other client we're not interested in
// we have to filter out the other client we're not interested in
// - ie remove 'oc' if we're installing 'openshift-install'.
filters = [
filterByOS,
filterByArch,
filterByExecutable.bind(client),
filterByVersioned.bind(clientVersion),
filterByZipped,
Expand Down
9 changes: 7 additions & 2 deletions src/util/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,21 @@ export function filterByOS(filename: string): boolean {
return fileNameLowercase.includes("linux");
}

const ALL_ARCH_IDENTIFIERS = [ "amd64", "x86_64", "64bit", "arm64", "aarch64", "ppc64le", "s390x" ];

function hasNoArchIndicator(fileNameLowercase: string): boolean {
return ALL_ARCH_IDENTIFIERS.every((id) => !fileNameLowercase.includes(id));
}

export function filterByArch(filename: string): boolean {
const fileNameLowercase = filename.toLowerCase();
const arch = getArch();
if (arch === "arm64") {
return fileNameLowercase.includes(arch) || fileNameLowercase.includes("aarch64");
}
if (arch === "amd64") {
// adding "64bit" as most of the binaries in GitHub release has "64bit" for "amd64"
return fileNameLowercase.includes(arch) || fileNameLowercase.includes("64bit")
|| fileNameLowercase.includes("x86_64");
|| fileNameLowercase.includes("x86_64") || hasNoArchIndicator(fileNameLowercase);
}
return fileNameLowercase.includes(arch);
}
Expand Down