From 70a43962f76bdabaaf62aeec6225a459fb443aa7 Mon Sep 17 00:00:00 2001 From: Hadrien Froger Date: Wed, 7 Feb 2024 11:01:49 +0000 Subject: [PATCH] ci: scripts to redeploy in developments --- .github/workflows/redeploy-dev.yml | 31 ++++++++++++++++++++++++++++++ .gitignore | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/redeploy-dev.yml diff --git a/.github/workflows/redeploy-dev.yml b/.github/workflows/redeploy-dev.yml new file mode 100644 index 0000000..861aeab --- /dev/null +++ b/.github/workflows/redeploy-dev.yml @@ -0,0 +1,31 @@ +name: Redeploy Decidim Image in Jelastic Infra + +on: + workflow_dispatch: + inputs: + environment: + description: 'Environment' + required: true + type: environment + TAG: + description: 'Image Tag to redeploy' + required: true + default: 'latest' # You can set a default value or make it required without a default. + +jobs: + redeploy: + runs-on: ubuntu-latest + container: + image: mwienk/jelastic-cli + steps: + - name: Redeploy container in Jelastic + env: + JELASTIC_LOGIN: ${{ secrets.JELASTIC_LOGIN }} + JELASTIC_PASSWORD: ${{ secrets.JELASTIC_PASSWORD }} + JELASTIC_HOSTER: ${{ secrets.JELASTIC_HOSTER }} + ENVNAME: ${{ secrets.ENVNAME }} + USE_EXISTING_VOLUME: ${{ secrets.USE_EXISTING_VOLUME }} # Default to true if not set + HOME: /root + run: | + /root/jelastic/users/authentication/signin --login $JELASTIC_LOGIN --password $JELASTIC_PASSWORD --platformUrl $JELASTIC_HOSTER + /root/jelastic/environment/control/redeploycontainersbygroup --envName $ENVNAME --nodeGroup cp --tag ${inputs.TAG} --useExistingVolumes ${USE_EXISTING_VOLUME:-true} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6ce9435..4677343 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,5 @@ public/uploads vendor .bash_history node_modules -.npm \ No newline at end of file +.npm +.bash_history \ No newline at end of file