Skip to content

Commit

Permalink
Project
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-zip committed May 9, 2024
0 parents commit 38b0492
Show file tree
Hide file tree
Showing 12 changed files with 875 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
82 changes: 82 additions & 0 deletions .github/workflows/devsandbox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: bloggios-cloud-gateway devsandbox

on:
push:
branches: [ "devsandbox" ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: github
settings-path: ${{ github.workspace }}
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Build with Maven
run: mvn clean install

- name: Stopping Container
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.V4_HOST }}
username: ${{ secrets.V4_USERNAME }}
key: ${{ secrets.V4_VPS_PRIVATE_KEY }}
port: 22
script: |
cd /root/bloggios-deployment-docker-files
git stash
git pull origin devsandbox
set +e
docker-compose -f docker-compose-devsandbox.yml stop bloggios-cloud-gateway
docker rmi bloggios-cloud-gateway:1
set -e
- name: Generating Docker Image for Bloggios
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.V4_HOST }}
username: ${{ secrets.V4_USERNAME }}
key: ${{ secrets.V4_VPS_PRIVATE_KEY }}
port: 22
script: |
cd /root/microservices/bloggios-cloud-gateway
git stash
git pull origin devsandbox
chmod +x mvnw
./mvnw clean package
- name: Deploy Docker Image
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.V4_HOST }}
username: ${{ secrets.V4_USERNAME }}
key: ${{ secrets.V4_VPS_PRIVATE_KEY }}
port: 22
script: |
cd /root/bloggios-deployment-docker-files
docker-compose -f docker-compose-devsandbox.yml up -d
- name: Removing Targets
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.V4_HOST }}
username: ${{ secrets.V4_USERNAME }}
key: ${{ secrets.V4_VPS_PRIVATE_KEY }}
port: 22
script: |
cd /root/microservices/bloggios-cloud-gateway
rm target -r
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
Loading

0 comments on commit 38b0492

Please sign in to comment.