Skip to content

Commit

Permalink
[build] Add arm64 odo binaries into the build
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
  • Loading branch information
vrubezhny committed Nov 16, 2023
1 parent cb5240d commit 79f54dd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check-odo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ jobs:
run: |
echo PR_EXISTS=$(gh pr --repo ${{ github.repository }} list --state all --search "update odo ${{env.LATEST_TOOL_RELEASE}} in:title" --json url | jq length) >> $GITHUB_ENV
- name: Update src/tools.json with latest odo version
if: ${{ (env.LATEST_TOOL_RELEASE != env.REPO_ODO_VERSION) && (env.PR_EXISTS == 0) }}
if: ${{ (env.LATEST_TOOL_RELEASE != '') && (env.LATEST_TOOL_RELEASE != env.REPO_ODO_VERSION) && (env.PR_EXISTS == 0) }}
run: |
jq --indent 4 '.odo.version = "${{ env.LATEST_TOOL_RELEASE }}"' src/tools.json | jq --indent 4 '.odo.versionRange = "^${{ env.LATEST_TOOL_RELEASE }}"' | jq --indent 4 '.odo.versionRangeLabel = "version >= ${{ env.LATEST_TOOL_RELEASE }}"' > src/tools.json.new
mv src/tools.json.new src/tools.json
for platform in win32 darwin linux; do
for platform in win32 darwin darwin-arm64 linux linux-arm64; do
old_url=`jq -r .odo.platform.${platform}.url src/tools.json`
new_url=`echo ${old_url} | sed "s|${{ env.REPO_ODO_VERSION }}|${{ env.LATEST_TOOL_RELEASE }}|"`
checksum=`curl -s ${new_url}.sha256`
jq --indent 4 ".odo.platform.${platform}.url = \"${new_url}\"" src/tools.json | jq --indent 4 ".odo.platform.${platform}.sha256sum = \"${checksum}\"" > src/tools.json.new
mv src/tools.json.new src/tools.json
done
- name: Create pull request
if: ${{ (env.LATEST_TOOL_RELEASE != env.REPO_ODO_VERSION) && (env.PR_EXISTS == 0) }}
if: ${{ (env.LATEST_TOOL_RELEASE != '') && (env.LATEST_TOOL_RELEASE != env.REPO_ODO_VERSION) && (env.PR_EXISTS == 0) }}
run: |
git config --global user.email "openshifttools-bot@users.noreply.github.com"
git config --global user.name "openshifttools-bot"
Expand Down
18 changes: 15 additions & 3 deletions src/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,34 @@
"filePrefix": "",
"platform": {
"win32": {
"url": "https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/odo/v3.15.0/odo-windows-amd64.exe.zip",
"url": "https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/odo/v3.15.0/odo-windows-amd64.exe.zip",
"sha256sum": "cf8ddcd46025325dd9e5f8b5f38ef8ea45d49a79c127b48c2b9c5b2ccb93afaa",
"dlFileName": "odo-windows-amd64.exe.zip",
"cmdFileName": "odo-windows-amd64.exe"
},
"darwin": {
"url": "https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/odo/v3.15.0/odo-darwin-amd64.tar.gz",
"url": "https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/odo/v3.15.0/odo-darwin-amd64.tar.gz",
"sha256sum": "45e96d490c593d994689156d17f5e1f1bf208f651ce19d74160ef12cb741b113",
"dlFileName": "odo-darwin-amd64.tar.gz",
"cmdFileName": "odo-darwin-amd64"
},
"darwin-arm64": {
"url": "https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/odo/v3.15.0/odo-darwin-arm64.tar.gz",
"sha256sum": "dade9c0679d2624d80818ed66a5d80d161c291b6a9e72dde8c6b7573843c175e",
"dlFileName": "odo-darwin-arm64.tar.gz",
"cmdFileName": "odo-darwin-arm64"
},
"linux": {
"url": "https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/odo/v3.15.0/odo-linux-amd64.tar.gz",
"url": "https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/odo/v3.15.0/odo-linux-amd64.tar.gz",
"sha256sum": "77e999ec3eca99ea17e9345496866afc9c1ae67d3069c9433659b801dab9c302",
"dlFileName": "odo-linux-amd64.tar.gz",
"cmdFileName": "odo"
},
"linux-arm64": {
"url": "https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/odo/v3.15.0/odo-linux-arm64.tar.gz",
"sha256sum": "b154cb06fbc423006b8892b302d5e6701986c9bbaa872efc2a7056b787a152e1",
"dlFileName": "odo-linux-arm64.tar.gz",
"cmdFileName": "odo"
}
}
},
Expand Down

0 comments on commit 79f54dd

Please sign in to comment.