Jenkinsfile for CI #13
Conversation
|
overall really nice. my comments aim to improve quality and simplify the setup |
| set -x | ||
| xcodebuild -version | ||
| pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | ||
| sudo xcodebuild -license accept |
chrmod
Mar 23, 2018
Member
why we have to do it on job level? the vm image should already have it covered
why we have to do it on job level? the vm image should already have it covered
sharath-cliqz
Mar 26, 2018
Author
Contributor
fixed it. Has been done on the Image level now.
fixed it. Has been done on the Image level now.
| sh '''#!/bin/bash -l | ||
| set -e | ||
| set -x | ||
| xcodebuild -version |
chrmod
Mar 23, 2018
Member
as we specify image explicitly config.vm.box = "ios-xcode9.2" this is not very useful
as we specify image explicitly config.vm.box = "ios-xcode9.2" this is not very useful
| pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | ||
| sudo xcodebuild -license accept | ||
| brew update | ||
| brew list carthage &>/dev/null || brew install carthage |
chrmod
Mar 23, 2018
Member
why we need he list?
why we need he list?
sharath-cliqz
Mar 26, 2018
Author
Contributor
Just checking if it is already installed. Maybe will have to look for a better way.
Just checking if it is already installed. Maybe will have to look for a better way.
| stage('Build') { | ||
| timeout(10) { | ||
| sh '''#!/bin/bash -l | ||
| set -x |
chrmod
Mar 23, 2018
Member
is -x doing anything here?
is -x doing anything here?
sharath-cliqz
Mar 26, 2018
Author
Contributor
removed.
removed.
| ''' | ||
| } | ||
| stage('Build') { | ||
| timeout(10) { |
chrmod
Mar 23, 2018
Member
10 may be not enough.. ?
10 may be not enough.. ?
sharath-cliqz
Mar 26, 2018
Author
Contributor
It usually builds in 3-4Mins (Max) So i thought 10 was a reasonable number.
It usually builds in 3-4Mins (Max) So i thought 10 was a reasonable number.
| rm -rf Cartfile.resolved | ||
| chmod a+x bootstrap.sh | ||
| ./bootstrap.sh | ||
| yarn install |
chrmod
Mar 23, 2018
Member
btw. new npm have CI mode, you use it by npm ci - they say it is faster and more strict than regular npm install. maybe we can use it instead of yarn
btw. new npm have CI mode, you use it by npm ci - they say it is faster and more strict than regular npm install. maybe we can use it instead of yarn
| set -e | ||
| set -x | ||
| xcodebuild -version | ||
| pkgutil --pkg-info=com.apple.pkg.CLTools_Executables |
chrmod
Mar 23, 2018
Member
what does it provide?
what does it provide?
sharath-cliqz
Mar 26, 2018
Author
Contributor
removed.
removed.
| node(nodeId) { | ||
| stage("Checkout") { | ||
| checkout scm | ||
| } |
chrmod
Mar 23, 2018
Member
please fix indent
please fix indent
sharath-cliqz
Mar 26, 2018
Author
Contributor
Fixed.
Fixed.
chrmod
Mar 26, 2018
Member
does not look like :-)
does not look like :-)
| @Library('cliqz-shared-library@vagrant') _ | ||
|
|
||
| node('mac-mini-ios') { | ||
| writeFile file: 'Vagrantfile', text: ''' |
chrmod
Mar 23, 2018
Member
lets put that on shared library with some configuration options
lets put that on shared library with some configuration options
chrmod
Mar 26, 2018
Member
as the contents of vagrant file is not parameterized, it can be put on the variable in the top of the file, it should improve readability
as the contents of vagrant file is not parameterized, it can be put on the variable in the top of the file, it should improve readability
| vagrant.inside( | ||
| 'Vagrantfile', | ||
| '/jenkins', | ||
| 4, // CPU |
chrmod
Mar 23, 2018
Member
4 cpu is quite a lot :D have you benchmarked how number of cpu affect build time?
4 cpu is quite a lot :D have you benchmarked how number of cpu affect build time?
sharath-cliqz
Mar 26, 2018
Author
Contributor
@chrmod When we are running tests on the Simulator, it is better to use 4 CPUs to make it finish faster.
As of now reduced them to 2 and we can benchmark them at a later point of time when the tests are ready.
@chrmod When we are running tests on the Simulator, it is better to use 4 CPUs to make it finish faster.
As of now reduced them to 2 and we can benchmark them at a later point of time when the tests are ready.
|
looks really good |
| @Library('cliqz-shared-library@vagrant') _ | ||
|
|
||
| node('mac-mini-ios') { | ||
| writeFile file: 'Vagrantfile', text: ''' |
chrmod
Mar 26, 2018
Member
as the contents of vagrant file is not parameterized, it can be put on the variable in the top of the file, it should improve readability
as the contents of vagrant file is not parameterized, it can be put on the variable in the top of the file, it should improve readability
| timeout(10) { | ||
| sh '''#!/bin/bash -l | ||
| set -e | ||
| xcodebuild -workspace Client.xcworkspace -scheme "Fennec" -sdk iphonesimulator -destination "platform=iOS Simulator,OS=11.2,id=185B34BB-DCB8-4A17-BDCA-843086B67193" ONLY_ACTIVE_ARCH=NO -derivedDataPath clean build |
chrmod
Mar 26, 2018
Member
would be nice to break this long line
would be nice to break this long line
| finally { | ||
| stage('Cleanup') { | ||
| sh '''#!/bin/bash -l | ||
| xcrun simctl uninstall booted com.cliqz.ios.newCliqz || true |
chrmod
Mar 26, 2018
Member
is this line printed in jenkins log? I'm asking as there is no set -x
is this line printed in jenkins log? I'm asking as there is no set -x
Continuous Integration using Jenkins.