Deploy Snapshot to SAP Common Artifactory #200
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Snapshot to SAP Common Artifactory | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: 0 20 * * 1-5 | |
| jobs: | |
| deploy-snapshot: | |
| name: Deploy Snapshot | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout Repository" | |
| uses: actions/checkout@v6 | |
| - name: "Setup java" | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: "sapmachine" | |
| java-version: "17" | |
| server-id: artifactory-snapshots | |
| server-username: DEPLOYMENT_USER | |
| server-password: DEPLOYMENT_PASS | |
| - name: "Publish Snapshot" | |
| run: > | |
| mvn | |
| --batch-mode | |
| --no-transfer-progress | |
| --threads 1C | |
| --show-version | |
| -DrepositoryId=artifactory-snapshots | |
| -Dmaven.compiler.showCompilationChanges | |
| -Dhttp.keepAlive=false | |
| clean package deploy | |
| env: | |
| DEPLOYMENT_USER: ${{ secrets.ARTIFACTORY_COMMON_USER }} | |
| DEPLOYMENT_PASS: ${{ secrets.ARTIFACTORY_COMMON_PASSWORD }} | |
| - name: 'Slack Notification' | |
| if: failure() | |
| uses: slackapi/slack-github-action@v3.0.1 | |
| with: | |
| webhook: ${{ secrets.SLACK_WEBHOOK }} | |
| webhook-type: incoming-webhook | |
| payload: | | |
| blocks: | |
| - type: "section" | |
| text: | |
| type: "mrkdwn" | |
| text: "⚠️ Deploy Snapshot to SAP Common Artifactory failed! 😬 Please inspect & fix by clicking <https://github.com/SAP/ai-sdk-java/actions/runs/${{ github.run_id }}|here>. Authentication problems can be fixed by updating the `ARTIFACTORY_COMMON_PASSWORD`: Go to <https://common.repositories.cloud.sap/|Artifactory>, login with user `asa1_fin_cloud_oper`, Edit Profile and Generate an Identity Token. " | |