mavalosn send deploy EKS π #119
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy-k8s | |
run-name: ${{ github.actor }} send deploy EKS π | |
on: | |
#pull_request: | |
# types: [opened, reopened, synchronize, edited, closed] | |
#schedule: | |
# - cron: '30 2 * * *' # every day at midnight | |
push: | |
branches: | |
- FOUR-12410 | |
workflow_dispatch: | |
workflow_call: | |
env: | |
K8S_BRANCH: FOUR-12408 | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
AWS_URL: ${{ secrets.AWS_URL }} | |
pull_req_id: ${{github.event.pull_request.number}} | |
DATE: $(date -d '-1 day' '+%Y-%m-%d'|sed 's/-//g') | |
CURRENT_DATE: $(date '+%Y-%m-%d %H:%M:%S'|sed 's/-//g') | |
CI_PACKAGE_BRANCH: ${{github.event.pull_request.head.ref || 'next' }} | |
CI_PROJECT: ${{github.event.pull_request.head.repo.name || 'processmaker' }} | |
CI_PR_BODY: ${{ github.event_name == 'schedule' && 'No ci tags needed here' || github.event.pull_request.body }} | |
# IMAGE_TAG: $(echo "$CI_PROJECT-$CI_PACKAGE_BRANCH" | sed "s;/;-;g") | |
DEPLOY: ${{ secrets.DEPLOY }} | |
GH_USER: ${{ secrets.GH_USER }} | |
GH_EMAIL: ${{ secrets.GH_EMAIL }} | |
GITHUB_COMMENT: ${{ secrets.GH_COMMENT }} | |
DOM_EKS: ${{ secrets.DOM_EKS }} | |
#BASE: ${{ contains(github.event.pull_request.body, 'ci:next') && 'ci-base' || 'ci-base-php81' }} | |
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} | |
BUILD_BASE: ${{ (contains(github.event.pull_request.body, 'ci:build-base') || github.event_name == 'schedule') && '1' || '0' }} | |
BASE: ${{ contains(github.event.pull_request.body, 'ci:php81') && 'ci-base' || 'ci-base-php82' }} | |
CDATA_LICENSE_DOCUSIGN: ${{ secrets.CDATA_LICENSE_DOCUSIGN }} | |
CDATA_LICENSE_EXCEL: ${{ secrets.CDATA_LICENSE_EXCEL }} | |
CDATA_LICENSE_GITHUB: ${{ secrets.CDATA_LICENSE_GITHUB }} | |
CDATA_LICENSE_SLACK: ${{ secrets.CDATA_LICENSE_SLACK }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
imageEKS: | |
name: CreateDB | |
runs-on: self-hosted | |
#container: | |
# image: processmaker/cicd:latest | |
# options: --user root | |
steps: | |
- name: Clone private repository | |
run: | | |
git clone --depth 1 -b eng "https://[email protected]/ProcessMaker/argocd.git" argocd | |
cd argocd | |
ls -la | |
- name: CreateDB | |
run: | | |
echo "Creating DB ............." | |
cd argocd | |
kubectl apply -f template-db.yaml | |
echo "##### HELM VERSION ######" | |
helm version | |
- name: Deploy instance | |
run: | | |
echo "Creating DB ............." | |
cd argocd | |
helm list && helm repo add processmaker ${{ secrets.HELM_REPO }} --username ${{ secrets.HELM_USERNAME }} --password ${{ secrets.HELM_PASSWORD }} && helm install --timeout 40m -f values.yaml processmaker processmaker/enterprise --version 2.0.0 | |
echo "##### HELM VERSION ######" | |
helm version | |
#imageEKS: | |
# name: build-docker-image-EKS | |
# runs-on: self-hosted | |
# steps: | |
# - name: Clone private repository | |
# run: | | |
# git clone --depth 1 -b eng "https://[email protected]/ProcessMaker/argocd.git" argocd | |
# cd argocd | |
# ls -la | |
# - name: Version Helm | |
# run: | | |
# echo "Get HELM................" | |
# helm version | |
# - name: Helm list | |
# run: | | |
# pwd | |
# ls -la | |
# helm list | |
# cd argocd | |
# helm list && helm repo add processmaker ${{ secrets.HELM_REPO }} --username ${{ secrets.HELM_USERNAME }} --password ${{ secrets.HELM_PASSWORD }} && helm install --timeout 40m -f values.yaml processmaker processmaker/enterprise --version 2.0.0 | |
# echo "Finish migration ...................." | |