Skip to content

Update multi_tenant_deploy.yml #24

Update multi_tenant_deploy.yml

Update multi_tenant_deploy.yml #24

name: Build Cloud Cap Samples Java
on:
push:
branches: [multi_tenant_deploy]
workflow_dispatch:
inputs:
deploy_branch:
description: 'Specify the sdm branch'
required: true
cf_space:
description: 'Specify the Cloud Foundry space to deploy to'
default: 'capbugtest'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v2
with:
# ref: ${{ github.event.inputs.deploy_branch }}
ref: mt_test_rel_1.3.0
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
- name: Build and package
run: |
echo "branch ...."
git branch
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: Build and package
# run: |
# mvn clean install -P unit-tests -DskipIntegrationTests
# - name: Clone the cloud-cap-samples-java repo
# run: git clone --depth 1 --branch main 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 ${{ github.event.inputs.cf_space }}......"
# # Install cf CLI plugin
# 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 ${{ github.event.inputs.cf_space }}
# cf login -a ${{ secrets.CF_API }} -u ${{ secrets.CF_USER }} -p ${{ secrets.CF_PASSWORD }} -o ${{ secrets.CF_ORG }} -s ${{ secrets.CF_SPACE_RISHI }}
# # Deploy the application
# echo "Current directory.."
# pwd
# ls -lrth
# echo "Running cf deploy"
# cf deploy mta_archives/bookshop-mt_1.0.0.mtar -f