-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # .github/workflows/deploy-pm4.yml # composer.json # composer.lock
- Loading branch information
Showing
555 changed files
with
38,444 additions
and
28,353 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: deploy-k8s | ||
run-name: ${{ github.actor }} send deploy EKS 🚀 | ||
on: | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize, edited, closed] | ||
#schedule: | ||
|
@@ -10,7 +10,7 @@ on: | |
env: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
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') | ||
|
@@ -32,7 +32,7 @@ concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
imageEKS: | ||
imageEKS: | ||
name: build-docker-image-EKS | ||
if: github.event.action != 'closed' | ||
runs-on: ${{ vars.RUNNER }} | ||
|
@@ -44,7 +44,7 @@ jobs: | |
- name: Clone repo K8S | ||
run: | | ||
echo "IMAGE: ${{ env.IMAGE }}" | ||
git clone --depth 1 -b "$K8S_BRANCH" "https://[email protected]/ProcessMaker/pm4-k8s-distribution.git" pm4-k8s-distribution | ||
git clone --depth 1 -b "$K8S_BRANCH" "https://[email protected]/ProcessMaker/pm4-k8s-distribution.git" pm4-k8s-distribution | ||
- name: Generate image EKS | ||
run: | | ||
cd pm4-k8s-distribution/images | ||
|
@@ -74,16 +74,16 @@ jobs: | |
- name: Push Enterprise Image to Harbor | ||
run: | | ||
docker tag processmaker/enterprise:${{env.IMAGE_TAG}} ${{ secrets.REGISTRY_HOST }}/processmaker/enterprise:${{env.IMAGE_TAG}} | ||
docker push ${{ secrets.REGISTRY_HOST }}/processmaker/enterprise:${{env.IMAGE_TAG}} | ||
docker push ${{ secrets.REGISTRY_HOST }}/processmaker/enterprise:${{env.IMAGE_TAG}} | ||
deployEKS: | ||
name: build-deploy-EKS | ||
if: contains(github.event.pull_request.body, 'ci:deploy') | ||
needs: imageEKS | ||
runs-on: ${{ vars.RUNNER }} | ||
steps: | ||
steps: | ||
- name: Clone private repository | ||
run: | | ||
git clone --depth 1 -b eng "https://[email protected]/ProcessMaker/argocd.git" argocd | ||
git clone --depth 1 -b eng "https://[email protected]/ProcessMaker/argocd.git" argocd | ||
- name: Install pm4-tools | ||
run: | | ||
git clone --depth 1 -b "$K8S_BRANCH" "https://[email protected]/ProcessMaker/pm4-k8s-distribution.git" pm4-k8s-distribution | ||
|
@@ -103,7 +103,7 @@ jobs: | |
sudo mv kubectl /usr/local/bin/ | ||
- name: Authenticate with Amazon EKS | ||
run: aws eks update-kubeconfig --region us-east-1 --name pm4-eng | ||
- name: Deploy instance EKS | ||
- name: Deploy instance EKS | ||
run: | | ||
cd argocd | ||
deploy=$(echo -n ${{env.IMAGE_TAG}} | md5sum | head -c 10) | ||
|
@@ -142,8 +142,8 @@ jobs: | |
name: Delete Instance | ||
if: github.event.action == 'closed' | ||
runs-on: self-hosted | ||
steps: | ||
- name: Delete instance EKS | ||
steps: | ||
- name: Delete instance EKS | ||
run: | | ||
deploy=$(echo -n $IMAGE_TAG | md5sum | head -c 10) | ||
if kubectl get namespace/ci-$deploy-ns-pm4 ; then | ||
|
@@ -152,20 +152,20 @@ jobs: | |
kubectl delete namespace ci-$deploy-ns-pm4 | ||
else | ||
echo "The pull request does not have an instance on K8s [https://ci-$deploy.engk8s.processmaker.net] not found!!" | ||
fi | ||
runPhpUnit: | ||
fi | ||
runPhpUnit: | ||
name: run-phpunit | ||
if: github.event.action != 'closed' | ||
needs: imageEKS | ||
runs-on: ${{ vars.RUNNER }} | ||
steps: | ||
- name: Export Params | ||
- name: Export Params | ||
run: | | ||
echo "IMAGE=${{ secrets.REGISTRY_HOST }}/processmaker/enterprise:${{env.IMAGE_TAG}}" >> $GITHUB_ENV | ||
- name: Clone repo K8S | ||
run: | | ||
echo "IMAGE: ${{ env.IMAGE }}" | ||
git clone --depth 1 -b "$K8S_BRANCH" "https://[email protected]/ProcessMaker/pm4-k8s-distribution.git" pm4-k8s-distribution | ||
git clone --depth 1 -b "$K8S_BRANCH" "https://[email protected]/ProcessMaker/pm4-k8s-distribution.git" pm4-k8s-distribution | ||
- name: Login to Harbor | ||
uses: docker/login-action@v2 | ||
with: | ||
|
@@ -178,4 +178,4 @@ jobs: | |
docker pull $IMAGE | ||
docker-compose down -v | ||
docker-compose build phpunit | ||
docker-compose run phpunit | ||
docker-compose run phpunit |
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.