trigger: - master variables: service-connection-name: '' tenant-id: '' hilo-cluster-subscription: '' hilo-cluster-resource-group: '' hilo-cluster-pool: '' hilo-cluster: '' cluster-storage-account: '' cluster-container: '' job-jar-storage-path: '' #Example: 'jars/flink-job.jar' job-jar-local-path: '' #Example: 'target/FlinkJobExample-0.0.1.jar' pipeline-keyvault-name: '' job-name: '' parallelism: '' entryclass: '' #Example: 'com.microsoft.hilo.flink.job.streaming.SleepJob' pool: vmImage: ubuntu-latest steps: - task: Maven@3 name: 'BuildJobCode' inputs: mavenPomFile: 'pom.xml' mavenOptions: '-Xmx3072m' javaHomeOption: 'JDKVersion' jdkVersionOption: '1.11' jdkArchitectureOption: 'x64' publishJUnitResults: true testResultsFiles: '**/surefire-reports/TEST-*.xml' goals: 'install' - task: AzureKeyVault@2 inputs: azureSubscription: $(service-connection-name) KeyVaultName: $(pipeline-keyvault-name) SecretsFilter: '*' - task: AzureCLI@2 name: 'UploadJobJar' inputs: azureSubscription: $(service-connection-name) scriptType: 'bash' scriptLocation: 'inlineScript' inlineScript: | az storage blob delete \ --account-name $(cluster-storage-account) \ --account-key $(cluster-storage-key) \ --container-name $(cluster-container) \ --name $(job-jar-storage-path) --delete-snapshots include az storage blob upload \ --account-name $(cluster-storage-account) \ --account-key $(cluster-storage-key) \ --container-name $(cluster-container) \ --name $(job-jar-storage-path) \ --file $(job-jar-local-path) - task: AzurePowerShell@5 env: CLIENT_ID: $(service-principal-key) CLIENT_SECRET: $(service-principal-secret) HILO_CLUSTER_POOL: $(hilo-cluster-pool) HILO_CLUSTER_NAME: $(hilo-cluster) HILO_CLUSTER_SUBSCRIPTION: $(hilo-cluster-subscription) HILO_CLUSTER_RESOURCE_GROUP: $(hilo-cluster-resource-group) CLUSTER_STORAGE_ACCOUNT: $(cluster-storage-account) CLUSTER_STORAGE_CONTAINER: $(cluster-container) TENANT_ID: $(tenant-id) JOB_JAR_STORAGE_PATH: $(job-jar-storage-path) JOB_NAME: $(job-name) JOB_ACTION: $(action) PARALLELISM: $(parallelism) ENTRY_CLASS: $(entryclass) inputs: azureSubscription: $(service-connection-name) ScriptType: 'FilePath' ScriptPath: '.pipeline/flink-job-azure-pipeline.ps1' azurePowerShellVersion: 'LatestVersion'