From 92b1a2eb588e95831fe9bbc5664b0bb37e3f8b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Thu, 21 Sep 2023 22:20:24 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=80=20::=20=EA=B8=B0=EC=A1=B4=20CI=20-?= =?UTF-8?q?=20CD=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/prod-build.yaml | 74 ------------------------------- .github/workflows/stag-build.yaml | 67 ---------------------------- 2 files changed, 141 deletions(-) delete mode 100644 .github/workflows/prod-build.yaml delete mode 100644 .github/workflows/stag-build.yaml diff --git a/.github/workflows/prod-build.yaml b/.github/workflows/prod-build.yaml deleted file mode 100644 index 813a05bf..00000000 --- a/.github/workflows/prod-build.yaml +++ /dev/null @@ -1,74 +0,0 @@ -name: Build for Prod -on: - push: - tags: - - v*.*.* - -env: - SERVICE_NAME: user - SERVICE_TYPE: be - -jobs: - build: - environment: prod - runs-on: ubuntu-latest - strategy: - matrix: - java-version: [ 17 ] - outputs: - version: ${{ steps.get_version.outputs.BRANCH_NAME }} - - steps: - - name: Check Out The Repository - uses: actions/checkout@v3 - - - name: Set up Java - uses: actions/setup-java@v2 - with: - java-version: ${{ matrix.java-version }} - distribution: 'zulu' - - - name: Get the version - id: get_version - run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) - - - name: Gradle Build - uses: gradle/gradle-build-action@v2 - with: - arguments: | - build - --no-daemon - -x test - - - name: Login to ECR - id: ecr - uses: elgohr/ecr-login-action@master - with: - access_key: ${{ secrets.AWS_ACCESS_KEY }} - secret_access_key: ${{ secrets.AWS_SECRET_KEY }} - region: ${{ secrets.AWS_REGION }} - - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@master - with: - name: ${{env.SERVICE_NAME}}-${{env.SERVICE_TYPE}} - username: ${{ steps.ecr.outputs.username }} - password: ${{ steps.ecr.outputs.password }} - registry: ${{ steps.ecr.outputs.registry }} - tags: ${{ steps.get_version.outputs.VERSION }} - buildargs: | - CLOUD_CONFIG_PASSWORD=${{secrets.CLOUD_CONFIG_PASSWORD}} - CLOUD_CONFIG_USERNAME=${{secrets.CLOUD_CONFIG_USERNAME}} - PROFILE=prod - - name: Repository Dispatch - uses: peter-evans/repository-dispatch@v1 - with: - token: ${{ secrets.GITOPS_DEPLOY_PRODUCTION_TOKEN }} - repository: team-xquare/xquare-gitops-repo-production - event-type: update_image - client-payload: '{ - "ref": "${{ github.ref }}", - "version": "${{ steps.get_version.outputs.VERSION }}", - "service_name": "${{env.SERVICE_NAME}}", - "service_type": "${{env.SERVICE_TYPE}}" - }' diff --git a/.github/workflows/stag-build.yaml b/.github/workflows/stag-build.yaml deleted file mode 100644 index a28df9a9..00000000 --- a/.github/workflows/stag-build.yaml +++ /dev/null @@ -1,67 +0,0 @@ -name: Build for Stage -on: - push: - branches: - - main - -env: - SERVICE_NAME: user - SERVICE_TYPE: be - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - java-version: [ 17 ] - outputs: - version: ${{ steps.get_version.outputs.BRANCH_NAME }} - - steps: - - name: Check Out The Repository - uses: actions/checkout@v3 - - - name: Set up Java - uses: actions/setup-java@v2 - with: - java-version: ${{ matrix.java-version }} - distribution: 'zulu' - - - name: Gradle Build - uses: gradle/gradle-build-action@v2 - with: - arguments: | - build - --no-daemon - -x test - - name: Login to ECR - id: ecr - uses: elgohr/ecr-login-action@master - with: - access_key: ${{ secrets.AWS_ACCESS_KEY }} - secret_access_key: ${{ secrets.AWS_SECRET_KEY }} - region: ${{ secrets.AWS_REGION }} - - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@master - with: - name: ${{env.SERVICE_NAME}}-${{env.SERVICE_TYPE}} - username: ${{ steps.ecr.outputs.username }} - password: ${{ steps.ecr.outputs.password }} - registry: ${{ steps.ecr.outputs.registry }} - tags: ${{ github.sha }} - buildargs: | - CLOUD_CONFIG_USERNAME=${{secrets.CLOUD_CONFIG_USERNAME}} - CLOUD_CONFIG_PASSWORD=${{secrets.CLOUD_CONFIG_PASSWORD}} - PROFILE=stag - - - name: Repository Dispatch - uses: peter-evans/repository-dispatch@v1 - with: - token: ${{ secrets.GITOPS_DEPLOY_STAGE_TOKEN }} - repository: team-xquare/xquare-gitops-repo-staging - event-type: update_image - client-payload: '{"ref": "${{ github.ref }}", - "version": "${{ github.sha }}", - "service_name": "${{env.SERVICE_NAME}}", - "service_type": "${{env.SERVICE_TYPE}}" }'