본문 바로가기
Infra/(CI) Jenkins

Jenkins with iOS Build

by 화뉘 2018. 11. 21.

Inject environment variables to the build process

API_KEY=.

BUILD_SECRET=.

EMAILS=.

Build

 #!/bin/bash -l

cd ${WORKSPACE}

#ruby ../build.rb

rm -rf build

mkdir build

touch build/notes.txt

#touch build/note.txt

xcodebuild archive -workspace project.xcworkspace -scheme project -configuration Debug -archivePath build/project.xcarchive | xcpretty

xcodebuild -exportArchive -archivePath build/project.xcarchive -exportOptionsPlist exportOptions.plist -exportPath build | xcpretty

After Build

Archive the artifacts

 build/project.ipa

execute scripts

echo ${GIT_BRANCH}-${GIT_COMMIT} >> build/notes.txt

date +"%Y-%m-%d %H:%M:%S" >> project/notes.txt

echo "<CHANGELOG>" >> build/notes.txt

#sed '1,1d' build/note.txt >> build/notes.txt

git log --pretty=%s -1 >> build/notes.txt

echo "</CHANGELOG>" >> build/notes.txt

./Pods/Crashlytics/submit $API_KEY $BUILD_SECRET -ipaPath build/project.ipa  -emails $EMAILS -notifications YES -notesPath build/notes.txt -debug YES 


'Infra > (CI) Jenkins' 카테고리의 다른 글

[Jenkins] Plugin Error  (2) 2021.02.02
Jenkins with Android Build  (0) 2018.11.21
JIRA Issue List filter  (1) 2017.07.24
Jenkins Project 마다 permission 설정  (0) 2017.02.10
Jenkins 특정 Branch Build 하고 싶을 경우 설정  (0) 2017.01.06

댓글