Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
0pens0 committed Aug 12, 2024
1 parent d0a0deb commit ac1857e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 51 deletions.
36 changes: 27 additions & 9 deletions .github/workflows/cfdeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,40 @@ run-name: ${{ github.actor }} deploying
on:
push:
branches:
- "none"
- "dev"
jobs:
gitops-deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to CF
env:
CF_DOCKER_PASSWORD: ${{secrets.CF_DOCKER_PASSWORD}}
- name: Install CLI
run: |
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
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 cf8-cli
cf api ${{ vars.CF_API_ENDPOINT }} --skip-ssl-validation
sudo apt install openjdk-17-jdk openjdk-17-jre
sudo update-java-alternatives --set /usr/lib/jvm/java-1.17.0-openjdk-amd64
export JAVA_HOME=/usr/lib/jvm/java-1.17.0-openjdk-amd64
- name: Connect to CF API
env:
CF_API: ${{ vars.CF_API_ENDPOINT }}
CF_ORG: ${{ vars.CF_ORG }}
CF_SPACE: ${{ vars.CF_SPACE }}

run: |
cf api $CF_API --skip-ssl-validation
cf auth admin ${{ secrets.CF_API_TOKEN }}
cf target -o ${{ vars.CF_ORG }} -s ${{ vars.CF_SPACE }}
cf push spring-metal --docker-image harbor.vmtanzu.com/openso-tap-apps/spring-metal --docker-username openso
cf target -o $CF_ORG -s $CF_SPACE
- name: Check out repository code
uses: actions/checkout@v4
- name: Deploy
run: |
export JAVA_HOME=/usr/lib/jvm/java-1.17.0-openjdk-amd64
mvn package
cf push
- run: echo "🍏 This job's status is ${{ job.status }}."
42 changes: 0 additions & 42 deletions conf/cfdeploy.yml

This file was deleted.

0 comments on commit ac1857e

Please sign in to comment.