From 3c5364645761221fbda3dbb28e88644c4c42c59c Mon Sep 17 00:00:00 2001 From: Sergio Date: Fri, 11 Oct 2024 14:31:42 +0200 Subject: [PATCH 1/3] Add build-any-ib GH action --- .github/workflows/build-any-ib.yml | 64 ++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/build-any-ib.yml diff --git a/.github/workflows/build-any-ib.yml b/.github/workflows/build-any-ib.yml new file mode 100644 index 00000000..27898171 --- /dev/null +++ b/.github/workflows/build-any-ib.yml @@ -0,0 +1,64 @@ +--- +# Launch the build-any-ib job in Jenkins +name: Build any IB + +'on': + workflow_dispatch: + inputs: + package_name: + type: string + description: Name of the package to build + default: 'O2' + alidist_slug: + type: string + description: Alidist version to use for the package (group/repo[@branch]) + default: 'alisw/alidist@master' + architecture: + type: choice + description: Architecture to build the package for + default: 'latest' + options: + +permissions: {} + +jobs: + build-any-ib: + runs-on: ubuntu-latest + + env: + # --- Jenkins and SSO params --- + JENKINS_URL: ${{ secrets.JENKINS_URL }} + SSO_AUTH_URL: ${{ secrets.SSO_AUTH_URL }} + CLIENT_ID: ${{ secrets.SSO_JENKINS_API_CLIENT_ID }} + CLIENT_SECRET: ${{ secrets.SSO_JENKINS_API_CLIENT_SECRET }} + TARGET_APP: ${{ secrets.SSO_JENKINS_API_TARGET_APP }} + JOB_NAME: 'build-any-ib' + + # --- build-any-ib build params --- + # ALIBUILD_SLUG: ${{ inputs.alibuild_slug }} + ALIDIST_SLUG: ${{ inputs.alidist_slug }} + ARCHITECTURE: ${{ inputs.architecture }} + PACKAGE_NAME: ${{ inputs.package_name }} + # OVERRIDE_TAGS: ${{ inputs.override_tags }} + # OVERRIDE_VERSIONS: ${{ inputs.override_versions }} + # DEFAULTS: "o2" + # PUBLISH_BUILDS: "true" + # USE_REMOTE_STORE: "true" + + steps: + - name: Launch the build-any-ib job in Jenkins + run: | + # Login against SSO + TOKEN="$(curl --location -X POST "$SSO_AUTH_URL" \ + --header 'Content-Type: application/x-www-form-urlencoded' \ + --data-urlencode 'grant_type=client_credentials' \ + --data-urlencode "client_id=$CLIENT_ID" \ + --data-urlencode "client_secret=$CLIENT_SECRET" \ + --data-urlencode "audience=$TARGET_APP" | jq -r '.access_token')" + + # Trigger the Jenkins job + curl "$JENKINS_URL/job/$JOB_NAME/buildWithParameters" \ + -H "Authorization: Bearer $TOKEN" \ + --data "PACKAGE_NAME=$PACKAGE_NAME" \ + --data "ALIDIST_SLUG=$ALIDIST_SLUG" \ + --data "ARCHITECTURE=$ARCHITECTURE" From 55a591465dda11af3ac5799fc8327b45b3a7d0e7 Mon Sep 17 00:00:00 2001 From: Sergio Date: Fri, 11 Oct 2024 14:40:29 +0200 Subject: [PATCH 2/3] Add current archs --- .github/workflows/build-any-ib.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-any-ib.yml b/.github/workflows/build-any-ib.yml index 27898171..de547f9e 100644 --- a/.github/workflows/build-any-ib.yml +++ b/.github/workflows/build-any-ib.yml @@ -16,8 +16,16 @@ name: Build any IB architecture: type: choice description: Architecture to build the package for - default: 'latest' + default: 'slc9_x86-64' options: + - "slc9_x86-64" + - "slc8_x86-64" + - "slc7_x86-64" + - "slc6_x86-64" + - "ubuntu2004_x86-64" + - "ubuntu2204_x86-64" + - "osx_x86-64" + - "slc7_aarch64" permissions: {} From 32d2a92178245e7886bb73b0aed1d28416dc0e09 Mon Sep 17 00:00:00 2001 From: Sergio Date: Tue, 5 Nov 2024 15:58:23 +0100 Subject: [PATCH 3/3] Update list --- .github/workflows/build-any-ib.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-any-ib.yml b/.github/workflows/build-any-ib.yml index de547f9e..2e899b14 100644 --- a/.github/workflows/build-any-ib.yml +++ b/.github/workflows/build-any-ib.yml @@ -19,13 +19,12 @@ name: Build any IB default: 'slc9_x86-64' options: - "slc9_x86-64" + - "slc9_aarch64" - "slc8_x86-64" - "slc7_x86-64" - - "slc6_x86-64" - "ubuntu2004_x86-64" - "ubuntu2204_x86-64" - "osx_x86-64" - - "slc7_aarch64" permissions: {}