.gitlab-ci.yml 3.17 KB
Newer Older
Drew's avatar
Drew committed
1 2
types:
  - test
Drew's avatar
Drew committed
3
  - package
Drew's avatar
Drew committed
4

5 6
variables:
  XCSBOT: "fc03b092ecd597b3488984a34d029eec"
Drew's avatar
Drew committed
7
  XCSBOT_IOS: "8398cace692793b0b9d5ab1fe0964301"
Drew's avatar
Drew committed
8

9
  GITLAB_PROJECT_ID: "9"
Drew's avatar
Drew committed
10
  FRAMEWORK_NAME: "NaOH"
11

Drew's avatar
Drew committed
12
testMac:
Drew's avatar
Drew committed
13 14
  type: test
  script:
15 16 17
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI forceGitLabBranch --branchName CaveJohnsonAuto --hostname code.sealedabstract.com --projectID $GITLAB_PROJECT_ID"
    - "sleep 1" 
    - "XCSBUILDNO=`/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI xcsIntegrateNow --botID $XCSBOT --hostname localhost --sslPolicy localhost`"
Drew's avatar
Drew committed
18
    - "echo XCS BUILDNO $XCSBUILDNO"
19 20
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI waitForIntegration --hostname localhost --botID $XCSBOT --sslPolicy localhost --buildNumber $XCSBUILDNO"
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI xcsStatusToShell --hostname localhost --botID $XCSBOT --sslPolicy localhost --buildNumber $XCSBUILDNO"
Drew's avatar
Drew committed
21 22 23
  only:
    - master
  tags:
Drew's avatar
Drew committed
24
    - xc7
Drew's avatar
Drew committed
25

Drew's avatar
Drew committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
testiOS:
  type: test
  script:
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI forceGitLabBranch --branchName CaveJohnsonAuto --hostname code.sealedabstract.com --projectID $GITLAB_PROJECT_ID"
    - "sleep 1" 
    - "XCSBUILDNO=`/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI xcsIntegrateNow --botID $XCSBOT_IOS --hostname localhost --sslPolicy localhost`"
    - "echo XCS BUILDNO $XCSBUILDNO"
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI waitForIntegration --hostname localhost --botID $XCSBOT_IOS --sslPolicy localhost --buildNumber $XCSBUILDNO"
    - "/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI xcsStatusToShell --hostname localhost --botID $XCSBOT_IOS --sslPolicy localhost --buildNumber $XCSBUILDNO"
  only:
    - master
  tags:
    - xc7

archiveiOS:
Drew's avatar
Drew committed
41 42 43 44
   type: package
   script:
      - "CJ=/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI"
      - "CARTHAGE=/usr/local/bin/carthage"
Drew's avatar
Drew committed
45
      - "$CJ setVersion --infoPlistPath ${FRAMEWORK_NAME}-iOS/Info.plist --version ${CI_BUILD_ID}"
Drew's avatar
Drew committed
46
      - "$CARTHAGE build --no-skip-current --platform ios"
Drew's avatar
Drew committed
47
      - "$CARTHAGE archive $FRAMEWORK_NAME"
Drew's avatar
Drew committed
48

Drew's avatar
Drew committed
49 50 51 52
      - "ZIPFILE=$($CJ getNameVersionString --infoPlistPath $FRAMEWORK_NAME/Info.plist --productName $FRAMEWORK_NAME)-dev-${CI_BUILD_ID}.zip"
      - "rm -rf /tmp/$FRAMEWORK_NAME/"
      - "mkdir -p /tmp/$FRAMEWORK_NAME"
      - "mv $FRAMEWORK_NAME.framework.zip /tmp/$FRAMEWORK_NAME/$ZIPFILE"
Drew's avatar
Drew committed
53 54
   only:
    - master
Drew's avatar
Drew committed
55

Drew's avatar
Drew committed
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
   artifacts:
      paths:
      - /tmp/NaOH/

archiveMac:
   type: package
   script:
      - "CJ=/Applications/CaveJohnson.app/Contents/MacOS/CaveJohnsonCLI"
      - "CARTHAGE=/usr/local/bin/carthage"
      - "$CJ setVersion --infoPlistPath $FRAMEWORK_NAME/Info.plist --version ${CI_BUILD_ID}"
      - "$CARTHAGE build --no-skip-current"
      - "$CARTHAGE archive $FRAMEWORK_NAME --platform osx"

      - "ZIPFILE=$($CJ getNameVersionString --infoPlistPath $FRAMEWORK_NAME/Info.plist --productName $FRAMEWORK_NAME)-dev-${CI_BUILD_ID}.zip"
      - "rm -rf /tmp/$FRAMEWORK_NAME/"
      - "mkdir -p /tmp/$FRAMEWORK_NAME"
      - "mv $FRAMEWORK_NAME.framework.zip /tmp/$FRAMEWORK_NAME/$ZIPFILE"
   only:
    - master

Drew's avatar
Drew committed
76
   artifacts:
Drew's avatar
Drew committed
77 78
      paths:
      - /tmp/NaOH/