Browse Source

Trigger Build

sebavan 6 years ago
parent
commit
42c87aecb9
2 changed files with 122 additions and 141 deletions
  1. 6 6
      Tools/Gulp/tasks/gulpTasks-tests.js
  2. 116 135
      azure-pipelines.yml

+ 6 - 6
Tools/Gulp/tasks/gulpTasks-tests.js

@@ -45,17 +45,17 @@ gulp.task("tests-validation-virtualscreen", function(done) {
  * Launches the KARMA validation tests in browser stack for remote and cross devices validation tests.
  */
 gulp.task("tests-validation-browserstack", function(done) {
-
-    console.log(process.env.TRAVIS_BUILD_NUMBER,
-        process.env.BROWSER_STACK_USERNAME,
-        process.env.BROWSER_STACK_ACCESS_KEY,
-        process.env.BROWSER_STACK_ACCESS_TEST,)
-
     if (!process.env.BROWSER_STACK_USERNAME) {
         done();
         return;
     }
 
+    // not in safe build
+    if (process.env.BROWSER_STACK_USERNAME === "$(babylon.browserStack.userName)") {
+        done();
+        return;
+    }
+
     var kamaServerOptions = {
         configFile: rootDir + "tests/validation/karma.conf.browserstack.js",
         singleRun: true

+ 116 - 135
azure-pipelines.yml

@@ -8,144 +8,70 @@ pr:
     - master
 
 jobs:
-# - job: WhatsNewUpdate
-#   displayName: '1. What s New Update'
-#   pool:
-#     vmImage: 'Ubuntu-16.04'
-#     demands: npm
-#   steps:
-#   - task: Npm@1
-#     displayName: 'npm install'
-#     inputs:
-#       workingDir: Tools/Gulp
-#       verbose: false
-#   - script: 'gulp tests-whatsnew'
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Whats new'
-#     env:
-#       AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
-
-# - job: DocumentationCheck
-#   displayName: '2. Documentation Check'
-#   pool:
-#     vmImage: 'Ubuntu-16.04'
-#     demands: npm
-#   steps:
-#   - task: Npm@1
-#     displayName: 'npm install'
-#     inputs:
-#       workingDir: Tools/Gulp
-#       verbose: false
-#   - script: 'gulp typedoc-check'
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Typedoc check'
-
-# - job: Linting
-#   displayName: '3. Linting'
-#   pool:
-#     vmImage: 'Ubuntu-16.04'
-#     demands: npm
-#   steps:
-#   - task: Npm@1
-#     displayName: 'npm install'
-#     inputs:
-#       workingDir: Tools/Gulp
-#       verbose: false
-#   - script: 'gulp fullLint'
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Full Lint'
-
-# - job: Build
-#   displayName: '4. Build'
-#   pool:
-#     vmImage: 'Ubuntu-16.04'
-#     demands: npm
-#   steps:
-#   - task: Npm@1
-#     displayName: 'npm install'
-#     inputs:
-#       workingDir: Tools/Gulp
-#       verbose: false
-#   - script: 'gulp typescript-all'
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Typescript all'
+- job: WhatsNewUpdate
+  displayName: '1. What s New Update'
+  pool:
+    vmImage: 'Ubuntu-16.04'
+    demands: npm
+  steps:
+  - task: Npm@1
+    displayName: 'npm install'
+    inputs:
+      workingDir: Tools/Gulp
+      verbose: false
+  - script: 'gulp tests-whatsnew'
+    workingDirectory: Tools/Gulp
+    displayName: 'Whats new'
+    env:
+      AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
 
-# - job: Tests
-#   displayName: '5. Core Tests'
-#   pool:
-#     vmImage: 'Ubuntu-16.04'
-#     demands: npm
-#   steps:
-#   - task: Npm@1
-#     displayName: 'npm install'
-#     inputs:
-#       workingDir: Tools/Gulp
-#       verbose: false
-#   - script: 'gulp typescript-all'
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Typescript all'
-#   - script: 'gulp tests-babylon-unit'
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Unit Tests'
-#   - script: |
-#       export DISPLAY=:99
-#       Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
-#       sleep 3 # give xvfb some time to start
-#       gulp tests-validation-virtualscreen
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Visual Tests'
+- job: DocumentationCheck
+  displayName: '2. Documentation Check'
+  pool:
+    vmImage: 'Ubuntu-16.04'
+    demands: npm
+  steps:
+  - task: Npm@1
+    displayName: 'npm install'
+    inputs:
+      workingDir: Tools/Gulp
+      verbose: false
+  - script: 'gulp typedoc-check'
+    workingDirectory: Tools/Gulp
+    displayName: 'Typedoc check'
 
-# - job: ModuleTests
-#   displayName: '6. Module Tests'
-#   pool:
-#     vmImage: 'Ubuntu-16.04'
-#     demands: npm
-#   steps:
-#   - task: Npm@1
-#     displayName: 'npm install'
-#     inputs:
-#       workingDir: Tools/Gulp
-#       verbose: false
-#   - script: 'gulp typescript-all'
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Typescript all'
-#   - script: 'gulp tests-modules'
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Tests modules'
-#   - script: 'sudo gulp localdev-es6'
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Npm link ES6'
-#   - script: 'gulp tests-es6Modules'
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Tests ES6'
+- job: Linting
+  displayName: '3. Linting'
+  pool:
+    vmImage: 'Ubuntu-16.04'
+    demands: npm
+  steps:
+  - task: Npm@1
+    displayName: 'npm install'
+    inputs:
+      workingDir: Tools/Gulp
+      verbose: false
+  - script: 'gulp fullLint'
+    workingDirectory: Tools/Gulp
+    displayName: 'Full Lint'
 
-# - job: ViewerTests
-#   displayName: '7. Viewer Tests'
-#   pool:
-#     vmImage: 'Ubuntu-16.04'
-#     demands: npm
-#   steps:
-#   - task: Npm@1
-#     displayName: 'npm install'
-#     inputs:
-#       workingDir: Tools/Gulp
-#       verbose: false
-#   - script: 'gulp typescript-all'
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Typescript all'
-#   - script: 'gulp tests-viewer-unit'
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Unit Tests'
-#   - script: |
-#       export DISPLAY=:99
-#       Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
-#       sleep 3 # give xvfb some time to start
-#       gulp tests-viewer-validation-virtualscreen
-#     workingDirectory: Tools/Gulp
-#     displayName: 'Visual Tests'
+- job: Build
+  displayName: '4. Build'
+  pool:
+    vmImage: 'Ubuntu-16.04'
+    demands: npm
+  steps:
+  - task: Npm@1
+    displayName: 'npm install'
+    inputs:
+      workingDir: Tools/Gulp
+      verbose: false
+  - script: 'gulp typescript-all'
+    workingDirectory: Tools/Gulp
+    displayName: 'Typescript all'
 
-- job: BrowserStackTests
-  displayName: '8. Browser Stack Tests'
+- job: Tests
+  displayName: '5. Core Tests'
   pool:
     vmImage: 'Ubuntu-16.04'
     demands: npm
@@ -161,6 +87,13 @@ jobs:
   - script: 'gulp tests-babylon-unit'
     workingDirectory: Tools/Gulp
     displayName: 'Unit Tests'
+  - script: |
+      export DISPLAY=:99
+      Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
+      sleep 3 # give xvfb some time to start
+      gulp tests-validation-virtualscreen
+    workingDirectory: Tools/Gulp
+    displayName: 'Visual Tests'
   - script: 'gulp tests-validation-browserstack'
     workingDirectory: Tools/Gulp
     displayName: 'Browser Stack Tests'
@@ -168,4 +101,52 @@ jobs:
       TRAVIS_BUILD_NUMBER: $(Build.BuildNumber)
       BROWSER_STACK_USERNAME: $(babylon.browserStack.userName)
       BROWSER_STACK_ACCESS_KEY: $(babylon.browserStack.userToken)
-      BROWSER_STACK_ACCESS_TEST: $(babylon.browserStack.test)
+
+- job: ModuleTests
+  displayName: '6. Module Tests'
+  pool:
+    vmImage: 'Ubuntu-16.04'
+    demands: npm
+  steps:
+  - task: Npm@1
+    displayName: 'npm install'
+    inputs:
+      workingDir: Tools/Gulp
+      verbose: false
+  - script: 'gulp typescript-all'
+    workingDirectory: Tools/Gulp
+    displayName: 'Typescript all'
+  - script: 'gulp tests-modules'
+    workingDirectory: Tools/Gulp
+    displayName: 'Tests modules'
+  - script: 'sudo gulp localdev-es6'
+    workingDirectory: Tools/Gulp
+    displayName: 'Npm link ES6'
+  - script: 'gulp tests-es6Modules'
+    workingDirectory: Tools/Gulp
+    displayName: 'Tests ES6'
+
+- job: ViewerTests
+  displayName: '7. Viewer Tests'
+  pool:
+    vmImage: 'Ubuntu-16.04'
+    demands: npm
+  steps:
+  - task: Npm@1
+    displayName: 'npm install'
+    inputs:
+      workingDir: Tools/Gulp
+      verbose: false
+  - script: 'gulp typescript-all'
+    workingDirectory: Tools/Gulp
+    displayName: 'Typescript all'
+  - script: 'gulp tests-viewer-unit'
+    workingDirectory: Tools/Gulp
+    displayName: 'Unit Tests'
+  - script: |
+      export DISPLAY=:99
+      Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
+      sleep 3 # give xvfb some time to start
+      gulp tests-viewer-validation-virtualscreen
+    workingDirectory: Tools/Gulp
+    displayName: 'Visual Tests'