You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/09/06 07:43:12 UTC

[GitHub] [flink] rmetzger commented on a change in pull request #9632: [FLINK-13978] Add azure-pipelines.yml

rmetzger commented on a change in pull request #9632: [FLINK-13978] Add azure-pipelines.yml
URL: https://github.com/apache/flink/pull/9632#discussion_r321612563
 
 

 ##########
 File path: azure-pipelines.yml
 ##########
 @@ -0,0 +1,79 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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:
+  branches:
+    include:
+    - '*' 
+  paths:
+    exclude:
+    - docs/*
+    - '*.md'
+
+resources:
+  containers:
+  # Container with Maven 3.6.1 to have the same environment everywhere.
+  - container: flink-build-container
+    image: rmetzger/flink-ci:2
+
+jobs:
+  # use 'Default' pool
+- job: runOnDefaultAgentPool
+  pool:
+    name: Default
+  container: flink-build-container
+  timeoutInMinutes: 0
+  steps:
+  # Azure pipelines can only evaluate conditions with the build repo name in the steps.
+  # if the repo != "flink-ci/flink", we stop
+  - script: exit 1
+    condition: not(eq(variables['Build.Repository.Name'], 'flink-ci/flink'))
+  - script: chown -R user:user /home/user
+  - script: chown -R user:user .
+  - task: Maven@3
+    inputs:
+      mavenPomFile: 'pom.xml'
+      mavenOptions: '-Xmx3072m'
+      javaHomeOption: 'JDKVersion'
+      jdkVersionOption: '1.8'
+      jdkArchitectureOption: 'x64'
+      publishJUnitResults: true
+      testResultsFiles: '**/surefire-reports/TEST-*.xml'
+      goals: 'clean install'
+      timeoutInMinutes: 0
+- job: runOnAzure
+  pool:
+    vmImage: 'ubuntu-latest'
+  container: flink-build-container
+  timeoutInMinutes: 0
+  steps:
+  # Azure pipelines can only evaluate conditions with the build repo name in the steps.
+  # if the repo == "flink-ci/flink", we stop
+  - script: exit 1
+    condition: eq(variables['Build.Repository.Name'], 'flink-ci/flink')
+  - script: sudo chown -R user:user /home/user
+  - script: sudo chown -R user:user .
+  - task: Maven@3
 
 Review comment:
   Yes, you can clone multiple repositories, and call bash scripts.
   If we use the Maven task, we'll get test reports: https://dev.azure.com/rmetzger/Flink/_test/analytics?definitionId=1&contextType=build
   
   I'm not sure if we will have this many changes to this particular task.
   What we could consider doing is the following dirty hack: Azure pipelines has a "templates" feature, that allows to include other yml files into the main file.
   We could put the main body of this file into a file in a separate repository, and then load it here.
   
   I'll think about this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services