From ef376d3027965ced9ee9be932caecc6d1f51c6c5 Mon Sep 17 00:00:00 2001 From: iwata Date: Thu, 30 Nov 2023 09:47:48 +0900 Subject: [PATCH] =?UTF-8?q?AzireFunction=E3=81=AEpipeline=E7=94=A8?= =?UTF-8?q?=E3=81=AB=E4=BD=9C=E3=81=A3=E3=81=9F=E3=81=8C=E5=90=8D=E5=89=8D?= =?UTF-8?q?=E3=81=8C=E5=88=86=E3=81=8B=E3=82=8A=E3=81=A5=E3=82=89=E3=81=84?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- azure-pipelines.yml | 160 -------------------------------------------- 1 file changed, 160 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 7c2e626..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,160 +0,0 @@ -stages: -- stage: __default - jobs: - - job: initialize - displayName: Initialize - pool: - vmImage: ubuntu-latest - steps: - - task: 6d15af64-176c-496d-b583-fd2ae21d4df4@1 - inputs: - repository: self - clean: true - fetchDepth: 1 - persistCredentials: true - - task: CmdLine@2 - displayName: 'タグが付けられたCommitがmainブランチに存在するか確認' - inputs: - script: | - git fetch origin main:main - if git merge-base --is-ancestor $(Build.SourceVersion) main; then - echo "This commit is in the main branch." - else - echo "This commit is not in the main branch." - exit 1 - fi - - job: backend_build - dependsOn: - - initialize - condition: succeeded('initialize') - displayName: Build And Push Backend Image - pool: - name: odms-deploy-pipeline - steps: - - task: 6d15af64-176c-496d-b583-fd2ae21d4df4@1 - inputs: - repository: self - clean: true - fetchDepth: 1 - - task: Npm@1 - displayName: npm ci - inputs: - command: ci - workingDir: dictation_server - 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 - script: | - cd dictation_server - npm run test - env: - JWT_PUBLIC_KEY: $(token-public-key) - JWT_PRIVATE_KEY: $(token-private-key) - SENDGRID_API_KEY: $(sendgrid-api-key) - NOTIFICATION_HUB_NAME: $(notification-hub-name) - NOTIFICATION_HUB_CONNECT_STRING: $(notification-hub-connect-string) - STORAGE_ACCOUNT_NAME_US: $(storage-account-name-us) - STORAGE_ACCOUNT_NAME_AU: $(storage-account-name-au) - STORAGE_ACCOUNT_NAME_EU: $(storage-account-name-eu) - STORAGE_ACCOUNT_KEY_US: $(storage-account-key-us) - STORAGE_ACCOUNT_KEY_AU: $(storage-account-key-au) - STORAGE_ACCOUNT_KEY_EU: $(storage-account-key-eu) - STORAGE_ACCOUNT_ENDPOINT_US: $(storage-account-endpoint-us) - STORAGE_ACCOUNT_ENDPOINT_AU: $(storage-account-endpoint-au) - STORAGE_ACCOUNT_ENDPOINT_EU: $(storage-account-endpoint-eu) - ADB2C_TENANT_ID: $(adb2c-tenant-id) - ADB2C_CLIENT_ID: $(adb2c-client-id) - ADB2C_CLIENT_SECRET: $(adb2c-client-secret) - MAIL_FROM: xxxxxx - APP_DOMAIN: xxxxxxxxx - EMAIL_CONFIRM_LIFETIME: 0 - TENANT_NAME: xxxxxxxxxxxx - SIGNIN_FLOW_NAME: xxxxxxxxxxxx - STORAGE_TOKEN_EXPIRE_TIME: 0 - REFRESH_TOKEN_LIFETIME_WEB: 86400000 - REFRESH_TOKEN_LIFETIME_DEFAULT: 2592000000 - ACCESS_TOKEN_LIFETIME_WEB: 7200000 - REDIS_HOST: xxxxxxxxxxxx - REDIS_PORT: 0 - REDIS_PASSWORD: xxxxxxxxxxxx - ADB2C_CACHE_TTL: 0 - - task: Docker@0 - displayName: build - inputs: - azureSubscriptionEndpoint: 'omds-service-connection-stg' - azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}' - dockerFile: DockerfileServerDictation.dockerfile - imageName: odmscloud/staging/dictation:$(Build.SourceVersion) - buildArguments: | - BUILD_VERSION=$(Build.SourceVersion) - - task: Docker@0 - displayName: push - inputs: - azureSubscriptionEndpoint: 'omds-service-connection-stg' - azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}' - action: Push an image - imageName: odmscloud/staging/dictation:$(Build.SourceVersion) - - job: backend_deploy - dependsOn: - - backend_build - condition: succeeded('backend_build') - displayName: Backend Deploy - pool: - vmImage: ubuntu-latest - steps: - - task: 6d15af64-176c-496d-b583-fd2ae21d4df4@1 - inputs: - repository: self - clean: true - fetchDepth: 1 - - task: AzureWebAppContainer@1 - inputs: - azureSubscription: 'omds-service-connection-stg' - appName: 'app-odms-dictation-stg' - deployToSlotOrASE: true - resourceGroupName: 'stg-application-rg' - slotName: 'staging' - containers: 'crodmsregistrymaintenance.azurecr.io/odmscloud/staging/dictation:$(Build.SourceVersion)' - - job: smoke_test - dependsOn: - - backend_deploy - condition: succeeded('backend_deploy') - displayName: 'smoke test' - pool: - name: odms-deploy-pipeline - steps: - - task: 6d15af64-176c-496d-b583-fd2ae21d4df4@1 - inputs: - repository: self - clean: true - fetchDepth: 1 - - job: swap_slot - dependsOn: - - smoke_test - condition: succeeded('smoke_test') - displayName: 'Swap Staging and Production' - pool: - name: odms-deploy-pipeline - steps: - - task: 6d15af64-176c-496d-b583-fd2ae21d4df4@1 - inputs: - repository: self - clean: true - fetchDepth: 1 - - task: AzureAppServiceManage@0 - displayName: 'Azure App Service Manage: app-odms-dictation-stg' - inputs: - azureSubscription: 'omds-service-connection-stg' - action: 'Swap Slots' - WebAppName: 'app-odms-dictation-stg' - ResourceGroupName: 'stg-application-rg' - SourceSlot: 'staging' - SwapWithProduction: true