SDMEXT-1703:[Java] Enhance Token handling to support DwC #2
Workflow file for this run
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: Multi Tenancy Deploy | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - develop | |
| workflow_dispatch: | |
| permissions: | |
| pull-requests: read | |
| packages: read # Added permission to read packages | |
| jobs: | |
| deploy: | |
| if: github.event.pull_request.merged == true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Wait for 5 minutes # Added a 5-minute delay to ensure the snapshot is deployed successfully before initiating the deployment job. | |
| run: sleep 300 | |
| - name: Checkout this repository | |
| uses: actions/checkout@v2 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Build and package | |
| run: | | |
| mvn clean install -P unit-tests -DskipIntegrationTests | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' # Change this to at least version 18 | |
| - name: Install MBT | |
| run: npm install -g mbt | |
| - name: Clone the cloud-cap-samples-java repo | |
| run: git clone --depth 1 --branch mtTests https://github.com/vibhutikumar07/cloud-cap-samples-java.git | |
| - name: Change directory to cloud-cap-samples-java | |
| working-directory: cloud-cap-samples-java | |
| run: pwd # Verifies that we're in the correct directory | |
| - name: Run mbt build | |
| working-directory: cloud-cap-samples-java | |
| run: | | |
| echo "java version" | |
| java --version | |
| mbt build | |
| - name: Deploy to Cloud Foundry | |
| working-directory: cloud-cap-samples-java | |
| run: | | |
| echo "Deploying to ${{ secrets.CF_SPACE }}......" | |
| # Install cf CLI plugin | |
| wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo tee /etc/apt/trusted.gpg.d/cloudfoundry.asc | |
| echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list | |
| sudo apt update | |
| sudo apt install cf-cli | |
| cf install-plugin multiapps -f | |
| # Login to Cloud Foundry again to ensure session is active | |
| cf login -a ${{ secrets.CF_API }} -u ${{ secrets.CF_USER }} -p ${{ secrets.CF_PASSWORD }} -o ${{ secrets.CF_ORG }} -s ${{ secrets.CF_SPACE }} | |
| # Deploy the application | |
| echo "Current directory.." | |
| pwd | |
| ls -lrth | |
| echo "Running cf deploy" | |
| cf deploy mta_archives/bookshop-mt_1.0.0.mtar -f |