|
| 1 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 2 | +# you may not use this file except in compliance with the License. |
| 3 | +# You may obtain a copy of the License at |
| 4 | +# |
| 5 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | +# |
| 7 | +# Unless required by applicable law or agreed to in writing, software |
| 8 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 9 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 10 | +# See the License for the specific language governing permissions and |
| 11 | +# limitations under the License. |
| 12 | + |
| 13 | +trigger: none |
| 14 | + |
| 15 | +variables: |
| 16 | + MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository |
| 17 | + MAVEN_OPTS: '-ntp -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)' |
| 18 | + |
| 19 | +stages: |
| 20 | +# Build LST-Bench and create artifact to deploy to target VM |
| 21 | +- stage: build |
| 22 | + jobs: |
| 23 | + - job: Build |
| 24 | + pool: |
| 25 | + vmImage: 'ubuntu-latest' |
| 26 | + steps: |
| 27 | + - task: Cache@2 |
| 28 | + displayName: Cache Maven local repo |
| 29 | + inputs: |
| 30 | + key: 'maven | "$(Agent.OS)" | **/pom.xml' |
| 31 | + restoreKeys: | |
| 32 | + maven | "$(Agent.OS)" |
| 33 | + maven |
| 34 | + path: $(MAVEN_CACHE_FOLDER) |
| 35 | + - task: Maven@4 |
| 36 | + inputs: |
| 37 | + mavenPomFile: 'pom.xml' |
| 38 | + options: $(MAVEN_OPTS) |
| 39 | + javaHomeOption: 'JDKVersion' |
| 40 | + jdkVersionOption: '1.11' |
| 41 | + publishJUnitResults: true |
| 42 | + testResultsFiles: '**/surefire-reports/TEST-*.xml' |
| 43 | + goals: 'package -DskipTests -Pspark-jdbc' |
| 44 | + - task: CopyFiles@2 |
| 45 | + displayName: 'Copy Artifacts to: $(TargetFolder)' |
| 46 | + inputs: |
| 47 | + SourceFolder: '$(Build.SourcesDirectory)' |
| 48 | + Contents: | |
| 49 | + launcher.sh |
| 50 | + target/**/* |
| 51 | + TargetFolder: '$(System.DefaultWorkingDirectory)/pipeline-artifacts/' |
| 52 | + - upload: '$(System.DefaultWorkingDirectory)/pipeline-artifacts/' |
| 53 | + artifact: drop |
| 54 | + - deployment: VMDeploy |
| 55 | + displayName: 'Deploying LST-Bench' |
| 56 | + dependsOn: Build |
| 57 | + environment: |
| 58 | + name: 'lst-bench-periodic-reporting' |
| 59 | + resourceType: VirtualMachine |
| 60 | + tags: 'client' |
| 61 | + strategy: |
| 62 | + runOnce: |
| 63 | + deploy: |
| 64 | + steps: |
| 65 | + - script: echo my first deployment |
0 commit comments