diff --git a/.github/workflows/Processors_CI_CD_Prod_Workflow.yaml b/.github/workflows/Processors_CI_CD_Prod_Workflow.yaml index c5006d2c3..ef1d16aae 100644 --- a/.github/workflows/Processors_CI_CD_Prod_Workflow.yaml +++ b/.github/workflows/Processors_CI_CD_Prod_Workflow.yaml @@ -33,10 +33,14 @@ on: - rally-processor - scm-processor - ai-data-processor + - jira-xray-zephyr-squad + - jira-zephyr-scale # Define environment variables env: JIRA_NAME: knowhow-processors-jira + JIRA_XRAY_ZEPHYR_SQUAD_NAME: knowhow-processors-jira-xray-zephyr-squad + JIRA_ZEPHYR_SCALE_NAME: knowhow-processors-jira-zephyr-scale DEVOPS_NAME: knowhow-processors-devops-processor AZUREBOARD_NAME: knowhow-processors-azure-boards AZUREPIPELINE_NAME: knowhow-processors-azure-pipeline-repo-processor @@ -62,6 +66,7 @@ jobs: - name: Set IMAGE_TAG for Prod run: | echo "IMAGE_TAG=${{ github.event.inputs.release_tag }}" >> $GITHUB_ENV + echo "VALUES_FILE=values-prod.yaml" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v2 @@ -111,7 +116,7 @@ jobs: - name: Clone & Build knowhow-common dependency run: | - BRANCH_TO_CLONE="${{ github.event.inputs.knowhow_common_branch }}" + BRANCH_TO_CLONE="${{ github.event.inputs.release_tag }}" git clone --branch $BRANCH_TO_CLONE https://github.com/PublicisSapient/knowhow-common.git cd knowhow-common mvn clean install -Ddockerfile.skip=true @@ -130,30 +135,22 @@ jobs: -DdepVersion=$COMMON_VERSION \ -DforceVersion=true - - name: Build & Skip Test Processor - if: ${{ github.event.inputs.test == 'false' }} - run: | - mvn clean install -Ddockerfile.skip=true -DskipTests - - name: Build & Test Processor - if: ${{ github.event.inputs.test == 'true' }} run: | mvn clean install -Ddockerfile.skip=true - - name: SonarQube Analysis - Processors - if: ${{ github.event.inputs.test == 'true' }} - run: | - mvn sonar:sonar -Dsonar.projectKey=ENGINEERING.KPIDASHBOARD.PROCESSORS \ - -Dsonar.projectName=ENGINEERING.KPIDASHBOARD.PROCESSORS \ - -Dsonar.branch.name=${{ env.GITHUB_HEAD_NAME }} \ - -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} \ - -Dsonar.login=${{ secrets.SONARQUBE_TOKEN }} -f pom.xml + # - name: SonarQube Analysis - Processors + # run: | + # mvn sonar:sonar -Dsonar.projectKey=ENGINEERING.KPIDASHBOARD.PROCESSORS \ + # -Dsonar.projectName=ENGINEERING.KPIDASHBOARD.PROCESSORS \ + # -Dsonar.branch.name=${{ env.GITHUB_HEAD_NAME }} \ + # -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} \ + # -Dsonar.login=${{ secrets.SONARQUBE_TOKEN }} -f pom.xml - - name: Check SonarQube Quality Gate - if: ${{ github.event.inputs.test == 'true' }} - run: | - chmod +x SonarQG.sh - ./SonarQG.sh ./target/sonar/report-task.txt + # - name: Check SonarQube Quality Gate + # run: | + # chmod +x SonarQG.sh + # ./SonarQG.sh ./target/sonar/report-task.txt - name: Build & Push Jira Docker Image if: ${{ github.event.inputs.processor == 'all' || github.event.inputs.processor == 'jira' }} @@ -163,6 +160,22 @@ jobs: docker push $ACR_LOGIN_SERVER/$JIRA_NAME:$IMAGE_TAG echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV + - name: Build & Push JIRA xray squad TEST Docker Image + if: ${{ github.event.inputs.processor == 'all' || github.event.inputs.processor == 'jira-xray-zephyr-squad' }} + run: | + docker login $ACR_LOGIN_SERVER --username ${{ secrets.SPEEDTOOLS_ACR_USERNAME }} --password ${{ secrets.SPEEDTOOLS_ACR_PASSWORD }} + docker build -t $ACR_LOGIN_SERVER/$JIRA_XRAY_ZEPHYR_SQUAD_NAME:$IMAGE_TAG jira-xray-zephyr-squad/. + docker push $ACR_LOGIN_SERVER/$JIRA_XRAY_ZEPHYR_SQUAD_NAME:$IMAGE_TAG + echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV + + - name: Build & Push JIRA Zephyr Docker Image + if: ${{ github.event.inputs.processor == 'all' || github.event.inputs.processor == 'jira-zephyr-scale' }} + run: | + docker login $ACR_LOGIN_SERVER --username ${{ secrets.SPEEDTOOLS_ACR_USERNAME }} --password ${{ secrets.SPEEDTOOLS_ACR_PASSWORD }} + docker build -t $ACR_LOGIN_SERVER/$JIRA_ZEPHYR_SCALE_NAME:$IMAGE_TAG jira-zephyr-scale/. + docker push $ACR_LOGIN_SERVER/$JIRA_ZEPHYR_SCALE_NAME:$IMAGE_TAG + echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV + - name: Build & Push DevOps Docker Image if: ${{ github.event.inputs.processor == 'all' || github.event.inputs.processor == 'devops' }} run: | @@ -212,7 +225,7 @@ jobs: echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV - name: Checkout Helm charts repo - if: ${{ github.event.inputs.deploy == 'true' && ( github.event.inputs.processor == 'all' || github.event.inputs.processor == 'jira' || github.event.inputs.processor == 'devops' || github.event.inputs.processor == 'azureboard' || github.event.inputs.processor == 'azurepipelines' || github.event.inputs.processor == 'scm-processor' || github.event.inputs.processor == 'rally-processor' || github.event.inputs.processor == 'ai-data-processor') }} + if: ${{ github.event.inputs.deploy == 'true' && ( github.event.inputs.processor == 'all' || github.event.inputs.processor == 'jira' || github.event.inputs.processor == 'jira-zephyr-scale' || github.event.inputs.processor == 'jira-xray-zephyr-squad' || github.event.inputs.processor == 'devops' || github.event.inputs.processor == 'azureboard' || github.event.inputs.processor == 'azurepipelines' || github.event.inputs.processor == 'scm-processor' || github.event.inputs.processor == 'rally-processor' || github.event.inputs.processor == 'ai-data-processor') }} run: | git clone ${{ secrets.SPEEDTOOLS_BITBUCKET_HELM_REPO }} @@ -228,6 +241,30 @@ jobs: git diff --cached --quiet || git commit -m "Update image tag values to ${IMAGE_TAG}" git push origin HEAD + - name: Update Jira-xray-zephyr-squad Helm values with new image tag + if: ${{ github.event.inputs.deploy == 'true' && ( github.event.inputs.processor == 'all' || github.event.inputs.processor == 'jira-xray-zephyr-squad' ) }} + run: | + cd build-configurations/KnowHOW-Deploy/$JIRA_XRAY_ZEPHYR_SQUAD_NAME + # Update values.yaml image tag + yq -i ".image.tag = \"${IMAGE_TAG}\"" $VALUES_FILE + git config user.name "github-actions" + git config user.email "github-actions@github.com" + git add $VALUES_FILE + git diff --cached --quiet || git commit -m "Update image tag values to ${IMAGE_TAG}" + git push origin HEAD + + - name: Update Jira zephyr-scale Helm values with new image tag + if: ${{ github.event.inputs.deploy == 'true' && ( github.event.inputs.processor == 'all' || github.event.inputs.processor == 'jira-zephyr-scale' ) }} + run: | + cd build-configurations/KnowHOW-Deploy/$JIRA_ZEPHYR_SCALE_NAME + # Update values.yaml image tag + yq -i ".image.tag = \"${IMAGE_TAG}\"" $VALUES_FILE + git config user.name "github-actions" + git config user.email "github-actions@github.com" + git add $VALUES_FILE + git diff --cached --quiet || git commit -m "Update image tag values to ${IMAGE_TAG}" + git push origin HEAD + - name: Update devops Helm values with new image tag if: ${{ github.event.inputs.deploy == 'true' && ( github.event.inputs.processor == 'all' || github.event.inputs.processor == 'devops' ) }} run: | @@ -325,6 +362,58 @@ jobs: run: | argocd app sync $JIRA_NAME-${{ github.event.inputs.env }} argocd app wait $JIRA_NAME-${{ github.event.inputs.env }} --health --timeout 300 + + deploy-jira-xray-zephyr-squad: + runs-on: github-actions-self-hosted-runner + timeout-minutes: 30 + needs: [build] + if: ${{ github.event.inputs.deploy == 'true' && (github.event.inputs.processor == 'all' || github.event.inputs.processor == 'jira-xray-zephyr-squad') }} + steps: + - name: Install ArgoCD CLI + run: | + export ARGO_PATH="$HOME/bin" + mkdir -p $ARGO_PATH + curl -sSL -o "$ARGO_PATH/argocd" https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 + chmod +x "$ARGO_PATH/argocd" + echo "$ARGO_PATH" >> $GITHUB_PATH + + - name: ArgoCD CLI Login + run: | + argocd login argocd-server \ + --username ${{ secrets.SPEEDTOOLS_ARGOCD_USERNAME}} \ + --password ${{ secrets.SPEEDTOOLS_ARGOCD_PASSWORD }} \ + --plaintext + + - name: Deploy Jira Xray Zephyr Squad Processor + run: | + argocd app sync $JIRA_XRAY_ZEPHYR_SQUAD_NAME-${{ github.event.inputs.env }} + argocd app wait $JIRA_XRAY_ZEPHYR_SQUAD_NAME-${{ github.event.inputs.env }} --health --timeout 300 + + deploy-jira-zephyr-scale: + runs-on: github-actions-self-hosted-runner + timeout-minutes: 30 + needs: [build] + if: ${{ github.event.inputs.deploy == 'true' && (github.event.inputs.processor == 'all' || github.event.inputs.processor == 'jira-zephyr-scale') }} + steps: + - name: Install ArgoCD CLI + run: | + export ARGO_PATH="$HOME/bin" + mkdir -p $ARGO_PATH + curl -sSL -o "$ARGO_PATH/argocd" https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 + chmod +x "$ARGO_PATH/argocd" + echo "$ARGO_PATH" >> $GITHUB_PATH + + - name: ArgoCD CLI Login + run: | + argocd login argocd-server \ + --username ${{ secrets.SPEEDTOOLS_ARGOCD_USERNAME}} \ + --password ${{ secrets.SPEEDTOOLS_ARGOCD_PASSWORD }} \ + --plaintext + + - name: Deploy jira-zephyr-scale Processor + run: | + argocd app sync $JIRA_ZEPHYR_SCALE_NAME-${{ github.event.inputs.env }} + argocd app wait $JIRA_ZEPHYR_SCALE_NAME-${{ github.event.inputs.env }} --health --timeout 300 deploy-rally: runs-on: github-actions-self-hosted-runner diff --git a/ai-data-processor/pom.xml b/ai-data-processor/pom.xml index 2f377276c..2a01f4817 100644 --- a/ai-data-processor/pom.xml +++ b/ai-data-processor/pom.xml @@ -15,20 +15,18 @@ ~ License. --> - + 4.0.0 com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml ai-data-processor - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT Microservice used for preparing, enriching and storing data used by the AI components of the platform diff --git a/argocd/pom.xml b/argocd/pom.xml index 76ac08bcf..179dbe493 100644 --- a/argocd/pom.xml +++ b/argocd/pom.xml @@ -21,7 +21,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml argocd-processor diff --git a/azure-boards/pom.xml b/azure-boards/pom.xml index 0e52a3c74..30d245464 100644 --- a/azure-boards/pom.xml +++ b/azure-boards/pom.xml @@ -21,7 +21,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml azure-processor diff --git a/azure-pipeline/pom.xml b/azure-pipeline/pom.xml index 4d3b8332b..7c577f1ba 100644 --- a/azure-pipeline/pom.xml +++ b/azure-pipeline/pom.xml @@ -21,7 +21,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml azurepipeline-processor diff --git a/azure-repo/pom.xml b/azure-repo/pom.xml index e70aa80c4..0433dba79 100644 --- a/azure-repo/pom.xml +++ b/azure-repo/pom.xml @@ -14,7 +14,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml azurerepo-processor diff --git a/bamboo/pom.xml b/bamboo/pom.xml index a1b7fba41..42b576d6d 100644 --- a/bamboo/pom.xml +++ b/bamboo/pom.xml @@ -21,7 +21,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml bamboo-processor diff --git a/bitbucket/pom.xml b/bitbucket/pom.xml index 1469a7e74..071248d8f 100644 --- a/bitbucket/pom.xml +++ b/bitbucket/pom.xml @@ -21,7 +21,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml bitbucket-processor diff --git a/github-action/pom.xml b/github-action/pom.xml index 09be20eb7..7da365671 100644 --- a/github-action/pom.xml +++ b/github-action/pom.xml @@ -21,7 +21,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml githubaction-processor diff --git a/github/pom.xml b/github/pom.xml index 192d94f64..ebd25551a 100644 --- a/github/pom.xml +++ b/github/pom.xml @@ -21,7 +21,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml github-processor diff --git a/gitlab/pom.xml b/gitlab/pom.xml index cccc5d37b..1e3b9c452 100644 --- a/gitlab/pom.xml +++ b/gitlab/pom.xml @@ -21,7 +21,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml gitlab-processor diff --git a/jenkins/pom.xml b/jenkins/pom.xml index fd790e0d5..72f0bed95 100644 --- a/jenkins/pom.xml +++ b/jenkins/pom.xml @@ -14,7 +14,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml jenkins-processor diff --git a/jira-xray-zephyr-squad/Dockerfile b/jira-xray-zephyr-squad/Dockerfile index 65415c519..e2c0ca50e 100644 --- a/jira-xray-zephyr-squad/Dockerfile +++ b/jira-xray-zephyr-squad/Dockerfile @@ -27,7 +27,7 @@ WORKDIR $APP_DIR VOLUME $PROPERTIES_DIR # Set the JAR file variables -ARG JIRA_TEST_JAR_FILE=jiratest-processor-exec.jar +ARG JIRA_TEST_JAR_FILE=target/jiratest-processor-exec.jar # Set the properties file names ARG JIRATEST_PROPERTIES_FILE_NAME=jiratest.properties diff --git a/jira-xray-zephyr-squad/pom.xml b/jira-xray-zephyr-squad/pom.xml index d07713ab4..cf20c29b2 100644 --- a/jira-xray-zephyr-squad/pom.xml +++ b/jira-xray-zephyr-squad/pom.xml @@ -21,7 +21,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml jiratest-processor diff --git a/jira-zephyr-scale/Dockerfile b/jira-zephyr-scale/Dockerfile index 62aabf2ad..1eaec4ac5 100644 --- a/jira-zephyr-scale/Dockerfile +++ b/jira-zephyr-scale/Dockerfile @@ -27,7 +27,7 @@ WORKDIR $APP_DIR VOLUME $PROPERTIES_DIR # Set the JAR file variables -ARG ZEPHYR_JAR_FILE=zephyr-processor-exec.jar +ARG ZEPHYR_JAR_FILE=target/zephyr-processor-exec.jar # Set the properties file names ARG ZEPHYR_PROPERTIES_FILE_NAME=zephyr.properties @@ -46,4 +46,4 @@ RUN chown -R $USER:$USER $APP_DIR \ USER $USER:$GID # Command to run the application -ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar zephyr.jar --spring.config.location=classpath:/BOOT-INF/classes/application.properties --spring.config.additional-location=optional:file:$PROPERTIES_DIR/$ZEPHYR_PROPERTIES_FILE_NAME"] \ No newline at end of file +ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar zephyr.jar --spring.config.location=classpath:/BOOT-INF/classes/application.properties --spring.config.additional-location=optional:file:$PROPERTIES_DIR/$ZEPHYR_PROPERTIES_FILE_NAME"] diff --git a/jira-zephyr-scale/pom.xml b/jira-zephyr-scale/pom.xml index 921496b7b..5ce68ba22 100644 --- a/jira-zephyr-scale/pom.xml +++ b/jira-zephyr-scale/pom.xml @@ -21,7 +21,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml zephyr-processor diff --git a/jira/pom.xml b/jira/pom.xml index 9c45e987c..df715d28b 100644 --- a/jira/pom.xml +++ b/jira/pom.xml @@ -14,7 +14,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml jira-processor diff --git a/knowhow-scm-processor/pom.xml b/knowhow-scm-processor/pom.xml index a990f760a..bd60440a2 100644 --- a/knowhow-scm-processor/pom.xml +++ b/knowhow-scm-processor/pom.xml @@ -4,7 +4,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml knowhow-scm-processor diff --git a/pom.xml b/pom.xml index 9d3fd5136..440962058 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT pom scm:git:https://github.com/PublicisSapient/knowhow-processor.git @@ -70,14 +70,7 @@ - - javax.ws.rs - javax.ws.rs-api - 2.1.1 - compile - - - + org.springframework.boot spring-boot-starter-web 3.2.0 @@ -205,7 +198,7 @@ com.publicissapient.kpidashboard common - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT compile @@ -245,6 +238,16 @@ org.apache.commons commons-lang3 + + javax.ws.rs + javax.ws.rs-api + 2.1.1 + + + org.glassfish.jersey.core + jersey-common + 2.40 + @@ -295,6 +298,11 @@ + + org.sonarsource.scanner.maven + sonar-maven-plugin + 3.11.0.3922 + org.jacoco jacoco-maven-plugin @@ -310,7 +318,7 @@ src/main/java/**/*.java src/test/java/**/*.java - + true 2 @@ -318,7 +326,7 @@ java|javax,org,com - + diff --git a/rally/pom.xml b/rally/pom.xml index 946c20ae8..24e13e3d9 100644 --- a/rally/pom.xml +++ b/rally/pom.xml @@ -14,7 +14,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml rally-processor diff --git a/sonar/pom.xml b/sonar/pom.xml index 15ab99503..85da7c0fc 100644 --- a/sonar/pom.xml +++ b/sonar/pom.xml @@ -21,7 +21,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml sonar-processor diff --git a/teamcity/pom.xml b/teamcity/pom.xml index 1b9f05334..2c307a92b 100644 --- a/teamcity/pom.xml +++ b/teamcity/pom.xml @@ -21,7 +21,7 @@ com.publicissapient.kpidashboard processors - 14.1.0-SNAPSHOT + 15.1.0-SNAPSHOT ../pom.xml teamcity-processor