Merge pull request #78 from HideyoshiSolutions/fixes-per-deployment-refresh

Fixes per deployment refresh
This commit is contained in:
2024-02-16 01:38:21 -03:00
committed by GitHub
4 changed files with 49 additions and 47 deletions

View File

@@ -48,6 +48,7 @@ jobs:
username: ${{ secrets.SSH_USER }} username: ${{ secrets.SSH_USER }}
port: ${{ secrets.SSH_PORT }} port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }} key: ${{ secrets.SSH_KEY }}
command_timeout: 30m
script: | script: |
sudo apt update && sudo apt install -y jq sudo apt update && sudo apt install -y jq
source ~/.profile source ~/.profile

View File

@@ -1,54 +1,55 @@
name: remote ssh command name: remote ssh command
on: on:
push: push:
branches: branches:
- staging - staging
jobs: jobs:
build: build:
name: Build name: Build
environment: staging environment: staging
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30 timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Create Config Json File steps:
run: | - uses: actions/checkout@v4
echo "${{ secrets.CONFIG_JSON }}" | base64 -d > config.json - name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Inserts Prod Enviromental Variables - name: Create Config Json File
run: | run: |
python -m pip install --upgrade pip pipenv echo "${{ secrets.CONFIG_JSON }}" | base64 -d > config.json
pipenv install
pipenv run python setup.py -e staging -f config.json
- name: copy file via ssh - name: Inserts Prod Enviromental Variables
uses: appleboy/scp-action@master run: |
with: python -m pip install --upgrade pip pipenv
host: ${{ secrets.SSH_HOST }} pipenv install
username: ${{ secrets.SSH_USER }} pipenv run python setup.py -e staging -f config.json
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
source: "."
target: "infra-hideyoshi.com"
- name: executing remote ssh commands - name: copy file via ssh
uses: appleboy/ssh-action@master uses: appleboy/scp-action@master
with: with:
host: ${{ secrets.SSH_HOST }} host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }} username: ${{ secrets.SSH_USER }}
port: ${{ secrets.SSH_PORT }} port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }} key: ${{ secrets.SSH_KEY }}
script: | source: "."
sudo apt update && sudo apt install -y jq target: "infra-hideyoshi.com"
source ~/.profile
cd infra-hideyoshi.com - name: executing remote ssh commands
./deploy.sh --staging uses: appleboy/ssh-action@master
./refresh.sh with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
command_timeout: 30m
script: |
sudo apt update && sudo apt install -y jq
source ~/.profile
cd infra-hideyoshi.com
./deploy.sh --staging
./refresh.sh

View File

@@ -41,4 +41,4 @@ jobs:
script: | script: |
[[ -d infra-hideyoshi.com ]] && \ [[ -d infra-hideyoshi.com ]] && \
cd infra-hideyoshi.com && \ cd infra-hideyoshi.com && \
./infra-hideyoshi.com/refresh.sh ${{ env.deployments }} ./refresh.sh ${{ env.deployments }}

View File

@@ -111,7 +111,7 @@ function main() {
minikube kubectl -- $@ minikube kubectl -- $@
} }
minikube start --driver kvm2 --cpus 4 --memory 4Gib minikube start --driver kvm2 --cpus 6 --memory 6Gib
minikube addons enable ingress-dns minikube addons enable ingress-dns
minikube addons enable ingress minikube addons enable ingress