Commit 7a5d0139 authored by YM-RD-AP01\ymadmin's avatar YM-RD-AP01\ymadmin

20180082: Job [Deploy_Hi365_IOS_SIT] configuration updated

Change performed by ³¯¾_¶§
parent be374d3e
......@@ -63,18 +63,10 @@
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command># Choose build dart by environment
default_doc=&quot;main_sit.dart&quot;
export_method=&quot;app-store&quot;
version_number=$Version_Number
<command>export FLUTTER_ROOT=&quot;/Users/jenkins/flutter&quot;
export FLUTTER_ROOT=&quot;/Users/jenkins/flutter&quot;
# Set the variable
project_path=$(pwd)
flutter build ios --release -t lib/${default_doc} --no-codesign
cd $project_path/ios
now=$(date +&quot;%Y_%m_%d_%H:%M&quot;)
......@@ -85,44 +77,22 @@ app_version=$(grep &apos;version:&apos; ${project_path}/pubspec.yaml | cut -d &a
git_short_hash=$(git rev-parse --short HEAD)
scheme=&quot;Runner&quot;
# package configuration for fastlane
configuration=&quot;Release&quot;
# iOS project path
workspace_path=&quot;${project_path}/ios/Runner.xcodeproj&quot;
# ipa export folder
rm -rf &quot;${project_path}/ipa&quot;
mkdir -p &quot;${project_path}/ipa&quot;
output_path=&quot;${project_path}/ipa&quot;
# project archive path
archive_path=&quot;$output_path/hi365_${export_method}_${now}.xcarchive&quot;
# ipa name
ipa_name=&quot;Hi365_SIT_${current_date}_${version_number}_${git_short_hash}.ipa&quot;
# ipa export path
ipa_path=&quot;$output_path/${ipa_name}&quot;
# show env settings
echo &quot;===workspace path: ${workspace_path}===&quot;
echo &quot;===archive path: ${archive_path}===&quot;
echo &quot;===ipa path: ${ipa_path}===&quot;
echo &quot;===export method: ${export_method}===&quot;
echo &quot;===commit msg: $1===&quot;
ipa_full_path=&quot;${$project_path}/ios/Hi365_SIT_${current_date}_${version_number}_${git_short_hash}.ipa&quot;
# Temporarily change xcode versino for fastlane
fastlane run xcversion version:&quot;11&quot;
# Unlock keychain
security unlock-keychain -p &quot;Yonglinit123&quot; ~/Library/Keychains/login.keychain
# Clean build and deploy
fastlane gym --scheme ${scheme} --clean --configuration ${configuration} --archive_path ${archive_path} --export_method ${export_method} --output_directory ${output_path} --output_name ${ipa_name}
# build ips
fastlane sit
# rename ipa to a identified one
mv Runner.ipa ${ipa_name}
# deploy
echo &quot;Deploy to IPA repository&quot;
scp -i ~/jenkins/jenkins ${ipa_path} appuploader@10.57.117.135:~/app/Hi365/${ipa_name}</command>
scp -i ~/jenkins/jenkins ${ipa_full_path} appuploader@10.57.117.135:~/app/Hi365/${ipa_name}</command>
</hudson.tasks.Shell>
</builders>
<publishers>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment