From 133db833eea29d1bd747fbeccdc02c100448033b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B9=AF=E6=9C=AC=20=E9=96=8B?= Date: Mon, 25 Mar 2024 08:09:16 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20850:=20staging-pipeline=E3=81=AE?= =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E5=AE=9F=E8=A1=8C=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task3948: staging-pipelineのテスト実行修正](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3948) - docker-composeを使用したテストは `ubuntu-latest` で実行する必要があったため、pipelineを修正 ## レビューポイント - 問題がありそうな記述はあるか - 実行順の依存関係等が壊れていないか ## 動作確認状況 - 未動作確認。4月以降、CCB対応時に動かして確認を想定。 --- azure-pipelines-staging.yml | 38 ++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/azure-pipelines-staging.yml b/azure-pipelines-staging.yml index 16550b1..042a731 100644 --- a/azure-pipelines-staging.yml +++ b/azure-pipelines-staging.yml @@ -170,9 +170,29 @@ jobs: --type block \ --overwrite \ --file $(Build.ArtifactStagingDirectory)/$(Build.SourceVersion).zip -- job: function_build +- job: function_test dependsOn: frontend_build_production condition: succeeded('frontend_build_production') + displayName: UnitTest + pool: + vmImage: ubuntu-latest + steps: + - checkout: self + clean: true + fetchDepth: 1 + - task: Bash@3 + displayName: Bash Script (Test) + inputs: + targetType: inline + workingDirectory: dictation_function/.devcontainer + script: | + docker-compose -f pipeline-docker-compose.yml build + docker-compose -f pipeline-docker-compose.yml up -d + docker-compose exec -T dictation_function sudo npm ci + docker-compose exec -T dictation_function sudo npm run test +- job: function_build + dependsOn: function_test + condition: succeeded('function_test') displayName: Build And Push Function Image pool: name: odms-deploy-pipeline @@ -186,22 +206,6 @@ jobs: command: ci workingDir: dictation_function verbose: false - - task: AzureKeyVault@2 - displayName: 'Azure Key Vault: kv-odms-secret-stg' - inputs: - ConnectedServiceName: 'omds-service-connection-stg' - KeyVaultName: kv-odms-secret-stg - SecretsFilter: '*' - - task: Bash@3 - displayName: Bash Script (Test) - inputs: - targetType: inline - workingDirectory: dictation_function/.devcontainer - script: | - docker-compose -f pipeline-docker-compose.yml build - docker-compose -f pipeline-docker-compose.yml up -d - docker-compose exec -T dictation_function sudo npm ci - docker-compose exec -T dictation_function sudo npm run test - task: Docker@0 displayName: build inputs: