From 6689e8393bce2abdc2b3758affdfe4bbd4948f21 Mon Sep 17 00:00:00 2001 From: Mohanachandran S <165888272+mohanachandran-s@users.noreply.github.com> Date: Tue, 15 Oct 2024 17:11:16 +0530 Subject: [PATCH] MOSIP-36526 - commented apitest action as changes already moved to develop Signed-off-by: Mohanachandran S <165888272+mohanachandran-s@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 210 ++++++++++++++--------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index 0cfdbf0b1c1..3191aeea736 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -90,112 +90,112 @@ jobs: GPG_SECRET: ${{ secrets.GPG_SECRET }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - build-maven-apitest-auth: - uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21 - with: - SERVICE_LOCATION: ./apitest - BUILD_ARTIFACT: apitest-auth - secrets: - OSSRH_USER: ${{ secrets.OSSRH_USER }} - OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} - OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} - GPG_SECRET: ${{ secrets.GPG_SECRET }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + # build-maven-apitest-auth: + # uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21 + # with: + # SERVICE_LOCATION: ./apitest + # BUILD_ARTIFACT: apitest-auth + # secrets: + # OSSRH_USER: ${{ secrets.OSSRH_USER }} + # OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} + # OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} + # GPG_SECRET: ${{ secrets.GPG_SECRET }} + # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - publish_to_nexus_apitest_auth: - if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish' }}" - needs: build-maven-apitest-auth - uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master-java21 - with: - SERVICE_LOCATION: ./apitest - secrets: - OSSRH_USER: ${{ secrets.OSSRH_USER }} - OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} - OSSRH_URL: ${{ secrets.OSSRH_SNAPSHOT_URL }} - OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} - GPG_SECRET: ${{ secrets.GPG_SECRET }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + # publish_to_nexus_apitest_auth: + # if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish' }}" + # needs: build-maven-apitest-auth + # uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master-java21 + # with: + # SERVICE_LOCATION: ./apitest + # secrets: + # OSSRH_USER: ${{ secrets.OSSRH_USER }} + # OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} + # OSSRH_URL: ${{ secrets.OSSRH_SNAPSHOT_URL }} + # OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} + # GPG_SECRET: ${{ secrets.GPG_SECRET }} + # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - build-apitest-auth-local: - needs: build-maven-apitest-auth - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets.dev_namespace_docker_hub }} - SERVICE_NAME: apitest-auth - SERVICE_LOCATION: apitest - BUILD_ARTIFACT: apitest-auth-local - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 21 - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '21' - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - name: Build Automationtests with Maven - run: | - cd ${{ env.SERVICE_LOCATION}} - mvn clean package -s $GITHUB_WORKSPACE/settings.xml - - name: Copy configuration files to target directory. - run: | - cp -r ${{ env.SERVICE_LOCATION}}/target/classes/config ${{ env.SERVICE_LOCATION}}/target/config - cp -r ${{ env.SERVICE_LOCATION}}/testNgXmlFiles ${{ env.SERVICE_LOCATION}}/target/testNgXmlFiles - - name: Ready the springboot artifacts - if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }} - run: | - ## FIND JARS & COPY ONLY EXECUTABLE JARs STORED UNDER TARGET DIRECTORY - find ${{ env.SERVICE_LOCATION }} -path '*/target/*' -exec zip ${{ env.BUILD_ARTIFACT }}.zip {} + - - name: Upload the springboot jars - if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }} - uses: actions/upload-artifact@v3 - with: - name: ${{ env.BUILD_ARTIFACT }} - path: ${{ env.BUILD_ARTIFACT }}.zip - - uses: 8398a7/action-slack@v3 - with: - status: ${{ job.status }} - fields: repo,message,author,commit,workflow,job # selectable (default: repo,message) - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required - if: failure() # Pick up events even if the job fails or is canceled. + # build-apitest-auth-local: + # needs: build-maven-apitest-auth + # runs-on: ubuntu-latest + # env: + # NAMESPACE: ${{ secrets.dev_namespace_docker_hub }} + # SERVICE_NAME: apitest-auth + # SERVICE_LOCATION: apitest + # BUILD_ARTIFACT: apitest-auth-local + # steps: + # - uses: actions/checkout@v3 + # - name: Set up JDK 21 + # uses: actions/setup-java@v3 + # with: + # distribution: 'temurin' + # java-version: '21' + # server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml + # settings-path: ${{ github.workspace }} # location for the settings.xml file + # - name: Setup the settings file for ossrh server + # run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml + # - name: Build Automationtests with Maven + # run: | + # cd ${{ env.SERVICE_LOCATION}} + # mvn clean package -s $GITHUB_WORKSPACE/settings.xml + # - name: Copy configuration files to target directory. + # run: | + # cp -r ${{ env.SERVICE_LOCATION}}/target/classes/config ${{ env.SERVICE_LOCATION}}/target/config + # cp -r ${{ env.SERVICE_LOCATION}}/testNgXmlFiles ${{ env.SERVICE_LOCATION}}/target/testNgXmlFiles + # - name: Ready the springboot artifacts + # if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }} + # run: | + # ## FIND JARS & COPY ONLY EXECUTABLE JARs STORED UNDER TARGET DIRECTORY + # find ${{ env.SERVICE_LOCATION }} -path '*/target/*' -exec zip ${{ env.BUILD_ARTIFACT }}.zip {} + + # - name: Upload the springboot jars + # if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }} + # uses: actions/upload-artifact@v3 + # with: + # name: ${{ env.BUILD_ARTIFACT }} + # path: ${{ env.BUILD_ARTIFACT }}.zip + # - uses: 8398a7/action-slack@v3 + # with: + # status: ${{ job.status }} + # fields: repo,message,author,commit,workflow,job # selectable (default: repo,message) + # env: + # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required + # if: failure() # Pick up events even if the job fails or is canceled. - build-dockers_apitest_auth: - needs: build-apitest-auth-local - strategy: - matrix: - include: - - SERVICE_LOCATION: 'apitest' - SERVICE_NAME: 'apitest-auth' - BUILD_ARTIFACT: 'apitest-auth-local' - ONLY_DOCKER: true - fail-fast: false - name: ${{ matrix.SERVICE_NAME }} - uses: mosip/kattu/.github/workflows/docker-build.yml@master-java21 - with: - SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} - SERVICE_NAME: ${{ matrix.SERVICE_NAME }} - BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }} - ONLY_DOCKER: ${{ matrix.ONLY_DOCKER }} - secrets: - DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }} - ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }} - RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + # build-dockers_apitest_auth: + # needs: build-apitest-auth-local + # strategy: + # matrix: + # include: + # - SERVICE_LOCATION: 'apitest' + # SERVICE_NAME: 'apitest-auth' + # BUILD_ARTIFACT: 'apitest-auth-local' + # ONLY_DOCKER: true + # fail-fast: false + # name: ${{ matrix.SERVICE_NAME }} + # uses: mosip/kattu/.github/workflows/docker-build.yml@master-java21 + # with: + # SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} + # SERVICE_NAME: ${{ matrix.SERVICE_NAME }} + # BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }} + # ONLY_DOCKER: ${{ matrix.ONLY_DOCKER }} + # secrets: + # DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }} + # ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }} + # RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }} + # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - sonar_analysis_apitest_auth: - needs: build-maven-apitest-auth - if: "${{ github.event_name != 'pull_request' }}" - uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master-java21 - with: - SERVICE_LOCATION: ./apitest - secrets: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - ORG_KEY: ${{ secrets.ORG_KEY }} - OSSRH_USER: ${{ secrets.OSSRH_USER }} - OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} - OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} - GPG_SECRET: ${{ secrets.GPG_SECRET }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + # sonar_analysis_apitest_auth: + # needs: build-maven-apitest-auth + # if: "${{ github.event_name != 'pull_request' }}" + # uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master-java21 + # with: + # SERVICE_LOCATION: ./apitest + # secrets: + # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + # ORG_KEY: ${{ secrets.ORG_KEY }} + # OSSRH_USER: ${{ secrets.OSSRH_USER }} + # OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} + # OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} + # GPG_SECRET: ${{ secrets.GPG_SECRET }} + # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}