diff --git a/.azure-pipelines/workflows/periodic_reporting.yml b/.azure-pipelines/workflows/periodic_reporting.yml new file mode 100644 index 00000000..1bcf54fa --- /dev/null +++ b/.azure-pipelines/workflows/periodic_reporting.yml @@ -0,0 +1,65 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +trigger: none + +variables: + MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository + MAVEN_OPTS: '-ntp -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)' + +stages: +# Build LST-Bench and create artifact to deploy to target VM +- stage: build + jobs: + - job: Build + pool: + vmImage: 'ubuntu-latest' + steps: + - task: Cache@2 + displayName: Cache Maven local repo + inputs: + key: 'maven | "$(Agent.OS)" | **/pom.xml' + restoreKeys: | + maven | "$(Agent.OS)" + maven + path: $(MAVEN_CACHE_FOLDER) + - task: Maven@4 + inputs: + mavenPomFile: 'pom.xml' + options: $(MAVEN_OPTS) + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.11' + publishJUnitResults: true + testResultsFiles: '**/surefire-reports/TEST-*.xml' + goals: 'package -DskipTests -Pspark-jdbc' + - task: CopyFiles@2 + displayName: 'Copy Artifacts to: $(TargetFolder)' + inputs: + SourceFolder: '$(Build.SourcesDirectory)' + Contents: | + launcher.sh + target/**/* + TargetFolder: '$(System.DefaultWorkingDirectory)/pipeline-artifacts/' + - upload: '$(System.DefaultWorkingDirectory)/pipeline-artifacts/' + artifact: drop + - deployment: VMDeploy + displayName: 'Deploying LST-Bench' + dependsOn: Build + environment: + name: 'lst-bench-periodic-reporting' + resourceType: VirtualMachine + tags: 'client' + strategy: + runOnce: + deploy: + steps: + - script: echo my first deployment