diff --git a/.github/workflows/deploy-k8s.yml b/.github/workflows/deploy-k8s.yml index a42bf48926..d6992db47b 100644 --- a/.github/workflows/deploy-k8s.yml +++ b/.github/workflows/deploy-k8s.yml @@ -31,45 +31,45 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: - imageEKS: - name: build-docker-image-EKS - if: github.event.action != 'closed' - runs-on: ${{ vars.RUNNER }} - steps: - - name: Set image name - run: | - RESOLVED_IMAGE_TAG=${{ env.IMAGE_TAG }} - echo "IMAGE=${{ secrets.REGISTRY_HOST }}/processmaker/enterprise:$RESOLVED_IMAGE_TAG" >> $GITHUB_ENV - - name: Clone repo K8S - run: | - # TODO: Change branch when pm4 k8s distribution is released - echo "IMAGE: ${{ env.IMAGE }}" - git clone --depth 1 -b bugfix/FOUR-12410 "https://$GITHUB_TOKEN@github.com/ProcessMaker/pm4-k8s-distribution.git" pm4-k8s-distribution - - name: Generate image EKS - run: | - cd pm4-k8s-distribution/images - branch=$CI_PACKAGE_BRANCH tag=${{env.IMAGE_TAG}} bash build.k8s-cicd.sh - - name: List Images - run: | - docker images - - name: Login to Harbor - uses: docker/login-action@v2 - with: - registry: ${{ secrets.REGISTRY_HOST }} - username: ${{ secrets.REGISTRY_USERNAME }} - password: ${{ secrets.REGISTRY_PASSWORD }} - - name: Push Enterprise Image to Harbor - run: | - #if [[ "$BUILD_BASE" == "1" ]]; then - # docker push ${{ env.BASE_IMAGE }} - #fi - #docker push ${{ env.IMAGE }} - 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}} + #imageEKS: + # name: build-docker-image-EKS + # if: github.event.action != 'closed' + # runs-on: ${{ vars.RUNNER }} + # steps: + # - name: Set image name + # run: | + # RESOLVED_IMAGE_TAG=${{ env.IMAGE_TAG }} + # echo "IMAGE=${{ secrets.REGISTRY_HOST }}/processmaker/enterprise:$RESOLVED_IMAGE_TAG" >> $GITHUB_ENV + # - name: Clone repo K8S + # run: | + # # TODO: Change branch when pm4 k8s distribution is released + # echo "IMAGE: ${{ env.IMAGE }}" + # git clone --depth 1 -b bugfix/FOUR-12410 "https://$GITHUB_TOKEN@github.com/ProcessMaker/pm4-k8s-distribution.git" pm4-k8s-distribution + # - name: Generate image EKS + # run: | + # cd pm4-k8s-distribution/images + # branch=$CI_PACKAGE_BRANCH tag=${{env.IMAGE_TAG}} bash build.k8s-cicd.sh + # - name: List Images + # run: | + # docker images + # - name: Login to Harbor + # uses: docker/login-action@v2 + # with: + # registry: ${{ secrets.REGISTRY_HOST }} + # username: ${{ secrets.REGISTRY_USERNAME }} + # password: ${{ secrets.REGISTRY_PASSWORD }} + # - name: Push Enterprise Image to Harbor + # run: | + # #if [[ "$BUILD_BASE" == "1" ]]; then + # # docker push ${{ env.BASE_IMAGE }} + # #fi + # #docker push ${{ env.IMAGE }} + # 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}} deployEKS: name: build-deploy-EKS #if: contains(github.event.pull_request.body, 'ci:deploy') - needs: imageEKS + #needs: imageEKS runs-on: self-hosted steps: - name: Clone private repository @@ -101,6 +101,8 @@ jobs: sed -i "s/{{current_datetime}}/$current_datetime/g" template-bounce.yaml kubectl apply -f template-bounce.yaml fi + echo "Instance URL: '${INSTANCE_URL}'" + echo "INSTANCE_URL=${INSTANCE_URL}" >> "$GITHUB_ENV" - name: Comment Instance run: | echo "Instance URL: '${INSTANCE_URL}'"