Add jenkinsfile
This commit is contained in:
parent
2a2f30e2a6
commit
2233d4c72c
50
Jenkinsfile
vendored
Normal file
50
Jenkinsfile
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
LANG = "en_US.UTF-8"
|
||||
LANGUAGE = "en_US.UTF-8"
|
||||
LC_ALL = "en_US.UTF-8"
|
||||
PATH = "PATH=$HOME/.rbenv/bin:$HOME/.rbenv/shims:/usr/local/bin/:$PATH"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('env setup') {
|
||||
steps {
|
||||
sh 'make setup'
|
||||
}
|
||||
}
|
||||
stage('build dependencies') {
|
||||
steps {
|
||||
sh 'make dependencies'
|
||||
}
|
||||
}
|
||||
stage('test') {
|
||||
steps {
|
||||
ansiColor('xterm') {
|
||||
sh 'make test'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
// CHANGE_ID is set only for pull requests, so it is safe to access the pullRequest global variable
|
||||
if (env.CHANGE_ID) {
|
||||
def comment = pullRequest.comment("👍 Build PASSED commit: ${pullRequest.head}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
failure {
|
||||
script {
|
||||
// CHANGE_ID is set only for pull requests, so it is safe to access the pullRequest global variable
|
||||
if (env.CHANGE_ID) {
|
||||
def comment = pullRequest.comment("💥 Build FAILED commit: ${pullRequest.head}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
9
Makefile
9
Makefile
@ -10,12 +10,15 @@ XCODE_BUILD = xcrun xcodebuild -workspace $(SCHEME).xcworkspace -scheme $(SCHEME
|
||||
|
||||
default: test
|
||||
|
||||
ci: dependencies test
|
||||
|
||||
update_dependencies:
|
||||
bundle exec pod update
|
||||
carthage update --platform iOS
|
||||
|
||||
setup:
|
||||
rbenv install -s
|
||||
gem install bundler
|
||||
bundle install
|
||||
|
||||
dependencies:
|
||||
cd $(WORKING_DIR) && \
|
||||
git submodule update --init
|
||||
@ -27,7 +30,7 @@ build: dependencies
|
||||
$(XCODE_BUILD) build | xcpretty
|
||||
|
||||
test:
|
||||
bundle exec fastlane scan
|
||||
bundle exec fastlane test
|
||||
|
||||
clean: clean_carthage
|
||||
cd $(WORKING_DIR) && \
|
||||
|
||||
3
fastlane/.gitignore
vendored
3
fastlane/.gitignore
vendored
@ -1 +1,4 @@
|
||||
README.md
|
||||
test_output
|
||||
report.xml
|
||||
|
||||
|
||||
6
fastlane/Appfile
Normal file
6
fastlane/Appfile
Normal file
@ -0,0 +1,6 @@
|
||||
# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
|
||||
# apple_id("[[APPLE_ID]]") # Your Apple email address
|
||||
|
||||
|
||||
# For more information about the Appfile, see:
|
||||
# https://docs.fastlane.tools/advanced/#appfile
|
||||
27
fastlane/Fastfile
Normal file
27
fastlane/Fastfile
Normal file
@ -0,0 +1,27 @@
|
||||
# This file contains the fastlane.tools configuration
|
||||
# You can find the documentation at https://docs.fastlane.tools
|
||||
#
|
||||
# For a list of all available actions, check out
|
||||
#
|
||||
# https://docs.fastlane.tools/actions
|
||||
#
|
||||
# For a list of all available plugins, check out
|
||||
#
|
||||
# https://docs.fastlane.tools/plugins/available-plugins
|
||||
#
|
||||
|
||||
# Uncomment the line if you want fastlane to automatically update itself
|
||||
# update_fastlane
|
||||
|
||||
default_platform(:ios)
|
||||
|
||||
platform :ios do
|
||||
desc "Description of what the lane does"
|
||||
lane :test do
|
||||
run_tests(
|
||||
workspace: "Signal.xcworkspace",
|
||||
scheme: "Signal",
|
||||
devices: ["iPhone SE"]
|
||||
)
|
||||
end
|
||||
end
|
||||
@ -1,7 +0,0 @@
|
||||
# For more information about this configuration visit
|
||||
# https://github.com/fastlane/fastlane/tree/master/scan#scanfile
|
||||
|
||||
workspace "Signal.xcworkspace"
|
||||
scheme "Signal"
|
||||
devices ["iPhone SE"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user