This is an automated email from the ASF dual-hosted git repository.

arm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-actions.git


The following commit(s) were added to refs/heads/main by this push:
     new 96a0bfc  Remove old, unused builds
96a0bfc is described below

commit 96a0bfc12bf7225888a0d0f88fafb8e8273c006b
Author: Alastair McFarlane <[email protected]>
AuthorDate: Mon Mar 23 09:43:53 2026 +0000

    Remove old, unused builds
---
 .github/workflows/distribute-maven-jars.yml     | 377 -----------------------
 .github/workflows/distribute-maven-stg-jars.yml | 386 ------------------------
 2 files changed, 763 deletions(-)

diff --git a/.github/workflows/distribute-maven-jars.yml 
b/.github/workflows/distribute-maven-jars.yml
deleted file mode 100644
index 5f0c759..0000000
--- a/.github/workflows/distribute-maven-jars.yml
+++ /dev/null
@@ -1,377 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-name: Distribute from ATR to Maven Central
-run-name: "${{ inputs.atr-id }}"
-
-on:
-  workflow_dispatch:
-    inputs:
-      atr-id:
-        description: 'Run ID (from ATR)'
-        required: true
-      asf-uid:
-        description: 'Originating user ID'
-        required: true
-      project:
-        description: 'Project in ATR to pull files from'
-        required: true
-      version:
-        description: 'Version in ATR to pull files from'
-        required: true
-      phase:
-        description: 'Expected release phase in ATR'
-        required: true
-      distribution-owner-namespace:
-        description: "Owner namespace"
-        required: true
-      distribution-package:
-        description: 'Package/project name in ATR'
-        required: true
-      distribution-version:
-        description: 'Distribution version'
-        required: true
-
-jobs:
-  distribute:
-    permissions:
-      id-token: write
-      contents: read
-    runs-on: ubuntu-latest
-    env:
-      ATR_HOST: release-test.apache.org
-      SSH_PORT: 2222
-      WORKFLOW: distribute-maven.yml
-      NJORD_STORE: atr-deployment-${{ inputs.distribution-package }}-${{ 
inputs.distribution-version }}
-      CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
-      CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
-      TAG_NAME: "${{ inputs.distribution-owner-namespace }}-${{ 
inputs.distribution-package }}-${{ inputs.distribution-version }}"
-    steps:
-      - name: Sleep for 5 seconds
-        run: sleep 5s
-        shell: bash
-      - name: Create settings.xml
-        run: |
-            mkdir -p ~/.m2
-            cat > ~/.m2/settings.xml << EOF
-            <?xml version="1.0" encoding="UTF-8"?>
-            <settings>
-              <pluginGroups>
-                <pluginGroup>eu.maveniverse.maven.plugins</pluginGroup>
-              </pluginGroups>
-              <servers>
-                <server>
-                  <id>central</id>
-                  <username>${CENTRAL_USERNAME}</username>
-                  <password>${CENTRAL_PASSWORD}</password>
-                  <configuration>
-                    <njord.publisher>sonatype-cp</njord.publisher>
-                  </configuration>
-                </server>
-              </servers>
-            </settings>
-            EOF
-
-      - name: Create pom.xml
-        run: |
-            cat > pom.xml << EOF
-            <?xml version="1.0" encoding="UTF-8"?>
-            <project xmlns="http://maven.apache.org/POM/4.0.0";>
-              <modelVersion>4.0.0</modelVersion>
-              <groupId>local</groupId>
-              <artifactId>${NJORD_STORE}</artifactId>
-              <version>1.0</version>
-              <packaging>pom</packaging>
-
-              <build>
-                <extensions>
-                  <extension>
-                    <groupId>eu.maveniverse.maven.njord</groupId>
-                    <artifactId>extension3</artifactId>
-                    <version>0.9.3</version>
-                  </extension>
-                </extensions>
-              </build>
-              <distributionManagement>
-                <repository>
-                  <id>central</id>
-                  <url>https://repo.maven.apache.org/maven2</url>
-                </repository>
-              </distributionManagement>
-
-              <properties>
-                <njord.tag>${TAG_NAME}</njord.tag>
-              </properties>
-            </project>
-            EOF
-
-      - name: Set up JDK 17
-        uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654
-        with:
-          java-version: '17'
-          distribution: 'temurin'
-          overwrite-settings: false
-      - name: Set up Maven 3.9+
-        uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1
-        with:
-          maven-version: 3.9.12
-
-      - name: Create a GitHub OIDC JWT
-        id: create-github-jwt
-        shell: bash
-        run: |
-          set -euo pipefail
-          url="${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=atr-test-v1"
-          jwt="$(curl -sS --fail-with-body -H "Authorization: bearer 
${ACTIONS_ID_TOKEN_REQUEST_TOKEN}" "$url" | jq -r .value)"
-          echo "::add-mask::$jwt"
-          echo "jwt=$jwt" >> "$GITHUB_OUTPUT"
-
-      - name: Generate an ephemeral SSH key
-        id: generate-ssh-key
-        shell: bash
-        run: |
-          set -euxo pipefail
-          ssh-keygen -t ed25519 -N "" -f "$RUNNER_TEMP/ssh_key"
-          echo "ssh_private_key_path=$RUNNER_TEMP/ssh_key" >> "$GITHUB_OUTPUT"
-          echo "ssh_public_key=$(cat "$RUNNER_TEMP/ssh_key.pub")" >> 
"$GITHUB_OUTPUT"
-
-      - name: Register the ephemeral SSH key with ATR
-        shell: bash
-        run: |
-          set -euxo pipefail
-          case "${ATR_HOST}" in
-            *.apache.org) ;;
-            *) echo "atr-host must match *.apache.org"; exit 1;;
-          esac
-          jq -n --arg publisher github \
-                --arg jwt "$JWT" \
-                --arg key "$SSH_PUBLIC_KEY" \
-                --arg uid "$INPUTS_ASF_UID" \
-                --arg phase "$INPUTS_PHASE" \
-                --arg project_name "$INPUTS_PROJECT" \
-                --arg version "$INPUTS_VERSION" \
-                '{publisher:$publisher, jwt:$jwt, ssh_key:$key, asf_uid:$uid, 
project_name:$project_name, phase:$phase, version:$version}' |
-            curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
-              "https://${ATR_HOST}/api/distribute/ssh/register";
-        env:
-          JWT: ${{ steps.create-github-jwt.outputs.jwt }}
-          SSH_PUBLIC_KEY: ${{ steps.generate-ssh-key.outputs.ssh_public_key }}
-          INPUTS_PROJECT: ${{ inputs.project }}
-          INPUTS_VERSION: ${{ inputs.version }}
-          INPUTS_PHASE: ${{ inputs.phase }}
-          INPUTS_ASF_UID: ${{ inputs.asf-uid }}
-
-      - name: Report status back to ATR
-        shell: bash
-        run: |
-          set -euxo pipefail
-          jq -n --arg publisher github \
-                --arg jwt "$JWT" \
-                --arg workflow "$WORKFLOW" \
-                --arg run_id $RUN_ID \
-                --arg project_name "$INPUTS_PROJECT" \
-                '{publisher:$publisher, jwt:$jwt, workflow:$workflow, 
run_id:$run_id, project_name:$project_name, status:"in-progress", 
message:"Compiling distribution"}' |
-            curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
-              "https://${ATR_HOST}/api/distribute/task/status";
-        env:
-          JWT: ${{ steps.create-github-jwt.outputs.jwt }}
-          RUN_ID: ${{ github.run_id }}
-          INPUTS_PROJECT: ${{ inputs.project }}
-
-      - name: Download from ATR using rsync
-        shell: bash
-        run: |
-          set -euxo pipefail
-          if ! [[ "${SSH_PORT}" =~ ^[0-9]+$ ]]
-          then
-            echo "::error::ssh-port must be an integer"
-            exit 1
-          fi
-          : "${INPUTS_DISTRIBUTION_PACKAGE:?package is required}"
-          : "${INPUTS_VERSION:?version is required}"
-          command -v rsync > /dev/null || { sudo apt-get update -y && sudo 
apt-get install -y rsync; }
-          mkdir stg
-          rsync -av \
-            -e "ssh -p 2222 -i $SSH_PRIVATE_KEY_PATH -o 
StrictHostKeyChecking=accept-new" \
-            -- \
-            "github@${ATR_HOST}:/${INPUTS_PROJECT}/${INPUTS_VERSION}/maven/" 
./stg/
-        env:
-          INPUTS_PROJECT: ${{ inputs.project }}
-          INPUTS_VERSION: ${{ inputs.version }}
-          INPUTS_DISTRIBUTION_OWNER_NAMESPACE: ${{ 
inputs.distribution-owner-namespace }}
-          INPUTS_DISTRIBUTION_PACKAGE: ${{ inputs.distribution-package }}
-          # INPUTS_DETAILS: ${{ inputs.details }}
-          SSH_PRIVATE_KEY_PATH: ${{ 
steps.generate-ssh-key.outputs.ssh_private_key_path }}
-
-      - name: Build and stage locally
-        run: |
-          DIR="stg"
-          BASE="${INPUTS_DISTRIBUTION_PACKAGE}-${INPUTS_DISTRIBUTION_VERSION}"
-
-          FILES="" CLASSIFIERS="" TYPES=""
-          shopt -s nullglob
-          for f in "$DIR/${BASE}"*.*; do
-            [[ "$f" =~ \.(sha1|sha256|sha512|md5)$ ]] && continue
-            [[ "$f" == "$DIR/${BASE}.jar" ]] && continue
-            [[ "$f" == "$DIR/${BASE}.pom" ]] && continue
-
-            suffix="${f#$DIR/${BASE}}"
-
-            if [[ "$suffix" =~ ^\.([^.]+)\.asc$ ]]; then
-              classifier=""
-              type="${BASH_REMATCH[1]}.asc"
-            elif [[ "$suffix" =~ ^-([^.]+)\.([^.]+)\.asc$ ]]; then
-              classifier="${BASH_REMATCH[1]}"
-              type="${BASH_REMATCH[2]}.asc"
-            elif [[ "$suffix" =~ ^-([^.]+)\.([^.]+)$ ]]; then
-              classifier="${BASH_REMATCH[1]}"
-              type="${BASH_REMATCH[2]}"
-            else
-              continue
-            fi
-
-            FILES="$FILES,$f"
-            CLASSIFIERS="$CLASSIFIERS,$classifier"
-            TYPES="$TYPES,$type"
-          done
-
-          # Strip leading comma
-          FILES="${FILES#,}"
-          CLASSIFIERS="${CLASSIFIERS#,}"
-          TYPES="${TYPES#,}"
-
-          mvn deploy:deploy-file \
-            -Dfile="$DIR/${BASE}.jar" \
-            -DpomFile="$DIR/${BASE}.pom" \
-            -Durl=njord: \
-            -DrepositoryId=njord-local \
-            ${FILES:+-Dfiles="$FILES" -Dclassifiers="$CLASSIFIERS" 
-Dtypes="$TYPES"}
-        env:
-          INPUTS_DISTRIBUTION_PACKAGE: ${{ inputs.distribution-package }}
-          INPUTS_DISTRIBUTION_VERSION: ${{ inputs.distribution-version }}
-
-
-      # - name: Create tag
-      #   run: |
-      #     curl -X POST -u "$CENTRAL_USERNAME:$CENTRAL_PASSWORD" \
-      #       "https://central.sonatype.com/service/rest/v1/tags"; \
-      #       -H "Content-Type: application/json" \
-      #       -d "{\"name\": \"$TAG_NAME\"}"
-
-
-      - name: Get store ID and publish
-        run: |
-          echo "Publishing store: $NJORD_STORE-00001"
-          mvn njord:validate -Dnjord.store=$NJORD_STORE-00001 
-Dnjord.publisher=sonatype-cp -Dnjord.details=true -q | sed -n '/Central 
Requirements/,/ArtifactStore.*failed validation/{/ArtifactStore.*failed 
validation/!s/^\[ERROR\] *//p}' | tee .err
-          mvn njord:publish -Dnjord.store=$NJORD_STORE-00001 
-Dnjord.publishingType=automatic
-          mvn njord:drop -Dnjord.store=$NJORD_STORE-00001
-        env:
-          INPUTS_DISTRIBUTION_PACKAGE: ${{ inputs.distribution-package }}
-
-      - name: Sleep for 30 seconds
-        run: sleep 30s
-        shell: bash
-
-      - name: Report status back to ATR
-        shell: bash
-        run: |
-          set -euxo pipefail
-          jq -n --arg publisher github \
-                --arg jwt "$JWT" \
-                --arg workflow "$WORKFLOW" \
-                --arg run_id $RUN_ID \
-                --arg project_name "$INPUTS_PROJECT" \
-                '{publisher:$publisher, jwt:$jwt, workflow:$workflow, 
run_id:$run_id, project_name:$project_name, status:"in-progress", 
message:"Recording distribution"}' |
-            curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
-              "https://${ATR_HOST}/api/distribute/task/status";
-        env:
-          JWT: ${{ steps.create-github-jwt.outputs.jwt }}
-          RUN_ID: ${{ github.run_id }}
-          INPUTS_PROJECT: ${{ inputs.project }}
-
-      - name: Record distribution on ATR
-        shell: bash
-        run: |
-          set -euxo pipefail
-          DETAILS_JSON=false
-          [ "${INPUTS_DETAILS}" = "true" ] && DETAILS_JSON=true
-          jq -n --arg publisher github \
-                --arg jwt "$JWT" \
-                --arg uid "$INPUTS_ASF_UID" \
-                --arg project "$INPUTS_PROJECT" \
-                --arg version "$INPUTS_VERSION" \
-                --arg phase "$INPUTS_PHASE" \
-                --arg platform "MAVEN" \
-                --arg distribution_owner_namespace 
"$INPUTS_DISTRIBUTION_OWNER_NAMESPACE" \
-                --arg distribution_package "$INPUTS_DISTRIBUTION_PACKAGE" \
-                --arg distribution_version "$INPUTS_DISTRIBUTION_VERSION" \
-                --argjson details "$DETAILS_JSON" \
-                '{publisher:$publisher, jwt:$jwt, asf_uid:$uid, 
project:$project, version:$version, phase:$phase, platform:$platform, 
distribution_owner_namespace:$distribution_owner_namespace, 
distribution_package:$distribution_package, 
distribution_version:$distribution_version, staging:false, details:$details}' |
-            curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
-              "https://${ATR_HOST}/api/distribute/record_from_workflow";
-        env:
-          INPUTS_PROJECT: ${{ inputs.project }}
-          INPUTS_VERSION: ${{ inputs.version }}
-          INPUTS_PHASE: ${{ inputs.phase }}
-          INPUTS_ASF_UID: ${{ inputs.asf-uid }}
-          INPUTS_DISTRIBUTION_OWNER_NAMESPACE: ${{ 
inputs.distribution-owner-namespace }}
-          INPUTS_DISTRIBUTION_PACKAGE: ${{ inputs.distribution-package }}
-          INPUTS_DISTRIBUTION_VERSION: ${{ inputs.distribution-version }}
-          INPUTS_DETAILS: "false"
-          JWT: ${{ steps.create-github-jwt.outputs.jwt }}
-
-      - name: Report status back to ATR
-        shell: bash
-        if: failure()
-        run: |
-          set -euxo pipefail
-          jq -n --arg publisher github \
-                --arg jwt "$JWT" \
-                --arg workflow "$WORKFLOW" \
-                --arg run_id $RUN_ID \
-                --arg project_name "$INPUTS_PROJECT" \
-                --arg err "$([ -f .err ] && [ -s .err ] && echo "Build failed: 
$(cat .err)" || echo "Github workflow failed")" \
-                --arg status "failed" \
-                '{publisher:$publisher, jwt:$jwt, workflow:$workflow, 
run_id:$run_id, project_name:$project_name, status:$status, message:$err}' |
-            curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
-              "https://${ATR_HOST}/api/distribute/task/status";
-        env:
-          JWT: ${{ steps.create-github-jwt.outputs.jwt }}
-          RUN_ID: ${{ github.run_id }}
-          STATUS: ${{ job.status }}
-          INPUTS_PROJECT: ${{ inputs.project }}
-
-
-      - name: Report status back to ATR
-        shell: bash
-        if: success()
-        run: |
-          set -euxo pipefail
-          jq -n --arg publisher github \
-                --arg jwt "$JWT" \
-                --arg workflow "$WORKFLOW" \
-                --arg run_id $RUN_ID \
-                --arg project_name "$INPUTS_PROJECT" \
-                --arg status "success" \
-                '{publisher:$publisher, jwt:$jwt, workflow:$workflow, 
run_id:$run_id, project_name:$project_name, status:$status, message:"GitHub 
workflow succeeded"}' |
-            curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
-              "https://${ATR_HOST}/api/distribute/task/status";
-        env:
-          JWT: ${{ steps.create-github-jwt.outputs.jwt }}
-          RUN_ID: ${{ github.run_id }}
-          STATUS: ${{ job.status }}
-          INPUTS_PROJECT: ${{ inputs.project }}
diff --git a/.github/workflows/distribute-maven-stg-jars.yml 
b/.github/workflows/distribute-maven-stg-jars.yml
deleted file mode 100644
index 69769fa..0000000
--- a/.github/workflows/distribute-maven-stg-jars.yml
+++ /dev/null
@@ -1,386 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-name: Distribute from ATR to RAO Maven Staging
-run-name: "${{ inputs.atr-id }}"
-
-on:
-  workflow_dispatch:
-    inputs:
-      atr-id:
-        description: 'Run ID (from ATR)'
-        required: true
-      asf-uid:
-        description: 'Originating user ID'
-        required: true
-      project:
-        description: 'Project in ATR to pull files from'
-        required: true
-      version:
-        description: 'Version in ATR to pull files from'
-        required: true
-      phase:
-        description: 'Expected release phase in ATR'
-        required: true
-      distribution-owner-namespace:
-        description: "Owner namespace"
-        required: true
-      distribution-package:
-        description: 'Package/project name in ATR'
-        required: true
-      distribution-version:
-        description: 'Distribution version'
-        required: true
-      atr-host:
-        description: 'ATR host (for testing purposes)'
-        required: false
-        default: 'release-test.apache.org'
-      ssh-port:
-        description: 'SSH port for ATR (for testing purposes)'
-        required: false
-        default: '2222'
-
-jobs:
-  distribute:
-    permissions:
-      id-token: write
-      contents: read
-    runs-on: ubuntu-latest
-    env:
-      ATR_HOST: ${{ inputs.atr-host }}
-      SSH_PORT: ${{ inputs.ssh-port }}
-      WORKFLOW: distribute-maven-stg.yml
-      NJORD_STORE: atr-deployment-${{ inputs.distribution-package }}-${{ 
inputs.distribution-version }}
-      RAO_USERNAME: ${{ secrets.RAO_USERNAME }}
-      RAO_PASSWORD: ${{ secrets.RAO_PASSWORD }}
-      TAG_NAME: "${{ inputs.distribution-owner-namespace }}-${{ 
inputs.distribution-package }}-${{ inputs.distribution-version }}"
-    steps:
-      - name: Sleep for 5 seconds
-        run: sleep 5s
-        shell: bash
-      - name: Create settings.xml
-        run: |
-            mkdir -p ~/.m2
-            cat > ~/.m2/settings.xml << EOF
-            <?xml version="1.0" encoding="UTF-8"?>
-            <settings>
-              <pluginGroups>
-                <pluginGroup>eu.maveniverse.maven.plugins</pluginGroup>
-              </pluginGroups>
-              <servers>
-                <server>
-                  <id>rao3</id>
-                  <username>${RAO_USERNAME}</username>
-                  <password>${RAO_PASSWORD}</password>
-                  <configuration>
-                    <njord.publisher>sonatype-nx3</njord.publisher>
-                    
<njord.publisher.sonatype-nx3.baseUrl>https://repository.apache.org:4443/</njord.publisher.sonatype-nx3.baseUrl>
-                  </configuration>
-                </server>
-              </servers>
-            </settings>
-            EOF
-
-      - name: Create pom.xml
-        run: |
-            cat > pom.xml << EOF
-            <?xml version="1.0" encoding="UTF-8"?>
-            <project xmlns="http://maven.apache.org/POM/4.0.0";>
-              <modelVersion>4.0.0</modelVersion>
-              <groupId>local</groupId>
-              <artifactId>${NJORD_STORE}</artifactId>
-              <version>1.0</version>
-              <packaging>pom</packaging>
-
-              <build>
-                <extensions>
-                  <extension>
-                    <groupId>eu.maveniverse.maven.njord</groupId>
-                    <artifactId>extension3</artifactId>
-                    <version>0.9.3</version>
-                  </extension>
-                </extensions>
-              </build>
-              <distributionManagement>
-                <repository>
-                  <id>rao3</id>
-                  <url>https://repository.apache.org:4443</url>
-                </repository>
-              </distributionManagement>
-
-              <properties>
-                
<njord.publisher.sonatype-nx3.releaseRepositoryName>maven-staging</njord.publisher.sonatype-nx3.releaseRepositoryName>
-                <njord.tag>${TAG_NAME}</njord.tag>
-              </properties>
-            </project>
-            EOF
-
-      - name: Set up JDK 17
-        uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654
-        with:
-          java-version: '17'
-          distribution: 'temurin'
-          overwrite-settings: false
-      - name: Set up Maven 3.9+
-        uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1
-        with:
-          maven-version: 3.9.12
-
-      - name: Create a GitHub OIDC JWT
-        id: create-github-jwt
-        shell: bash
-        run: |
-          set -euo pipefail
-          url="${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=atr-test-v1"
-          jwt="$(curl -sS --fail-with-body -H "Authorization: bearer 
${ACTIONS_ID_TOKEN_REQUEST_TOKEN}" "$url" | jq -r .value)"
-          echo "::add-mask::$jwt"
-          echo "jwt=$jwt" >> "$GITHUB_OUTPUT"
-
-      - name: Generate an ephemeral SSH key
-        id: generate-ssh-key
-        shell: bash
-        run: |
-          set -euxo pipefail
-          ssh-keygen -t ed25519 -N "" -f "$RUNNER_TEMP/ssh_key"
-          echo "ssh_private_key_path=$RUNNER_TEMP/ssh_key" >> "$GITHUB_OUTPUT"
-          echo "ssh_public_key=$(cat "$RUNNER_TEMP/ssh_key.pub")" >> 
"$GITHUB_OUTPUT"
-
-      - name: Register the ephemeral SSH key with ATR
-        shell: bash
-        run: |
-          set -euxo pipefail
-          case "${ATR_HOST}" in
-            *.apache.org) ;;
-            *) echo "atr-host must match *.apache.org"; exit 1;;
-          esac
-          jq -n --arg publisher github \
-                --arg jwt "$JWT" \
-                --arg key "$SSH_PUBLIC_KEY" \
-                --arg uid "$INPUTS_ASF_UID" \
-                --arg phase "$INPUTS_PHASE" \
-                --arg project_name "$INPUTS_PROJECT" \
-                --arg version "$INPUTS_VERSION" \
-                '{publisher:$publisher, jwt:$jwt, ssh_key:$key, asf_uid:$uid, 
project_name:$project_name, phase:$phase, version:$version}' |
-            curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
-              "https://${ATR_HOST}/api/distribute/ssh/register";
-        env:
-          JWT: ${{ steps.create-github-jwt.outputs.jwt }}
-          SSH_PUBLIC_KEY: ${{ steps.generate-ssh-key.outputs.ssh_public_key }}
-          INPUTS_PROJECT: ${{ inputs.project }}
-          INPUTS_VERSION: ${{ inputs.version }}
-          INPUTS_PHASE: ${{ inputs.phase }}
-          INPUTS_ASF_UID: ${{ inputs.asf-uid }}
-
-      - name: Report status back to ATR
-        shell: bash
-        run: |
-          set -euxo pipefail
-          jq -n --arg publisher github \
-                --arg jwt "$JWT" \
-                --arg workflow "$WORKFLOW" \
-                --arg run_id $RUN_ID \
-                --arg project_name "$INPUTS_PROJECT" \
-                '{publisher:$publisher, jwt:$jwt, workflow:$workflow, 
run_id:$run_id, project_name:$project_name, status:"in_progress", 
message:"Compiling distribution"}' |
-            curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
-              "https://${ATR_HOST}/api/distribute/task/status";
-        env:
-          JWT: ${{ steps.create-github-jwt.outputs.jwt }}
-          RUN_ID: ${{ github.run_id }}
-          INPUTS_PROJECT: ${{ inputs.project }}
-
-      - name: Download from ATR using rsync
-        shell: bash
-        run: |
-          set -euxo pipefail
-          if ! [[ "${SSH_PORT}" =~ ^[0-9]+$ ]]
-          then
-            echo "::error::ssh-port must be an integer"
-            exit 1
-          fi
-          : "${INPUTS_DISTRIBUTION_PACKAGE:?package is required}"
-          : "${INPUTS_VERSION:?version is required}"
-          command -v rsync > /dev/null || { sudo apt-get update -y && sudo 
apt-get install -y rsync; }
-          mkdir stg
-          rsync -av \
-            -e "ssh -p 2222 -i $SSH_PRIVATE_KEY_PATH -o 
StrictHostKeyChecking=accept-new" \
-            -- \
-            "github@${ATR_HOST}:/${INPUTS_PROJECT}/${INPUTS_VERSION}/maven/" 
./stg/
-        env:
-          INPUTS_PROJECT: ${{ inputs.project }}
-          INPUTS_VERSION: ${{ inputs.version }}
-          INPUTS_DISTRIBUTION_OWNER_NAMESPACE: ${{ 
inputs.distribution-owner-namespace }}
-          INPUTS_DISTRIBUTION_PACKAGE: ${{ inputs.distribution-package }}
-          # INPUTS_DETAILS: ${{ inputs.details }}
-          SSH_PRIVATE_KEY_PATH: ${{ 
steps.generate-ssh-key.outputs.ssh_private_key_path }}
-
-      - name: Build and stage locally
-        run: |
-          DIR="stg"
-          BASE="${INPUTS_DISTRIBUTION_PACKAGE}-${INPUTS_DISTRIBUTION_VERSION}"
-
-          FILES="" CLASSIFIERS="" TYPES=""
-          shopt -s nullglob
-          for f in "$DIR/${BASE}"*.*; do
-            [[ "$f" =~ \.(sha1|sha256|sha512|md5)$ ]] && continue
-            [[ "$f" == "$DIR/${BASE}.jar" ]] && continue
-            [[ "$f" == "$DIR/${BASE}.pom" ]] && continue
-
-            suffix="${f#$DIR/${BASE}}"
-
-            if [[ "$suffix" =~ ^\.([^.]+)\.asc$ ]]; then
-              classifier=""
-              type="${BASH_REMATCH[1]}.asc"
-            elif [[ "$suffix" =~ ^-([^.]+)\.([^.]+)\.asc$ ]]; then
-              classifier="${BASH_REMATCH[1]}"
-              type="${BASH_REMATCH[2]}.asc"
-            elif [[ "$suffix" =~ ^-([^.]+)\.([^.]+)$ ]]; then
-              classifier="${BASH_REMATCH[1]}"
-              type="${BASH_REMATCH[2]}"
-            else
-              continue
-            fi
-
-            FILES="$FILES,$f"
-            CLASSIFIERS="$CLASSIFIERS,$classifier"
-            TYPES="$TYPES,$type"
-          done
-
-          # Strip leading comma
-          FILES="${FILES#,}"
-          CLASSIFIERS="${CLASSIFIERS#,}"
-          TYPES="${TYPES#,}"
-
-          mvn deploy:deploy-file \
-            -Dfile="$DIR/${BASE}.jar" \
-            -DpomFile="$DIR/${BASE}.pom" \
-            -Durl=njord: \
-            -DrepositoryId=njord-local \
-            ${FILES:+-Dfiles="$FILES" -Dclassifiers="$CLASSIFIERS" 
-Dtypes="$TYPES"}
-        env:
-          INPUTS_DISTRIBUTION_PACKAGE: ${{ inputs.distribution-package }}
-          INPUTS_DISTRIBUTION_VERSION: ${{ inputs.distribution-version }}
-
-
-      - name: Create staging tag
-        run: |
-          curl -X POST -u "$RAO_USERNAME:$RAO_PASSWORD" \
-            "https://repository.apache.org:4443/service/rest/v1/tags"; \
-            -H "Content-Type: application/json" \
-            -d "{\"name\": \"$TAG_NAME\"}"
-
-
-      - name: Get store ID and publish
-        shell: bash
-        run: |
-          set -euxo pipefail
-          echo "Validating store: $NJORD_STORE-00001"
-          mvn njord:validate -Dnjord.store=$NJORD_STORE-00001 
-Dnjord.publisher=sonatype-cp -Dnjord.details=true -q | sed -n '/Central 
Requirements/,/ArtifactStore.*failed validation/{/ArtifactStore.*failed 
validation/!s/^\[ERROR\] *//p}' | tee .err
-          echo "Publishing store: $NJORD_STORE-00001"
-          mvn njord:publish -Dnjord.store=$NJORD_STORE-00001
-          mvn njord:drop -Dnjord.store=$NJORD_STORE-00001
-        env:
-          INPUTS_DISTRIBUTION_PACKAGE: ${{ inputs.distribution-package }}
-
-      - name: Report status back to ATR
-        shell: bash
-        run: |
-          set -euxo pipefail
-          jq -n --arg publisher github \
-                --arg jwt "$JWT" \
-                --arg workflow "$WORKFLOW" \
-                --arg run_id $RUN_ID \
-                --arg project_name "$INPUTS_PROJECT" \
-                '{publisher:$publisher, jwt:$jwt, workflow:$workflow, 
run_id:$run_id, project_name:$project_name, status:"in_progress", 
message:"Recording distribution"}' |
-            curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
-              "https://${ATR_HOST}/api/distribute/task/status";
-        env:
-          JWT: ${{ steps.create-github-jwt.outputs.jwt }}
-          RUN_ID: ${{ github.run_id }}
-          INPUTS_PROJECT: ${{ inputs.project }}
-
-      - name: Record distribution on ATR
-        shell: bash
-        run: |
-          set -euxo pipefail
-          DETAILS_JSON=false
-          [ "${INPUTS_DETAILS}" = "true" ] && DETAILS_JSON=true
-          jq -n --arg publisher github \
-                --arg jwt "$JWT" \
-                --arg uid "$INPUTS_ASF_UID" \
-                --arg project "$INPUTS_PROJECT" \
-                --arg version "$INPUTS_VERSION" \
-                --arg phase "$INPUTS_PHASE" \
-                --arg platform "MAVEN" \
-                --arg distribution_owner_namespace 
"$INPUTS_DISTRIBUTION_OWNER_NAMESPACE" \
-                --arg distribution_package "$INPUTS_DISTRIBUTION_PACKAGE" \
-                --arg distribution_version "$INPUTS_DISTRIBUTION_VERSION" \
-                --argjson details "$DETAILS_JSON" \
-                '{publisher:$publisher, jwt:$jwt, asf_uid:$uid, 
project:$project, version:$version, phase:$phase, platform:$platform, 
distribution_owner_namespace:$distribution_owner_namespace, 
distribution_package:$distribution_package, 
distribution_version:$distribution_version, staging:true, details:$details}' |
-            curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
-              "https://${ATR_HOST}/api/distribute/record_from_workflow";
-        env:
-          INPUTS_PROJECT: ${{ inputs.project }}
-          INPUTS_VERSION: ${{ inputs.version }}
-          INPUTS_PHASE: ${{ inputs.phase }}
-          INPUTS_ASF_UID: ${{ inputs.asf-uid }}
-          INPUTS_DISTRIBUTION_OWNER_NAMESPACE: ${{ 
inputs.distribution-owner-namespace }}
-          INPUTS_DISTRIBUTION_PACKAGE: ${{ inputs.distribution-package }}
-          INPUTS_DISTRIBUTION_VERSION: ${{ inputs.distribution-version }}
-          INPUTS_DETAILS: "false"
-          JWT: ${{ steps.create-github-jwt.outputs.jwt }}
-
-      - name: Report status back to ATR
-        shell: bash
-        if: failure()
-        run: |
-          set -euxo pipefail
-          jq -n --arg publisher github \
-                --arg jwt "$JWT" \
-                --arg workflow "$WORKFLOW" \
-                --arg run_id $RUN_ID \
-                --arg project_name "$INPUTS_PROJECT" \
-                --arg err "$([ -f .err ] && [ -s .err ] && echo "Build failed: 
$(cat .err)" || echo "Github workflow failed")" \
-                --arg status "failed" \
-                '{publisher:$publisher, jwt:$jwt, workflow:$workflow, 
run_id:$run_id, project_name:$project_name, status:$status, message:$err}' |
-            curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
-              "https://${ATR_HOST}/api/distribute/task/status";
-        env:
-          JWT: ${{ steps.create-github-jwt.outputs.jwt }}
-          RUN_ID: ${{ github.run_id }}
-          STATUS: ${{ job.status }}
-          INPUTS_PROJECT: ${{ inputs.project }}
-
-
-      - name: Report status back to ATR
-        shell: bash
-        if: success()
-        run: |
-          set -euxo pipefail
-          jq -n --arg publisher github \
-                --arg jwt "$JWT" \
-                --arg workflow "$WORKFLOW" \
-                --arg run_id $RUN_ID \
-                --arg project_name "$INPUTS_PROJECT" \
-                --arg status "success" \
-                '{publisher:$publisher, jwt:$jwt, workflow:$workflow, 
run_id:$run_id, project_name:$project_name, status:$status, message:"GitHub 
workflow succeeded"}' |
-            curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
-              "https://${ATR_HOST}/api/distribute/task/status";
-        env:
-          JWT: ${{ steps.create-github-jwt.outputs.jwt }}
-          RUN_ID: ${{ github.run_id }}
-          STATUS: ${{ job.status }}
-          INPUTS_PROJECT: ${{ inputs.project }}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to