Daniel Zlotin 6 years ago
parent
commit
f6443d8cbd
5 changed files with 9 additions and 134 deletions
  1. 0
    69
      .travis.yml
  2. 0
    38
      Jenkinsfile
  3. 2
    2
      docs/README.md
  4. 7
    7
      scripts/release.js
  5. 0
    18
      scripts/travis-fold.sh

+ 0
- 69
.travis.yml View File

@@ -1,69 +0,0 @@
1
-env:
2
-  global:
3
-    - RCT_NO_LAUNCH_PACKAGER=true
4
-
5
-jobs:
6
-  include:
7
-
8
-    - stage: test
9
-      env: TYPE=js
10
-      os: linux
11
-      language: generic
12
-      script:
13
-        - ./scripts/travis-fold.sh "npm run test-js"
14
-
15
-    - stage: test
16
-      env: TYPE=iOS
17
-      os: osx
18
-      osx_image: xcode9
19
-      language: objective-c
20
-      before_install:
21
-        - source ./scripts/env/env.ios.sh
22
-      script:
23
-        - ./scripts/travis-fold.sh "npm run test-unit-ios -- --release"
24
-        - ./scripts/travis-fold.sh "npm run test-e2e-ios -- --release"
25
-
26
-    - stage: test
27
-      env: TYPE=Android
28
-      os: linux
29
-      jdk: oraclejdk8
30
-      language: java
31
-      before_install:
32
-        - source ./scripts/env/env.android.sh
33
-      script:
34
-        - ./scripts/travis-fold.sh "npm run test-unit-android -- --release"
35
-        - ./scripts/travis-fold.sh "npm run test-e2e-android -- --release"
36
-      before_cache:
37
-        - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
38
-        - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
39
-      cache:
40
-        directories:
41
-          - $HOME/.m2
42
-          - $HOME/.gradle/caches/
43
-          - $HOME/.gradle/wrapper/
44
-          - $HOME/.android/build-cache
45
-
46
-    - stage: deploy
47
-      if: NOT type = pull_request
48
-      env: TYPE=deploy
49
-      os: linux
50
-      language: generic
51
-      script:
52
-          - ./scripts/travis-fold.sh "npm run release"
53
-
54
-branches:
55
-  only:
56
-  - master
57
-  - v2
58
-
59
-install:
60
-  - nvm install 8
61
-  - ./scripts/travis-fold.sh "npm install"
62
-  - ./scripts/travis-fold.sh "npm run clean"
63
-
64
-after_script:
65
-  - echo "BUILD FINISHED"
66
-
67
-notifications:
68
-  slack:
69
-    secure: tZRC5hbi7iWy4hgWC0ET67kOKjn77945UZJEm8XeOnahVjfBL7gSpBTtyjD6D7Ah7qJTZNtK2lfItciT4gJfH4HYDVUBlLYKzVvw/9usYpEvsdAaAnpT2gMwXHEIupUYh0tv5ccvHt/SqHmK0HVTFdzGR/IztmHIcFlDcbNdTUtUg+9RUTBkO2n946UHk/I8xKhW4GefEuv4bRbm44H27G/VWcOABsMNvYA+kF7VDTjSlyJmACgG1BMbMDwn6lM6c7HLhVbQi52Oyt9E3dz0o1/puWldq60jiESsay99CrAr4pi4LAeMu+TdQnc8QzsCd+CZBFNIk1t56ElM2aQ8w43W+IYfu1/0+w12ySOasamqyOdLJng0MXmqzVoBcfisefVuBNmx4n+yQO+qu4a3Qze/PgPeqWHF9Jy5EbVezg+lb/4m/0NK/3o2za3dJjTKJGxuCLvdCGLVEeDLw50FQxbV+k+tgeB/1jmIWymhdUteWBjBdPUqL+ntaqWuSbMjC0euOdGkR1ibfYaUy5UmBtTRkcb/AwSti9lCNdBN8Ez1qmIO4U92gN93B10fEObLjv76T7NLJQUPks/u4nCClsYRclJPDTDe/kv9HL6R6eHJGWd045r0tKtYj1WVFUlv8EvB5rIzVKCn6cjM636+enavuTzg66aRZvu8DgNqLNo=

+ 0
- 38
Jenkinsfile View File

@@ -1,38 +0,0 @@
1
-pipeline {
2
-  agent any
3
-  stages {
4
-    stage('Install npm packages') {
5
-      steps {
6
-      ansiColor('xterm') {
7
-        sh '''#!/bin/bash -ex
8
-        npm install
9
-        npm run clean'''
10
-        }
11
-      }
12
-    }
13
-    stage('Run All Tests') {
14
-      parallel {
15
-        stage('Run test-js') {
16
-          steps {
17
-            sh '''#!/bin/bash
18
-            npm run test-js'''
19
-          }
20
-        }
21
-        stage('Run iOS tests') {
22
-          steps {
23
-            sh '''#!/bin/bash
24
-            npm run test-unit-ios -- --release
25
-            npm run test-e2e-ios -- --release'''
26
-          }
27
-        }
28
-        stage('Run Android tests') {
29
-          steps {
30
-            sh '''#!/bin/bash
31
-            npm run test-unit-android -- --release'''
32
-          }
33
-        }
34
-      }
35
-    }
36
-  }
37
-}
38
-

+ 2
- 2
docs/README.md View File

@@ -1,6 +1,5 @@
1 1
 [![npm (tag)](https://img.shields.io/npm/v/react-native-navigation/alpha.svg)](https://github.com/wix/react-native-navigation/tree/v2#react-native-navigation-v2-wip)
2
-[![Build Status](https://travis-ci.org/wix/react-native-navigation.svg?branch=v2)](https://travis-ci.org/wix/react-native-navigation)
3
-[![Build Status](http://34.201.210.182/buildStatus/icon?job=react-native-navigation-merge)](http://34.201.210.182/job/react-native-navigation-merge/)
2
+[![Build Status](http://34.201.210.182/buildStatus/icon?job=react-native-navigation-master)](http://34.201.210.182/job/react-native-navigation-master)
4 3
 [![Join us on Discord](https://img.shields.io/badge/discord-react--native--navigation-738bd7.svg?style=flat)](https://discord.gg/DhkZjq2)
5 4
 [![StackExchange](https://img.shields.io/stackexchange/stackoverflow/t/react-native-navigation.svg)](https://stackoverflow.com/questions/tagged/react-native-navigation)
6 5
 
@@ -212,3 +211,4 @@ Note:  v1 properties with names beginning with 'navBar' are replaced in v2 with
212 211
 | splitViewScreen       |     :x:  |    [Contribute](/docs/WorkingLocally.md)      | [Contribute](/docs/WorkingLocally.md)|
213 212
 
214 213
 Element transitions, adding buttons and styles are not yet implemented. [Contribute](/docs/WorkingLocally.md)
214
+

+ 7
- 7
scripts/release.js View File

@@ -4,7 +4,7 @@ const semver = require('semver');
4 4
 const fs = require('fs');
5 5
 const _ = require('lodash');
6 6
 
7
-const ONLY_ON_BRANCH = 'v2';
7
+const ONLY_ON_BRANCH = 'origin/v2';
8 8
 const VERSION_TAG = 'alpha';
9 9
 const VERSION_INC = 'patch';
10 10
 
@@ -18,17 +18,17 @@ function run() {
18 18
 }
19 19
 
20 20
 function validateEnv() {
21
-  if (!process.env.CI || !process.env.TRAVIS) {
22
-    throw new Error(`releasing is only available from Travis CI`);
21
+  if (!process.env.CI) {
22
+    throw new Error(`releasing is only available from CI`);
23 23
   }
24 24
 
25
-  if (process.env.TRAVIS_PULL_REQUEST !== 'false') {
26
-    console.log(`not publishing as triggered by pull request ${process.env.TRAVIS_PULL_REQUEST}`);
25
+  if (!process.env.JENKINS_MASTER) {
26
+    console.log(`not publishing on a different build`);
27 27
     return false;
28 28
   }
29 29
 
30
-  if (process.env.TRAVIS_BRANCH !== ONLY_ON_BRANCH) {
31
-    console.log(`not publishing on branch ${process.env.TRAVIS_BRANCH}`);
30
+  if (process.env.GIT_BRANCH !== ONLY_ON_BRANCH) {
31
+    console.log(`not publishing on branch ${process.env.GIT_BRANCH}`);
32 32
     return false;
33 33
   }
34 34
 

+ 0
- 18
scripts/travis-fold.sh View File

@@ -1,18 +0,0 @@
1
-#!/bin/bash -e
2
-
3
-lightCyan='\033[1;36m'
4
-green='\033[0;32m'
5
-nocolor='\033[0m'
6
-
7
-cmd="${1}"
8
-name=${cmd//[ ]/_}
9
-
10
-echo "travis_fold:start:$name"
11
-echo -e "${lightCyan}\t\t $cmd ${nocolor}"
12
-SECONDS=0
13
-
14
-($cmd)
15
-
16
-duration=$SECONDS
17
-echo "travis_fold:end:$name"
18
-echo -e "${green}\t\t\t --> $(($duration / 60)) minutes and $(($duration % 60)) seconds ${nocolor}\n"