Merge pull request #9 from philips-forks/refator-pipeline
Refator pipeline
This commit is contained in:
commit
f1a0fa8b25
|
|
@ -0,0 +1,6 @@
|
|||
[bumpversion]
|
||||
current_version = 1.0.7
|
||||
commit = False
|
||||
tag = False
|
||||
|
||||
[bumpversion:file:VERSION]
|
||||
|
|
@ -1,98 +1,175 @@
|
|||
name: CI-CD
|
||||
name: CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'edi-foundation-integration'
|
||||
# - $default-branch
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
env:
|
||||
COVER: true
|
||||
Init:
|
||||
name: Initialize
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go 1.16
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16.x
|
||||
id: go
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.36.0
|
||||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||
chmod +x ./cc-test-reporter
|
||||
|
||||
- name: Verify Code Generation
|
||||
run: |
|
||||
make verify-generate
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
make lint
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
make build
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||
run: |
|
||||
./.github/workflows/test.sh
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-20.04
|
||||
- name: Extract branch name
|
||||
uses: vazco/github-actions-branch-name@v1
|
||||
id: branch
|
||||
|
||||
Build-Automation-Solution:
|
||||
needs: [Init]
|
||||
runs-on: builder_blr
|
||||
name: Build Automation Solution
|
||||
steps:
|
||||
- name: cleanup
|
||||
run: Remove-Item ${{ github.workspace }}\* -Recurse
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.GH_PAT_TOKEN }}
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
with:
|
||||
vs-version: '[16.4,17.0)'
|
||||
- name: Add dotnet
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '3.1.x'
|
||||
- name: msbuild execute
|
||||
run: msbuild ${{ github.workspace }}\Build\api_automation_build.proj /t:build /p:configuration=release,platform=anycpu /nowarn:MSB4011,MSB4210
|
||||
- name: push nuget to artifactory
|
||||
run: dotnet nuget push ${{ github.workspace }}\AutomationTest\**\*.nupkg -s JFrogrepository --skip-duplicate
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Docker Build
|
||||
run: |
|
||||
make docker
|
||||
|
||||
- name: Docker login
|
||||
run: |
|
||||
docker login --username '${{ secrets.DOCKER_USER }}' --password '${{ secrets.DOCKER_PSWD }}' '${{ secrets.DOCKER_REPO }}'
|
||||
|
||||
- name: Docker tag & Push
|
||||
run: |
|
||||
docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:${{ github.sha }}
|
||||
docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:latest
|
||||
docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:${{ github.sha }}
|
||||
docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:latest
|
||||
DeployCIGated:
|
||||
needs: [Init, Build-Automation-Solution]
|
||||
uses: ./.github/workflows/ci-deploy-gated.yml
|
||||
secrets:
|
||||
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
|
||||
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
|
||||
HSDP_DOCKER_USER: ${{ secrets.HSDP_DOCKER_USER }}
|
||||
HSDP_DOCKER_PASSWORD: ${{ secrets.HSDP_DOCKER_PASSWORD }}
|
||||
CODESCENE_CI_CD_GITHUB_TOKEN: ${{ secrets.CODESCENE_CI_CD_GITHUB_TOKEN }}
|
||||
INNER_SOURCE_ACTIONS_APP_ID: ${{ secrets.INNER_SOURCE_ACTIONS_APP_ID }}
|
||||
INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64: ${{ secrets.INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64 }}
|
||||
GH_PAT_TOKEN: ${{secrets.GH_PAT_TOKEN}}
|
||||
|
||||
CI-Automation-Variables:
|
||||
needs: [DeployCIGated]
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
oauth_client_secret: ${{ steps.core-output.outputs.oauth_client_secret }}
|
||||
ci_service_private_key: ${{ steps.core-output.outputs.ci_service_private_key }}
|
||||
envoy_base_url: "https://${{ steps.gateway-output.outputs.gateway_url }}"
|
||||
deploy_user: ${{ steps.core-output.outputs.deploy_user }}
|
||||
deploy_password: ${{ steps.core-output.outputs.deploy_password }}
|
||||
ci_service_id: ${{ steps.core-output.outputs.ci_service_id }}
|
||||
oauth_client_id: ${{ steps.core-output.outputs.oauth_client_id }}
|
||||
steps:
|
||||
- name: Download Core output
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: client-test-core-output
|
||||
path: ${{ github.workspace}}/output/core
|
||||
- name: Download Gateway output
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: client-test-api-gateway-output
|
||||
path: ${{ github.workspace}}/output/gateway
|
||||
- name: Get Outputs from Core module
|
||||
working-directory: ${{ github.workspace}}/output/core
|
||||
id: core-output
|
||||
shell: bash
|
||||
run: |
|
||||
apt update && apt install jq -y
|
||||
core_output=$(cat output.json)
|
||||
|
||||
# Trigger-Workflow:
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# needs: [build, docker]
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: convictional/trigger-workflow-and-wait@v1.6.1
|
||||
# with:
|
||||
# owner: philips-internal
|
||||
# repo: hds-auth-gateway
|
||||
# github_token: ${{ secrets.ACCESS_TOKEN }}
|
||||
# workflow_file_name: cd.yaml
|
||||
# ref: master
|
||||
oauth_client_secret=$(echo $core_output | jq -r '.fdn_envoy_oauth_client_password.value')
|
||||
ci_service_private_key=$(echo $core_output | jq -r '.foundation_envoy_nightly_service_private_key.value')
|
||||
deploy_user=$(echo $core_output | jq -r '.cf_deploy_user.value')
|
||||
deploy_password=$(echo $core_output | jq -r '.cf_deploy_password.value')
|
||||
ci_service_id=$(echo $core_output | jq -r '.foundation_envoy_nightly_service_id.value')
|
||||
oauth_client_id=$(echo $core_output | jq -r '.fdn_envoy_oauth_client_id.value')
|
||||
|
||||
# Release-Candidate:
|
||||
# if: github.ref == 'refs/heads/main'
|
||||
# needs: [Trigger-Workflow]
|
||||
# runs-on: ubuntu-20.04
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
echo "::set-output name=oauth_client_secret::$oauth_client_secret"
|
||||
echo "::set-output name=ci_service_private_key::$ci_service_private_key"
|
||||
echo "::set-output name=oauth_client_id::$oauth_client_id"
|
||||
echo "::set-output name=deploy_user::$deploy_user"
|
||||
echo "::set-output name=deploy_password::$deploy_password"
|
||||
echo "::set-output name=ci_service_id::$ci_service_id"
|
||||
|
||||
# - name: Login to Docker Repo
|
||||
# run: docker login --username '${{ secrets.DOCKER_USER }}' --password '${{ secrets.DOCKER_PSWD }}' '${{ env.HSDP_DOCKER_HOST }}'
|
||||
|
||||
# - name: Docker Pull, Tag and Push rc
|
||||
# run: |
|
||||
# docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:latest
|
||||
# docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:latest ${{ env.HSDP_DOCKER_HOST }}/edisp-releases/edi-foundation-oauth2-proxy:${{ github.sha }}-rc
|
||||
# docker push ${{ env.HSDP_DOCKER_HOST }}/edisp-releases/edi-foundation-oauth2-proxy:${{ github.sha }}-rc
|
||||
- name: Get Outputs from Api Gateway
|
||||
working-directory: ${{ github.workspace}}/output/gateway
|
||||
id: gateway-output
|
||||
shell: bash
|
||||
run: |
|
||||
apt update && apt install jq -y
|
||||
output=$(cat output.json)
|
||||
|
||||
gateway_url=$(echo $output | jq -r '.api_gateway_url.value')
|
||||
echo $gateway_url
|
||||
|
||||
echo "::set-output name=gateway_url::$gateway_url"
|
||||
|
||||
# TestCI-Gated:
|
||||
# if: github.ref == 'refs/heads/workflow-trigger'
|
||||
# needs: [Build-Automation-Solution, CI-Automation-Variables]
|
||||
# runs-on: builder_blr
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# with:
|
||||
# token: ${{ secrets.GH_TOKEN_CI }}
|
||||
|
||||
# - name: Add dotnet
|
||||
# uses: actions/setup-dotnet@v1
|
||||
# with:
|
||||
# dotnet-version: '3.1.x'
|
||||
|
||||
# - name: Restore Automation Test Project
|
||||
# working-directory: ${{ github.workspace }}
|
||||
# run: |
|
||||
# dotnet restore ${{ github.workspace }}\AutomationTest\automation.packages.proj --packages ./automation-dll
|
||||
|
||||
# - uses: microsoft/variable-substitution@v1
|
||||
# name: Update Env Json
|
||||
# with:
|
||||
# files: ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest/1.0.3/lib/net3.1/Env.json
|
||||
# env:
|
||||
# PipelineConfiguration.AuthUserName: "sai.chand@philips.com"
|
||||
# PipelineConfiguration.AuthPassword: ${{ secrets.IAM_TEST_USER_PASSWORD }}
|
||||
# PipelineConfiguration.APIGatewayBaseUrl: "https://envoyci-gated-api-gateway.us-east.philips-healthsuite.com"
|
||||
# PipelineConfiguration.ServiceID: ${{ needs.CI-Automation-Variables.outputs.ci_service_id }}
|
||||
# PipelineConfiguration.ServiceIDPrivateKey: ${{ needs.CI-Automation-Variables.outputs.ci_service_private_key }}
|
||||
# PipelineConfiguration.OauthClientID: ${{ needs.CI-Automation-Variables.outputs.oauth_client_id }}
|
||||
# PipelineConfiguration.OauthClientSecret: ${{ needs.CI-Automation-Variables.outputs.oauth_client_secret }}
|
||||
# PipelineConfiguration.CFOrgName: "client-EDI-SolutionAccelerator"
|
||||
# PipelineConfiguration.CFSpaceName: "envoyci-gated"
|
||||
# PipelineConfiguration.CFUserName: ${{ secrets.CF_USERNAME }}
|
||||
# PipelineConfiguration.CFPassword: ${{ secrets.CF_PASSWD }}
|
||||
# PipelineConfiguration.CookieName: "edi_session_envoyci-gated"
|
||||
# PipelineConfiguration.CFOauthTokenUrl: "https://login.cloud.pcftest.com/oauth/token"
|
||||
# PipelineConfiguration.CFBaseUrl: "https://api.cloud.pcftest.com/v3"
|
||||
# PipelineConfiguration.CFAuthenticatorAppName: "authenticator_service"
|
||||
# PipelineConfiguration.OauthProxyCookieTimeoutInSeconds: "25"
|
||||
# PipelineConfiguration.AuthenticatorSessionExpireOffsetInPercent: "99"
|
||||
# PipelineConfiguration.AccessTokenTestRoleName: "ENVOY-NIGHTLY-SERVICE-TF-GATED"
|
||||
# PipelineConfiguration.OpenIdConfigurationBaseUrl: "https://foundation-client-test.us-east.philips-healthsuite.com"
|
||||
# PipelineConfiguration.OrgSymmetricKey: ${{ secrets.ORG_SYMMETRIC_KEY }}
|
||||
# PipelineConfiguration.OpenIdConfigOrganizationCertificateMapping: '[{"organizationId":"ed186a39-8b5f-4351-bebc-4e17779c293b","certificate":"-----BEGIN CERTIFICATE-----MIIGaDCCBFCgAwIBAgIUTB3PGrDIqwKPIZfFgawieigND00wDQYJKoZIhvcNAQELBQAwHjEcMBoGA1UEAxMTcGhpbGlwcy1oZWFsdGhzdWl0ZTAeFw0yMjAyMTcwMTQzMTdaFw0yMzAxMTgwMTQzNDVaMB4xHDAaBgNVBAMTE3BoaWxpcHMtaGVh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ZjhmYzQvY2EwHgYDVR0RBBcwFYITcGhpbGlwcy1oZWFsdGhzdWl0ZTB9BgNVHR8EdjB0MHKgcKBuhmxodHRwOi8vcGtpLWNsaWVudC10ZXN0LnVzLWVhc3QucGhpbGlwcy1oZWFsdGhzdWl0ZS5jb20vY29yZS9wa2kvYXBpL2E1ZjIzMzY2LTViOGYtNDFkOC1iNWY5LThkMzczZDJmOGZjNC9jcmwwDQYJKoZIhvcNAQELBQADggIBABUTQsPb6zHrczqllwniWVd8mDMJmvgRKAKFcJno1n1FRx7emTmk2zCFQQiURRGRlOKO+tY08AYPBLbqm+90tHvYBKzGSRU4uS9VgkKzwYn/NdhKgb2FGJIZF1Vsh9IfJTwt5/KUxjhDQW8MXtlgzNCrFavgrkBa2Mcj0/7Tc4Fh4Brj60UbfYU35HNUAnQibs9Ld6ffvmpmyU4ARNO8ZS6bpZzeTIipgwySGllyK7j1cbih764TQh9vtS19uWhxV4BpeLjoBT8GWPzu/nOf2WQucDx0DpDt4gZCvAiLkL93EndhMD6EOHRxkfcU4RCLDwwr2jP1omMGdTo9p9edO4ZCVER/3oskkcS6TQlpDgaKJFqWehKQYF/M/WVKHN+1DsBklIfFFrZtWdhwPD56jh0apjfxIn2WBlztXCp2lblOqwxmf6A+WAcfZh/CF4q6TFzw9+aBm33stbxGKVl2mgITil2UIlyq4iFRftcErMXd3OErxQknxgnsKl2xfFHOrrSUp5n8sQ0gvVHbOjIXwq+V/F0pwF2nwcHliOnrIaIwW9eqjvbGoaeysNJwEKIl+5xpN/5GXXAk69tPnp2RrYAQjGwqtAfsb+3BNbuzl54JvSp90tlNcW7ujs7r1LvXpUPbSasT8rOhzsZBEw1fVbWIOc8/Ip7ED+UESIfiRhK0-----END CERTIFICATE-----"},{"organizationId":"51e2503f-c1df-430d-a1ce-2524fa796cda","certificate":"-----BEGIN CERTIFICATE-----MIIGaDCCBFCgAwIBAgIULlL9VXieeY/tgVYPtTqkJ5yAJSwwDQYJKoZIhvcNAQELBQAwHjE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
|
||||
# PipelineConfiguration.SSOTokenUserName: "user"
|
||||
# PipelineConfiguration.TenantDetails: '{"ValidTenant": {"tenantName": "org1-envoyci-gated-api-gateway", "iamOrganizationId": "51e2503f-c1df-430d-a1ce-2524fa796cda"}, "InvalidTenant":{"tenantName": "invalidorg-envoyci-gated-api-gateway","iamOrganizationId": "1234"},"AccessTokenTenant":{"tenantName": "accesstokentestorg","iamOrganizationId": "9ccf3768-53b9-412c-ae22-dcd5aa38242e"}}'
|
||||
# PipelineConfiguration.IAMAuthorizationUrl: "https://iam-client-test.us-east.philips-healthsuite.com/authorize/oauth2/token"
|
||||
# PipelineConfiguration.IAMAccessTokenUrl: "https://iam-client-test.us-east.philips-healthsuite.com/oauth2/access_token"
|
||||
# PipelineConfiguration.IDMClientBaseUrl: "https://idm-client-test.us-east.philips-healthsuite.com/authorize/identity"
|
||||
# PipelineConfiguration.IAMGetUserUrl: "https://idm-client-test.us-east.philips-healthsuite.com/authorize/identity/User?profileType=membership&userId="
|
||||
# PipelineConfiguration.CDRBaseUrl: "https://cdr-edisa-test.us-east.philips-healthsuite.com"
|
||||
|
||||
# - name: Run Tests
|
||||
# continue-on-error: true
|
||||
# working-directory: ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest
|
||||
# run: |
|
||||
# dotnet test **/net3.1/*Test.dll --no-restore --filter TestCategory=PostDeployment --results-directory ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest/TestResults --logger trx
|
||||
# dotnet test **/net3.1/*Test.dll --no-restore --filter TestCategory=GatedSanity --results-directory ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest/TestResults --logger trx
|
||||
|
||||
# - name: email-notification
|
||||
# continue-on-error: true
|
||||
# working-directory: ${{ github.workspace }}/Build/PS
|
||||
# run: |
|
||||
# powershell -ExecutionPolicy RemoteSigned -NoExit -File email-notification.ps1 -BuildNumber ${{ github.run_id }} -ReportFolder ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest/TestResults -Subject Api-Gateway-WithoutMultitenancy-Gated
|
||||
|
|
@ -124,6 +124,7 @@ jobs:
|
|||
INNER_SOURCE_ACTIONS_APP_ID: ${{ secrets.INNER_SOURCE_ACTIONS_APP_ID }}
|
||||
INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64: ${{ secrets.INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64 }}
|
||||
|
||||
|
||||
- id: plan
|
||||
uses: ./../.actions/terragrunt-plan-action
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -1,189 +0,0 @@
|
|||
name: CI-GATED
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
Init:
|
||||
name: Initialize
|
||||
runs-on: [self-hosted, research]
|
||||
container:
|
||||
image: docker.na1.hsdp.io/edi/build-env:master-45
|
||||
credentials:
|
||||
username: ${{ secrets.HSDP_DOCKER_USER }}
|
||||
password: ${{ secrets.HSDP_DOCKER_PASSWORD }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Extract branch name
|
||||
uses: vazco/github-actions-branch-name@v1
|
||||
id: branch
|
||||
|
||||
Build-Automation-Solution:
|
||||
needs: [Init]
|
||||
runs-on: builder_blr
|
||||
name: Build Automation Solution
|
||||
steps:
|
||||
- name: cleanup
|
||||
run: Remove-Item ${{ github.workspace }}\* -Recurse
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.GH_TOKEN_CI }}
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
with:
|
||||
vs-version: '[16.4,17.0)'
|
||||
- name: Add dotnet
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '3.1.x'
|
||||
- name: msbuild execute
|
||||
run: msbuild ${{ github.workspace }}\Build\api_automation_build.proj /t:build /p:configuration=release,platform=anycpu /nowarn:MSB4011,MSB4210
|
||||
- name: push nuget to artifactory
|
||||
run: dotnet nuget push ${{ github.workspace }}\AutomationTest\**\*.nupkg -s JFrogrepository --skip-duplicate
|
||||
|
||||
DeployCIGated:
|
||||
if: github.ref == 'refs/heads/workflow-trigger'
|
||||
needs: [Init, Build-Automation-Solution]
|
||||
uses: ./.github/workflows/ci-deploy-gated.yml
|
||||
secrets:
|
||||
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
|
||||
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
|
||||
HSDP_DOCKER_USER: ${{ secrets.HSDP_DOCKER_USER }}
|
||||
HSDP_DOCKER_PASSWORD: ${{ secrets.HSDP_DOCKER_PASSWORD }}
|
||||
CODESCENE_CI_CD_GITHUB_TOKEN: ${{ secrets.CODESCENE_CI_CD_GITHUB_TOKEN }}
|
||||
INNER_SOURCE_ACTIONS_APP_ID: ${{ secrets.INNER_SOURCE_ACTIONS_APP_ID }}
|
||||
INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64: ${{ secrets.INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64 }}
|
||||
GH_PAT_TOKEN: ${{secrets.GH_PAT_TOKEN}}
|
||||
|
||||
CI-Automation-Variables:
|
||||
if: github.ref == 'refs/heads/workflow-trigger'
|
||||
needs: [DeployCIGated]
|
||||
runs-on: [self-hosted, research]
|
||||
container:
|
||||
image: docker.na1.hsdp.io/edi/build-env:master-45
|
||||
credentials:
|
||||
username: ${{ secrets.HSDP_DOCKER_USER }}
|
||||
password: ${{ secrets.HSDP_DOCKER_PASSWORD }}
|
||||
outputs:
|
||||
oauth_client_secret: ${{ steps.core-output.outputs.oauth_client_secret }}
|
||||
ci_service_private_key: ${{ steps.core-output.outputs.ci_service_private_key }}
|
||||
envoy_base_url: "https://${{ steps.gateway-output.outputs.gateway_url }}"
|
||||
deploy_user: ${{ steps.core-output.outputs.deploy_user }}
|
||||
deploy_password: ${{ steps.core-output.outputs.deploy_password }}
|
||||
ci_service_id: ${{ steps.core-output.outputs.ci_service_id }}
|
||||
oauth_client_id: ${{ steps.core-output.outputs.oauth_client_id }}
|
||||
steps:
|
||||
- name: Download Core output
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: client-test-core-output
|
||||
path: ${{ github.workspace}}/output/core
|
||||
- name: Download Gateway output
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: client-test-api-gateway-output
|
||||
path: ${{ github.workspace}}/output/gateway
|
||||
- name: Get Outputs from Core module
|
||||
working-directory: ${{ github.workspace}}/output/core
|
||||
id: core-output
|
||||
shell: bash
|
||||
run: |
|
||||
apt update && apt install jq -y
|
||||
core_output=$(cat output.json)
|
||||
|
||||
oauth_client_secret=$(echo $core_output | jq -r '.fdn_envoy_oauth_client_password.value')
|
||||
ci_service_private_key=$(echo $core_output | jq -r '.foundation_envoy_nightly_service_private_key.value')
|
||||
deploy_user=$(echo $core_output | jq -r '.cf_deploy_user.value')
|
||||
deploy_password=$(echo $core_output | jq -r '.cf_deploy_password.value')
|
||||
ci_service_id=$(echo $core_output | jq -r '.foundation_envoy_nightly_service_id.value')
|
||||
oauth_client_id=$(echo $core_output | jq -r '.fdn_envoy_oauth_client_id.value')
|
||||
|
||||
echo "::set-output name=oauth_client_secret::$oauth_client_secret"
|
||||
echo "::set-output name=ci_service_private_key::$ci_service_private_key"
|
||||
echo "::set-output name=oauth_client_id::$oauth_client_id"
|
||||
echo "::set-output name=deploy_user::$deploy_user"
|
||||
echo "::set-output name=deploy_password::$deploy_password"
|
||||
echo "::set-output name=ci_service_id::$ci_service_id"
|
||||
|
||||
- name: Get Outputs from Api Gateway
|
||||
working-directory: ${{ github.workspace}}/output/gateway
|
||||
id: gateway-output
|
||||
shell: bash
|
||||
run: |
|
||||
apt update && apt install jq -y
|
||||
output=$(cat output.json)
|
||||
|
||||
gateway_url=$(echo $output | jq -r '.api_gateway_url.value')
|
||||
echo $gateway_url
|
||||
|
||||
echo "::set-output name=gateway_url::$gateway_url"
|
||||
|
||||
TestCI-Gated:
|
||||
if: github.ref == 'refs/heads/workflow-trigger'
|
||||
needs: [Build-Automation-Solution, CI-Automation-Variables]
|
||||
runs-on: builder_blr
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.GH_TOKEN_CI }}
|
||||
|
||||
- name: Add dotnet
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '3.1.x'
|
||||
|
||||
- name: Restore Automation Test Project
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
dotnet restore ${{ github.workspace }}\AutomationTest\automation.packages.proj --packages ./automation-dll
|
||||
|
||||
- uses: microsoft/variable-substitution@v1
|
||||
name: Update Env Json
|
||||
with:
|
||||
files: ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest/1.0.3/lib/net3.1/Env.json
|
||||
env:
|
||||
PipelineConfiguration.AuthUserName: "sai.chand@philips.com"
|
||||
PipelineConfiguration.AuthPassword: ${{ secrets.IAM_TEST_USER_PASSWORD }}
|
||||
PipelineConfiguration.APIGatewayBaseUrl: "https://envoyci-gated-api-gateway.us-east.philips-healthsuite.com"
|
||||
PipelineConfiguration.ServiceID: ${{ needs.CI-Automation-Variables.outputs.ci_service_id }}
|
||||
PipelineConfiguration.ServiceIDPrivateKey: ${{ needs.CI-Automation-Variables.outputs.ci_service_private_key }}
|
||||
PipelineConfiguration.OauthClientID: ${{ needs.CI-Automation-Variables.outputs.oauth_client_id }}
|
||||
PipelineConfiguration.OauthClientSecret: ${{ needs.CI-Automation-Variables.outputs.oauth_client_secret }}
|
||||
PipelineConfiguration.CFOrgName: "client-EDI-SolutionAccelerator"
|
||||
PipelineConfiguration.CFSpaceName: "envoyci-gated"
|
||||
PipelineConfiguration.CFUserName: ${{ secrets.CF_USERNAME }}
|
||||
PipelineConfiguration.CFPassword: ${{ secrets.CF_PASSWD }}
|
||||
PipelineConfiguration.CookieName: "edi_session_envoyci-gated"
|
||||
PipelineConfiguration.CFOauthTokenUrl: "https://login.cloud.pcftest.com/oauth/token"
|
||||
PipelineConfiguration.CFBaseUrl: "https://api.cloud.pcftest.com/v3"
|
||||
PipelineConfiguration.CFAuthenticatorAppName: "authenticator_service"
|
||||
PipelineConfiguration.OauthProxyCookieTimeoutInSeconds: "25"
|
||||
PipelineConfiguration.AuthenticatorSessionExpireOffsetInPercent: "99"
|
||||
PipelineConfiguration.AccessTokenTestRoleName: "ENVOY-NIGHTLY-SERVICE-TF-GATED"
|
||||
PipelineConfiguration.OpenIdConfigurationBaseUrl: "https://foundation-client-test.us-east.philips-healthsuite.com"
|
||||
PipelineConfiguration.OrgSymmetricKey: ${{ secrets.ORG_SYMMETRIC_KEY }}
|
||||
PipelineConfiguration.OpenIdConfigOrganizationCertificateMapping: '[{"organizationId":"ed186a39-8b5f-4351-bebc-4e17779c293b","certificate":"-----BEGIN CERTIFICATE-----MIIGaDCCBFCgAwIBAgIUTB3PGrDIqwKPIZfFgawieigND00wDQYJKoZIhvcNAQELBQAwHjEcMBoGA1UEAxMTcGhpbGlwcy1oZWFsdGhzdWl0ZTAeFw0yMjAyMTcwMTQzMTdaFw0yMzAxMTgwMTQzNDVaMB4xHDAaBgNVBAMTE3BoaWxpcHMtaGVhbHRoc3VpdGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJw+Zb0I2Q3XEDemBkZ2vXN8tF7Q148cbqA0DN5i2SJCqPrGk4uxwj58MUSSeRWNIixXC0byxjkLjHqYr8jEuL9Z011+CHLbGY/u6C6RwnMIXaIhoUo0hpT8BQPFFQnK++pYGTNRaV3phns1YTuORySNNiMaYQ2cak5B4+v/QTaM51aNARJW2Q+WhpVH6/foQABAmciliZDlNL2CctN8Q2stfFNWVDFQ5wuh8qRYAvLbqEeTchGd7ryeHTf2GlRzzUfCUm9G+kZSvfbcIru7hd/tM6V0dqxAof3boTedK/OMak/Y+BnZcj8FsGJ8S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1Vsh9IfJTwt5/KUxjhDQW8MXtlgzNCrFavgrkBa2Mcj0/7Tc4Fh4Brj60UbfYU35HNUAnQibs9Ld6ffvmpmyU4ARNO8ZS6bpZzeTIipgwySGllyK7j1cbih764TQh9vtS19uWhxV4BpeLjoBT8GWPzu/nOf2WQucDx0DpDt4gZCvAiLkL93EndhMD6EOHRxkfcU4RCLDwwr2jP1omMGdTo9p9edO4ZCVER/3oskkcS6TQlpDgaKJFqWehKQYF/M/WVKHN+1DsBklIfFFrZtWdhwPD56jh0apjfxIn2WBlztXCp2lblOqwxmf6A+WAcfZh/CF4q6TFzw9+aBm33stbxGKVl2mgITil2UIlyq4iFRftcErMXd3OErxQknxgnsKl2xfFHOrrSUp5n8sQ0gvVHbOjIXwq+V/F0pwF2nwcHliOnrIaIwW9eqjvbGoaeysNJwEKIl+5xpN/5GXXAk69tPnp2RrYAQjGwqtAfsb+3BNbuzl54JvSp90tlNcW7ujs7r1LvXpUPbSasT8rOhzsZBEw1fVbWIOc8/Ip7ED+UESIfiRhK0-----END CERTIFICATE-----"},{"organizationId":"51e2503f-c1df-430d-a1ce-2524fa796cda","certificate":"-----BEGIN CERTIFICATE-----MIIGaDCCBFCgAwIBAgIULlL9VXieeY/tgVYPtTqkJ5yAJSwwDQYJKoZIhvcNAQELBQAwHjEcMBoGA1UEAxMTcGhpbGlwcy1oZWFsdGhzdWl0ZTAeFw0yMjAyMTcwMTQzMzBaFw0yMzAxMTgwMTQzNTdaMB4xHDAaBgNVBAMTE3BoaWxpcHMtaGVhbHRoc3VpdGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDBpvTseX7EK9HuET9K4uqBEbyHf9S7Oo5pD/IGk9JC6Jev1G3dQcO0O2MlhIGzFnFosl6jrP8sWWEsK1axGc4mT5NFu5eojDOlvkWCkx4RIy9iSDFEg+gupx3o1GpIrhQryRP8MMV+vzPdlixQrWgubH/CIPRtA126BkVW1tTktHIPjwnaV88h9P7RtRso+ECVkHsrW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NAQELBQADggIBAMwsfnvYf6YTLY6ZguUiwd+7Z9sW8gDBfUhtzPbwLMHIGLjKFOyZevZPNitzJj9eNZYaq2BfuYrIbOD1NSCKmf57UcuXRSAbkNNyMu6ncdY+FLN6dwt7yTnvEQ6oka/ObaBDyQh2BpiKneCHHlxG+lFsTt4XWQU4u5t6lI0gxsHpiYJWcg0HyrbBPcYJzYGjttY7HC0zF8GByEoFbunTC7/9IhZixGQNhUkajfzPV3Q8xcFCS794tmwBeNlpaWrKUMaErzSQuCHzlYyIb3oeYqjttKro3qz2zmSI1x8p2SGhOoVWVajeXl4OMeOo3O/BMK6zt2bOKtgU+exo003ve6J6A/rrALF4nQx86tlh5o50JGuImldNHfT58vHoxfJeXqk2cK+yJHHHW+M+xNVoKJ+KFKqFz2JW646SWnZzdz/Vd537eXjMiJVPuCGC48PFP5eXYxxnrPEyUl1q0FglxHvgaJJoTK4Oz95MpjubzgFaSnUj0TDQg46pircAQUW9oay6uTX377smYIBB6/yYKE0tfCKbKcDOgEWP+YKWe+G9Ha3uCdTVSRBC4MYeab5YVGCgW9Qj99jMuwl15xlUa5EdCv0l6QA16C5CoW5/cNOkb8G5wLN1VGY3g6J6FviJgVElF9LUNxRhpkRGaLIYFT5VxmMv8GNZNG9j4ffEIDpc-----END CERTIFICATE-----"}]'
|
||||
PipelineConfiguration.SSOTokenUserName: "user"
|
||||
PipelineConfiguration.TenantDetails: '{"ValidTenant": {"tenantName": "org1-envoyci-gated-api-gateway", "iamOrganizationId": "51e2503f-c1df-430d-a1ce-2524fa796cda"}, "InvalidTenant":{"tenantName": "invalidorg-envoyci-gated-api-gateway","iamOrganizationId": "1234"},"AccessTokenTenant":{"tenantName": "accesstokentestorg","iamOrganizationId": "9ccf3768-53b9-412c-ae22-dcd5aa38242e"}}'
|
||||
PipelineConfiguration.IAMAuthorizationUrl: "https://iam-client-test.us-east.philips-healthsuite.com/authorize/oauth2/token"
|
||||
PipelineConfiguration.IAMAccessTokenUrl: "https://iam-client-test.us-east.philips-healthsuite.com/oauth2/access_token"
|
||||
PipelineConfiguration.IDMClientBaseUrl: "https://idm-client-test.us-east.philips-healthsuite.com/authorize/identity"
|
||||
PipelineConfiguration.IAMGetUserUrl: "https://idm-client-test.us-east.philips-healthsuite.com/authorize/identity/User?profileType=membership&userId="
|
||||
PipelineConfiguration.CDRBaseUrl: "https://cdr-edisa-test.us-east.philips-healthsuite.com"
|
||||
|
||||
- name: Run Tests
|
||||
continue-on-error: true
|
||||
working-directory: ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest
|
||||
run: |
|
||||
dotnet test **/net3.1/*Test.dll --no-restore --filter TestCategory=PostDeployment --results-directory ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest/TestResults --logger trx
|
||||
dotnet test **/net3.1/*Test.dll --no-restore --filter TestCategory=GatedSanity --results-directory ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest/TestResults --logger trx
|
||||
|
||||
- name: email-notification
|
||||
continue-on-error: true
|
||||
working-directory: ${{ github.workspace }}/Build/PS
|
||||
run: |
|
||||
powershell -ExecutionPolicy RemoteSigned -NoExit -File email-notification.ps1 -BuildNumber ${{ github.run_id }} -ReportFolder ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest/TestResults -Subject Api-Gateway-WithoutMultitenancy-Gated
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'edi-foundation-integration'
|
||||
# - $default-branch
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
unit-test:
|
||||
env:
|
||||
COVER: true
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go 1.16
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16.x
|
||||
id: go
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.36.0
|
||||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||
chmod +x ./cc-test-reporter
|
||||
|
||||
- name: Verify Code Generation
|
||||
run: |
|
||||
make verify-generate
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
make lint
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
make build
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||
run: |
|
||||
./.github/workflows/test.sh
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Docker Build
|
||||
run: |
|
||||
make docker
|
||||
|
||||
- name: Docker login
|
||||
run: |
|
||||
docker login --username '${{ secrets.DOCKER_USER }}' --password '${{ secrets.DOCKER_PSWD }}' '${{ secrets.DOCKER_REPO }}'
|
||||
|
||||
- name: Docker tag & Push
|
||||
run: |
|
||||
docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:${{ github.sha }}
|
||||
docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:latest
|
||||
docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:${{ github.sha }}
|
||||
docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:latest
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<Company>Philips</Company>
|
||||
<Version>1.0.2</Version>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ToolsDir Condition=" '$(ToolsDir)' == '' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\'))</ToolsDir>
|
||||
<FLS_DIR Condition="'$(FLS_DIR)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\'))</FLS_DIR>
|
||||
<CommonTasksFile >$(ToolsDir)Common.Targets.proj</CommonTasksFile>
|
||||
|
||||
</PropertyGroup>
|
||||
<Import Project="$(ToolsDir)api_automation_build.proj" />
|
||||
<Import Project="$(ToolsDir)Common.Targets.proj" />
|
||||
|
||||
|
||||
|
||||
<UsingTask TaskName="IncremnetVersion" TaskFactory="CodeTaskFactory" AssemblyFile="c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Build.Tasks.v4.0.dll">
|
||||
<ParameterGroup>
|
||||
<VersionString ParameterType="System.String" Required="True" />
|
||||
<VersionIncrement ParameterType="System.String" Required="True" />
|
||||
<IncrementedVersion ParameterType="System.String" Output="true" />
|
||||
</ParameterGroup>
|
||||
<Task>
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.IO.Compression.FileSystem" />
|
||||
<Using Namespace="System" />
|
||||
<Using Namespace="System.IO" />
|
||||
<Using Namespace="System.IO.Compression" />
|
||||
<Code Type="Fragment" Language="cs">
|
||||
<![CDATA[
|
||||
Version incrementedVer;
|
||||
try
|
||||
{
|
||||
Log.LogMessage("incrementing Version task with params : VersionString = {0} VersionIncrement = {1}", VersionString, VersionIncrement);
|
||||
Version ver = new Version();
|
||||
int inc;
|
||||
if (!Version.TryParse(VersionString, out ver))
|
||||
{
|
||||
throw new Exception(string.Format("Illegal version format loaded: {0}", VersionString));
|
||||
}
|
||||
if (!Int32.TryParse(VersionIncrement, out inc))
|
||||
{
|
||||
throw new Exception(string.Format("Illegal version format loaded: {0}", VersionString));
|
||||
}
|
||||
|
||||
incrementedVer = new Version(ver.Major, ver.Minor, ver.Build + inc);
|
||||
IncrementedVersion = incrementedVer.ToString();
|
||||
Log.LogMessage("incremented Version : {0}", incrementedVer.ToString());
|
||||
return true;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.LogError("ex");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
]]>
|
||||
</Code>
|
||||
</Task>
|
||||
</UsingTask>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
|
||||
<ToolsDir Condition=" '$(ToolsDir)' == '' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\'))</ToolsDir>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(ToolsDir)Common.Properties.proj" />
|
||||
|
||||
<Target Name="IncremnetAssembly">
|
||||
|
||||
<IncremnetVersion VersionString="$(Version)" VersionIncrement="1" >
|
||||
|
||||
<Output PropertyName="ProductVersion" TaskParameter="IncrementedVersion" />
|
||||
|
||||
</IncremnetVersion>
|
||||
<Message Importance="HIGH" Text="xx $(ProductVersion) $(IncrementedVersion) calling XmlPoke"/>
|
||||
|
||||
<XmlPoke XmlInputPath="$(ToolsDir)..\Directory.Build.props" Query="//Version" Value="$(ProductVersion)" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="StageAssemblyInfo">
|
||||
|
||||
<Message Importance="high" Text="Staging Common assemblyInfo from: $(ToolsDir)..\Directory.Build.Props to: $(SubSystemRootDir)Directory.Build.Props*"/>
|
||||
<!--<Copy SourceFiles="$(ToolsDir)..\Directory.Build.Props" DestinationFiles="$(SubSystemRootDir)Directory.Build.Props" OverwriteReadOnlyFiles="true" />-->
|
||||
</Target>
|
||||
|
||||
<Target Name="UpdateBuildNumber">
|
||||
<Message Importance="high" Text="Executing target: UpdateBuildNumber"/>
|
||||
<IncremnetVersion VersionString="$(Version)" VersionIncrement="0" >
|
||||
<Output PropertyName="ProductVersion" TaskParameter="IncrementedVersion" />
|
||||
</IncremnetVersion>
|
||||
|
||||
<PropertyGroup>
|
||||
<Organization Condition=" '$(Organization)' == '' ">++++ ServiceId Not Assigned ++++</Organization>
|
||||
<ProjID Condition=" '$(ProjID)' == '' ">++++ ServiceId Not Assigned ++++</ProjID>
|
||||
<ServiceId Condition=" '$(ServiceId)' == '' " >++++ ServiceId Not Assigned ++++</ServiceId>
|
||||
</PropertyGroup>
|
||||
<Message Importance="high" Text="Using BundleVersion=$(ProductVersion)"/>
|
||||
<Message Importance="high" Text="##vso[build.updatebuildnumber]$(Organization)-$(ProjID)-$(ServiceId)-$(ProductVersion)"/>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<SrcDir Condition=" '$(SrcDir)' == '' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\AutomationTest\'))</SrcDir>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(ToolsDir)Common.Properties.proj" />
|
||||
<ItemGroup>
|
||||
<Testproj Include="$(SrcDir)**/*.UnitTest.csproj" />
|
||||
<TestFolders Include="@(Testproj->'%(RootDir)%(Directory)')" />
|
||||
</ItemGroup>
|
||||
<Target Name="build">
|
||||
<CallTarget Targets="IncremnetAssembly"/>
|
||||
<!--<Exec Command="dotnet D:\SonarQube\sonar-scanner-msbuild-4.7.1.2311-netcoreapp2.0\SonarScanner.MSBuild.dll begin /k:Api-Gateway-Automation " />-->
|
||||
<Exec Command="dotnet build $(SrcDir)Philips.EDI.Foundation.APIGateway.AutomationTest.sln" WorkingDirectory="$(SrcDir)" />
|
||||
<!--<Exec Command="dotnet D:\SonarQube\sonar-scanner-msbuild-4.7.1.2311-netcoreapp2.0\SonarScanner.MSBuild.dll end" />-->
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
Loading…
Reference in New Issue