Merge branch 'master' of toki-labs.com:/Users/toki/git/oto_cli

This commit is contained in:
leedongmyung(desktop) 2025-09-08 10:31:29 +09:00
commit b8712bd12f
13 changed files with 1171 additions and 152 deletions

778
assets/config.xml Normal file
View file

@ -0,0 +1,778 @@
<?xml version='1.1' encoding='UTF-8'?>
<project>
<actions/>
<description>빌드 가이드 문서&#xd;
&#xd;
https://lgtest.atlassian.net/wiki/spaces/FE/pages/78217452/AOS+Jenkins</description>
<keepDependencies>false</keepDependencies>
<properties>
<jenkins.model.BuildDiscarderProperty>
<strategy class="hudson.tasks.LogRotator">
<daysToKeep>15</daysToKeep>
<numToKeep>-1</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
<removeLastBuild>false</removeLastBuild>
</strategy>
</jenkins.model.BuildDiscarderProperty>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition>
<name>url</name>
<description>LT환경 설정화면이 없이 고정주소 빌드가 필요할때 사용해 주세요.
공백일경우 앱시작시 LT환경 설정이 나옵니다.
(http또는 https를 포함한 주소를 넣어주세요. 공백이 포함되거나, 마지막 /가 포함되면 정상 실행이 되지 않을수 있습니다.)</description>
<trim>false</trim>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>modify_app_id</name>
<description>App ID를 변경합니다. &apos;com.lguplus.mobile.cs&apos; 에서 추가로 값이 추가되어 운영버전의 앱과 중복 설치 가능하게 됩니다.
예를들어 myapp로 설정시 App ID &apos;com.lguplus.mobile.cs.myapp&apos;으로 빌드되며, 앱이름은 &apos;당신의 U+ (myapp)로 설정됩니다. 앱아이콘은 dev띠를 두릅니다.
공백일경우 운영과 동일한 App ID로 빌드됩니다.
(텍스트내 공백무시, 대문자 무시, 기호불가, 10자 한정, 10자 초과시 자름)</description>
<defaultValue>dev</defaultValue>
<trim>true</trim>
</hudson.model.StringParameterDefinition>
<hudson.model.TextParameterDefinition>
<name>slack_message</name>
<description>빌드 완료시 Slack에 메세지를 보낼때, 어떤용도의 빌드인지 알기 위한 판별용 메세지입니다.
등록된 사용자의 경우 멘션(@김아무개) 사용도 가능합니다.</description>
<trim>false</trim>
</hudson.model.TextParameterDefinition>
<hudson.model.ChoiceParameterDefinition>
<name>branch</name>
<description>빌드할 브런치입니다. 특정 feature 브런치용 빌드를 원하신다면 설정에서 이 항목에 추가해주세요.
(수정권한이 없으면 앱파트에 요청해주세요.)</description>
<choices class="java.util.Arrays$ArrayList">
<a class="string-array">
<string>main</string>
<string>develop</string>
<string>release/7.0.6</string>
<string>release/7.0.7</string>
<string>release/7.0.10</string>
<string>release/7.0.11</string>
<string>release/6.0.38_test</string>
<string>feature/DCBGIT-21704_U+2.0크롬판별_이슈</string>
<string>feature/DCBGIT-20848_LT빌드-자동화</string>
<string>feature/DCBGIT-18853_딥링크_이동페이지_변경</string>
<string>feature/DCBGWBS-6721_가속화002_챗봇</string>
<string>feature/DCBGQA-6078_용어사전pdf_다운로드이슈</string>
<string>feature/DCBGIT-24352_디바이스식별자전달</string>
</a>
</choices>
</hudson.model.ChoiceParameterDefinition>
<hudson.model.ChoiceParameterDefinition>
<name>slack_channel</name>
<description>알림을 보낼 Slack 채널을 선택합니다.</description>
<choices class="java.util.Arrays$ArrayList">
<a class="string-array">
<string>디지털fe-앱빌드</string>
<string>디지털fe-앱빌드_테스트</string>
</a>
</choices>
</hudson.model.ChoiceParameterDefinition>
<hudson.model.BooleanParameterDefinition>
<name>debuggable</name>
<description>디버깅 가능한 빌드인지 여부입니다. 체크시 디버깅 가능한 빌드로 빌드 됩니다.</description>
<defaultValue>true</defaultValue>
</hudson.model.BooleanParameterDefinition>
<hudson.model.BooleanParameterDefinition>
<name>share</name>
<description>외부공유용 (Firebase 이용)</description>
<defaultValue>false</defaultValue>
</hudson.model.BooleanParameterDefinition>
<hudson.model.BooleanParameterDefinition>
<name>obfuscation</name>
<description>난독화를 할지 여부 입니다.</description>
<defaultValue>false</defaultValue>
</hudson.model.BooleanParameterDefinition>
<hudson.model.BooleanParameterDefinition>
<name>release</name>
<description>메인 url을 제외한 빌드세팅을 Release환경으로 선택하여 빌드 합니다. (메인 url은 위에 있는 url필드 값을 따라갑니다.)</description>
<defaultValue>false</defaultValue>
</hudson.model.BooleanParameterDefinition>
<hudson.model.TextParameterDefinition>
<name>BuildData</name>
<description>빌드용 스크립트입니다. 터치하지 마세요.</description>
<defaultValue>---
############################ Properties ############################
property:
workspace: &apos;${WORKSPACE}&apos;
slackChannel: &apos;${slack_channel}&apos;
slackMessage: &apos;${slack_message}&apos;
branch: &apos;${branch}&apos;
url: &apos;${url}&apos;
appID: &apos;${modify_app_id}&apos;
share: &apos;${share}&apos;
obfuscation: &apos;${obfuscation}&apos;
release: &apos;${release}&apos;
urlValue: https://mstg.lguplus.com
fileUrl: http://febuild.uhdcsre.com:8080/job/mcs-aos/${BUILD_NUMBER}/artifact/app/build/outputs/apk/mobileCS/lt/{FILE}
urlMessage: &apos;&apos;
appIDMessage: &apos;&apos;
portValue: &apos;&apos;
enableDevTool: &apos;true&apos;
gradlePath: &lt;!property.workspace&gt;/app/build.gradle
stringsPath: &lt;!property.workspace&gt;/app/src/main/res/values/strings.xml
manifestPath: &lt;!property.workspace&gt;/app/src/main/AndroidManifest.xml
buildPath: &lt;!property.workspace&gt;/app/build/outputs/apk/mobileCS/lt
config: |
{
&quot;version&quot;: &quot;VERSION&quot;,
&quot;versionCode&quot;: VERSION_CODE,
&quot;gitHash&quot;: &quot;GIT_HASH&quot;,
&quot;buildDate&quot;: &quot;BUILD_DATE&quot;
}
templateLt: |
lt {
debuggable ${debuggable}
signingConfig null
buildConfigField &apos;boolean&apos;, &apos;ENABLE_DEVTOOL&apos;, &quot;{ENABLE_DEVTOOL}&quot;
buildConfigField &apos;boolean&apos;, &apos;DEV&apos;, &quot;${debuggable}&quot;
buildConfigField &apos;String&apos;, &apos;DEBUG_LOG_TAG&apos;, &apos;&quot;MobileCS_STG&quot;&apos;
buildConfigField &apos;String&apos;, &apos;HTTP_WEB_URL&apos;, &apos;&quot;{HTTP_URL}&quot;&apos;
buildConfigField &apos;String&apos;, &apos;WEB_URL&apos;, &apos;&quot;{URL}&quot;&apos;
buildConfigField &apos;String&apos;, &apos;PUSH_APPLICATION_ID&apos;, &apos;&quot;custm_FCM1&quot;&apos;
buildConfigField &apos;String&apos;, &apos;PUSH_SERVICE_ID&apos;, &apos;&quot;30153&quot;&apos;
buildConfigField &apos;String&apos;, &apos;PUSH_URL&apos;, &apos;&quot;http://222.231.13.33:5556&quot;&apos;
buildConfigField &apos;String&apos;, &apos;PUSH_AUTH&apos;, &apos;&quot;auth=0000002359;C20384A50EBCD4FD2A1B&quot;&apos;
buildConfigField &apos;String&apos;, &apos;CHATBOT_URL&apos;, &apos;&quot;https://chatbot-stg.lguplus.com/?fromChan=APP&quot;&apos;
buildConfigField &apos;String&apos;, &apos;FIDO_URL&apos;, &apos;&quot;https://stg-onps.uplus.co.kr&quot;&apos;
buildConfigField &apos;String&apos;, &apos;FIDO_BIZ_API_URL&apos;, &apos;&quot;https://stg.uplus.co.kr/uhdc/fo/apcm/authbio/v1&quot;&apos;
buildConfigField &apos;String&apos;, &apos;FIDO_SITE_ID&apos;, &apos;&quot;SIT01UPLUS0000000000&quot;&apos;
buildConfigField &apos;String&apos;, &apos;FIDO_SVC_ID&apos;, &apos;&quot;SVC01SIT01UPLUS00000&quot;&apos;
buildConfigField &apos;String&apos;, &apos;USIM_AGENT_API_KEY&apos;, &apos;&quot;a6AwmI2XEWup9MALI/Z/ASzDs87gcNmKifk2iyUUChs=&quot;&apos;
buildConfigField &apos;String&apos;, &apos;SERVER_TYPE&apos;, &apos;&quot;STG&quot;&apos;
buildConfigField &quot;java.util.Map&lt;String, String&gt;&quot;, &quot;LT_ENVIRONMENT_MAP&quot;, &quot;new java.util.HashMap&lt;String, String&gt;() {{ &quot; +
&quot; put(\&quot;QA (https)\&quot;, \&quot;https://mstg.lguplus.com\&quot;);&quot; +
&quot; put(\&quot;QA\&quot;, \&quot;http://mstg.lguplus.com\&quot;);&quot; +
&quot; put(\&quot;운영\&quot;, \&quot;https://app.lguplus.com\&quot;);&quot; +
&quot; put(\&quot;PRE\&quot;, \&quot;https://mpre.lguplus.com\&quot;);&quot; +
&quot; put(\&quot;DEV\&quot;, \&quot;http://mdev.uplus.com\&quot;);&quot; +
&quot;}}&quot;
manifestPlaceholders = [buildType: &quot;&quot;]
}
templateRelease: |
lt {
debuggable ${debuggable}
minifyEnabled false
shrinkResources false
signingConfig null
buildConfigField &apos;boolean&apos;, &apos;ENABLE_DEVTOOL&apos;, &quot;{ENABLE_DEVTOOL}&quot;
buildConfigField &apos;boolean&apos;, &apos;DEV&apos;, &quot;${debuggable}&quot;
buildConfigField &apos;String&apos;, &apos;DEBUG_LOG_TAG&apos;, &apos;&quot;MobileCS&quot;&apos;
buildConfigField &apos;String&apos;, &apos;HTTP_WEB_URL&apos;, &apos;&quot;{HTTP_URL}&quot;&apos;
buildConfigField &apos;String&apos;, &apos;WEB_URL&apos;, &apos;&quot;{URL}&quot;&apos;
buildConfigField &apos;String&apos;, &apos;PUSH_APPLICATION_ID&apos;, &apos;&quot;custm_FCM1&quot;&apos;
buildConfigField &apos;String&apos;, &apos;PUSH_SERVICE_ID&apos;, &apos;&quot;21016&quot;&apos;
buildConfigField &apos;String&apos;, &apos;PUSH_URL&apos;, &apos;&quot;http://upushgw.uplus.co.kr:5556&quot;&apos;
buildConfigField &apos;String&apos;, &apos;PUSH_AUTH&apos;, &apos;&quot;auth=0000002415;CDAC132152FCB4F4499F&quot;&apos;
buildConfigField &apos;String&apos;, &apos;CHATBOT_URL&apos;, &apos;&quot;https://chatbot.lguplus.com/?fromChan=APP&quot;&apos;
buildConfigField &apos;String&apos;, &apos;FIDO_URL&apos;, &apos;&quot;https://onps.uplus.co.kr&quot;&apos;
buildConfigField &apos;String&apos;, &apos;FIDO_BIZ_API_URL&apos;, &apos;&quot;https://app.lguplus.com/uhdc/fo/apcm/authbio/v1&quot;&apos;
buildConfigField &apos;String&apos;, &apos;FIDO_SITE_ID&apos;, &apos;&quot;SIT01UPLUS0000000000&quot;&apos;
buildConfigField &apos;String&apos;, &apos;FIDO_SVC_ID&apos;, &apos;&quot;SVC01SIT01UPLUS00000&quot;&apos;
buildConfigField &apos;String&apos;, &apos;USIM_AGENT_API_KEY&apos;, &apos;&quot;mV/yWnRgD2wQn5sjzokKGVJZDdVKDnLPkvS4cG+jwZE=&quot;&apos;
buildConfigField &apos;String&apos;, &apos;SERVER_TYPE&apos;, &apos;&quot;PROD&quot;&apos;
buildConfigField &quot;java.util.Map&lt;String, String&gt;&quot;, &quot;LT_ENVIRONMENT_MAP&quot;, &quot;new java.util.HashMap&lt;String, String&gt;()&quot;
manifestPlaceholders = [buildType: &quot;&quot;]
}
slackMessageAdd: |
&quot;text&quot;: &quot;&lt;!property.slackMessage&gt;&quot;,
slackMessageJson: |
{
&quot;channel&quot;: &quot;&lt;!property.slackChannel&gt;&quot;,
{SLACK_MESSAGE}
&quot;attachments&quot;: [
{
&quot;color&quot;: &quot;#81CA3F&quot;,
&quot;author_name&quot;: &quot;Android&quot;,
&quot;fields&quot;: [
{
&quot;value&quot;: &quot;```Builder: ${BUILD_USER}\nJob URL: ${BUILD_URL}\nBranch: ${GIT_BRANCH}\nGitHash: ${GIT_COMMIT}\nVersion: {VERSION}\nVersion Code: {VERSION_CODE}\nRelease 환경: ${release}\n{URL}DevTool 활성: {DEVTOOL}\n{APPID}Date: {DATE}```&quot;
}
],
&quot;image_url&quot;: &quot;https://api.qrserver.com/v1/create-qr-code/?data={FILE_URL}&amp;size=150x150&quot;,
&quot;actions&quot;: [
{
&quot;type&quot;: &quot;button&quot;,
&quot;name&quot;: &quot;build&quot;,
&quot;text&quot;: &quot;Download&quot;,
&quot;url&quot;: &quot;{FILE_URL}&quot;
}
]
}
]
}
############################# Pipeline #############################
pipeline:
id: main
workflow:
# Set app info
- exe: create-app
# Set envValue
- if:
condition-bool: &lt;!property.release&gt; == true
on-true:
- exe: set-release
on-false:
- exe: set-lt
# Set urlValue
- contain:
list: &lt;!property.url&gt;
target: &apos;{url}&apos;
on-false:
- exe: parse-url
- if:
condition-string: &lt;!property.port&gt; != 443
on-true:
- if:
condition-string: &lt;!property.port&gt; != 80
on-true:
- exe: set-port
- exe: set-url
# Gradle에 Signing 정보 입력
- exe: gradle-read
- exe: append-sign
- exe: replace-http-url
- exe: replace-url
- exe: replace-env
- exe: gradle-write
- contain:
list: &lt;!property.appID&gt;
target: &apos;{modify_app_id}&apos;
on-false:
- exe: set-appid-message
# 앱이름 변경
- exe: strings-read
- exe: app-rename
- exe: strings-write
# 파일 권한 및 아이콘 변경
- exe: manifest-read
- exe: replace-icon
- exe: replace-permission
- exe: manifest-write
# Listing Files
- exe: files
- foreach:
iterator: &lt;!property.files&gt;
setValue: &lt;@property.file&gt;
on-do:
# Pacckage name replace
- exe: file-read
- exe: replace-package
- exe: file-write
# Config 작성
- exe: set-config
- exe: write-config
# Gradle 빌드
- exe: build
# Slack Message가 빈값일때 empty 세팅
- contain:
list: &lt;!property.slackMessage&gt;
target: &apos;{slack_message}&apos;
on-true:
- exe: set-slack-message-empty
# Listing Build Files
- exe: files-build
- foreach:
iterator: &lt;!property.files&gt;
setValue: &lt;@property.fileBuild&gt;
on-do:
- contain:
list: &lt;!property.fileBuild&gt;
target: output-metadata.json
on-true:
- exe: read-build-meta
- if:
condition-string: &lt;!property.enableDevTool&gt; == false
on-true:
- exe: replace-file-name
- exe: rename-build-file
- exe: set-file-name
- exe: set-slack-message
- exe: slack
############################# Commands #############################
commands:
### Create App Data
- command: CreateAppData
id: create-app
param:
scm: Git
name: mcs
relativeAssetPath: app/src/main/assets
setVersion: &lt;@property.version&gt;
setHash: &lt;@property.hash&gt;
setDate: &lt;@property.date&gt;
### Set Lt
- command: SetValue
id: set-lt
param:
values-string:
envValue: &lt;!property.templateLt&gt;
### Set Release
- command: SetValue
id: set-release
param:
values-string:
envValue: &lt;!property.templateRelease&gt;
urlValue: http://app.lguplus.com
### Parse URL
- command: URLInfo
id: parse-url
param:
url: &lt;!property.url&gt;
setScheme: &lt;@property.scheme&gt;
setHost: &lt;@property.host&gt;
setPort: &lt;@property.port&gt;
### Set Port Value
- command: SetValue
id: set-port
param:
values-string:
portValue: :&lt;!property.port&gt;
### Set default url
- command: SetValue
id: set-url
param:
values-string:
urlValue: &lt;!property.scheme&gt;://&lt;!property.host&gt;&lt;!property.portValue&gt;
urlMessage: &apos;URL: &lt;!property.scheme&gt;://&lt;!property.host&gt;&lt;!property.portValue&gt;\n&apos;
enableDevTool: &apos;false&apos;
### Gradle Read
- command: FileRead
id: gradle-read
param:
showPrint: false
path: &lt;!property.gradlePath&gt;
setContent: &lt;@property.gradle&gt;
### Set Signing Option
- command: StringReplace
id: append-sign
param:
showPrint: false
text: &lt;!property.gradle&gt;
pair:
- from: android {
to: |
android {
signingConfigs {
Lt {
storeFile file(&quot;keystore.dat&quot;)
storePassword &quot;123456&quot;
keyAlias &quot;kingkor&quot;
keyPassword &quot;123456&quot;
}
}
setValue: &lt;@property.gradle&gt;
### Replace http url
- command: StringReplace
id: replace-http-url
param:
showPrint: true
text: &lt;!property.urlValue&gt;
pair:
- from: https://
to: http://
setValue: &lt;@property.httpUrlValue&gt;
### Replace url
- command: StringReplace
id: replace-url
param:
showPrint: true
text: &lt;!property.envValue&gt;
pair:
- from: &apos;{HTTP_URL}&apos;
to: &lt;!property.httpUrlValue&gt;
- from: &apos;{URL}&apos;
to: &lt;!property.urlValue&gt;
- from: &apos;{ENABLE_DEVTOOL}&apos;
to: &lt;!property.enableDevTool&gt;
setValue: &lt;@property.envValue&gt;
### Replace env
- command: StringReplacePattern
id: replace-env
param:
startAt: 0
showPrint: true
startPattern: &apos;lt {&apos;
endPattern: &apos; }&apos;
text: &lt;!property.gradle&gt;
value: &lt;!property.envValue&gt;
setValue: &lt;@property.gradle&gt;
### Gradle Write
- command: FileWrite
id: gradle-write
param:
path: &lt;!property.gradlePath&gt;
content: &lt;!property.gradle&gt;
### App ID Message
- command: SetValue
id: set-appid-message
param:
values-string:
appIDMessage: &apos;변경된 App ID: com.lguplus.mobile.cs.&lt;!property.appID&gt;\n&apos;
### Strings Read
- command: FileRead
id: strings-read
param:
showPrint: false
path: &lt;!property.stringsPath&gt;
setContent: &lt;@property.strings&gt;
### Replace App Name
- command: StringReplace
id: app-rename
param:
showPrint: false
text: &lt;!property.strings&gt;
pair:
- from: &lt;string name=&quot;app_name&quot;&gt;당신의 U+&lt;/string&gt;
to: &lt;string name=&quot;app_name&quot;&gt;당유(&lt;!property.appID&gt;)&lt;/string&gt;
setValue: &lt;@property.strings&gt;
### Strings Write
- command: FileWrite
id: strings-write
param:
path: &lt;!property.stringsPath&gt;
content: &lt;!property.strings&gt;
### Manifest Read
- command: FileRead
id: manifest-read
param:
showPrint: false
path: &lt;!property.manifestPath&gt;
setContent: &lt;@property.manifest&gt;
### Replace Icon
- command: StringReplace
id: replace-icon
param:
showPrint: false
text: &lt;!property.manifest&gt;
pair:
- from: android:icon=&quot;@drawable/ic_launcher&quot;
to: android:icon=&quot;@drawable/ic_launcher_dev&quot;
setValue: &lt;@property.manifest&gt;
### Replace Permission
- command: StringReplace
id: replace-permission
param:
showPrint: false
text: &lt;!property.manifest&gt;
pair:
- from: &lt;/application&gt;
to: |
&lt;/application&gt;
&lt;uses-permission android:name=&quot;android.permission.MANAGE_EXTERNAL_STORAGE&quot; tools:ignore=&quot;ScopedStorage&quot;/&gt;
setValue: &lt;@property.manifest&gt;
### Manifest Write
- command: FileWrite
id: manifest-write
param:
path: &lt;!property.manifestPath&gt;
content: &lt;!property.manifest&gt;
### Files Listing
- command: Files
id: files
param:
path: &lt;!property.workspace&gt;/app
recursive: true
ignoreRegExs:
- ^.*\/\.[a-zA-Z0-9_-]+\/.* # .git .idea etc..
- ^.*\.(png|jpg|jpeg|gif|bmp)$ # image files
- ^.*\.(txt|so|mk|crt|ttf)$ # ignore ext
- /build/
- /buildScript/
- /schemas/
- /libs/
- /aars/
- /mobileCS/
- /.DS_Store
- /proguard-rules.pro
- /lint.xml
- /.gitignore
setFiles: &lt;@property.files&gt;
### File Read
- command: FileRead
id: file-read
param:
showPrint: false
path: &lt;!property.file&gt;
setContent: &lt;@property.fileContent&gt;
### Replace Package
- command: StringReplace
id: replace-package
param:
showPrint: false
text: &lt;!property.fileContent&gt;
pair:
- from: com.lguplus.mobile.cs
to: com.lguplus.mobile.cs.&lt;!property.appID&gt;
setValue: &lt;@property.fileContent&gt;
### Strings Write
- command: FileWrite
id: file-write
param:
path: &lt;!property.file&gt;
content: &lt;!property.fileContent&gt;
### Print
- command: Print
id: print
param:
message: &apos;File: &lt;!property.file&gt;&apos;
### Set Config
- command: StringReplace
id: set-config
param:
showPrint: false
text: &lt;!property.config&gt;
pair:
- from: GIT_HASH
to: ${GIT_COMMIT}
- from: BUILD_DATE
to: &lt;!property.date&gt;
setValue: &lt;@property.config&gt;
### Write Config
- command: FileWrite
id: write-config
param:
path: &lt;!property.workspace&gt;/app/src/main/assets/config.json
content: &lt;!property.config&gt;
### Build Gradle
- command: Shell
id: build
param:
commands:
- ./gradlew clean assembleLt
### Build Files Listing
- command: Files
id: files-build
param:
path: &lt;!property.workspace&gt;/app/build/outputs/apk/mobileCS/lt
recursive: false
setFiles: &lt;@property.files&gt;
### Read build meta
- command: JsonReaderFile
id: read-build-meta
param:
path: &lt;!property.fileBuild&gt;
pair:
- from: elements[0].versionCode
setValue: &lt;@property.versionCode&gt;
- from: elements[0].versionName
setValue: &lt;@property.versionName&gt;
- from: elements[0].outputFile
setValue: &lt;@property.fileBuildName&gt;
- from: elements[0].outputFile
setValue: &lt;@property.fileBuildReplacedName&gt;
### Replace file name
- command: StringReplace
id: replace-file-name
param:
showPrint: false
text: &lt;!property.fileBuildName&gt;
pair:
- from: &apos;_lt_&apos;
to: &apos;_&lt;!property.host&gt;_&apos;
setValue: &lt;@property.fileBuildReplacedName&gt;
### Rename Build File
- command: Rename
id: rename-build-file
param:
renameMap:
&lt;!property.workspace&gt;/app/build/outputs/apk/mobileCS/lt/&lt;!property.fileBuildName&gt;: &lt;!property.workspace&gt;/app/build/outputs/apk/mobileCS/lt/&lt;!property.fileBuildReplacedName&gt;
### Set File Name
- command: StringReplace
id: set-file-name
param:
showPrint: false
text: &lt;!property.fileUrl&gt;
pair:
- from: &apos;{FILE}&apos;
to: &lt;!property.fileBuildReplacedName&gt;
setValue: &lt;@property.fileUrl&gt;
### Set Slack Message
- command: StringReplace
id: set-slack-message
param:
showPrint: false
text: &lt;!property.slackMessageJson&gt;
pair:
- from: &apos;{SLACK_MESSAGE}&apos;
to: &lt;!property.slackMessageAdd&gt;
- from: &apos;{APPID}&apos;
to: &lt;!property.appIDMessage&gt;
- from: &apos;{DATE}&apos;
to: &lt;!property.date&gt;
- from: &apos;{VERSION}&apos;
to: &lt;!property.versionName&gt;
- from: &apos;{VERSION_CODE}&apos;
to: &lt;!property.versionCode&gt;
- from: &apos;{URL}&apos;
to: &lt;!property.urlMessage&gt;
- from: &apos;{DEVTOOL}&apos;
to: &lt;!property.enableDevTool&gt;
- from: &apos;{FILE_URL}&apos;
to: &lt;!property.fileUrl&gt;
setValue: &lt;@property.slackMessageJson&gt;
### Set Slack Message to empty
- command: SetValue
id: set-slack-message-empty
param:
values-string:
slackMessageAdd: &apos;&apos;
### Slack
- command: Slack
id: slack
param:
token: xoxb-3457711939825-8629587578534-ysH4Q5R0lM8gdgJ8dx3z6xI7
messageJson: &lt;!property.slackMessageJson&gt;
idMap:
박형윤: U03L21XV6LE
이동명: U05A94D57RS
심재진: U03L8HZCN75
이미영: U04H7HMV4R2
김시형: U03LYCJ1XU0
김가영: U050BN7EH8W
김낙운: U05DRP0N295
한희경: U03KU1YJUG7</defaultValue>
<trim>false</trim>
</hudson.model.TextParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM" plugin="git@5.7.0">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://gitlab.uhdcsre.com/app-developer/lgup-mcs-aos.git</url>
<credentialsId>bfd6fb6a-e36e-4d12-87a8-4c6ca93bc28b</credentialsId>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>*/${branch}</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="empty-list"/>
<extensions/>
</scm>
<assignedNode>mac-mini-m2</assignedNode>
<canRoam>false</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command># Load .zprofile if it exists
if [ -f ~/.zprofile ]; then
source ~/.zprofile
fi
# Load .bash_profile if it exists
if [ -f ~/.bash_profile ]; then
source ~/.bash_profile
fi
# Load .bashrc if it exists (optional)
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# Load .zshrc if it exists (optional)
if [ -f ~/.zshrc ]; then
source ~/.zshrc
fi
echo $PATH
BASEDIR=$(dirname $0)
#echo &quot;===&gt; Script location: ${BASEDIR}&quot;
#cd ${BASEDIR}/../../..
echo &quot;===&gt; Build Project Path: ${PWD}&quot;
echo ${BUILD_USER}
echo ${BUILD_USER_ID}
oto exe -j</command>
<configuredLocalRules/>
</hudson.tasks.Shell>
</builders>
<publishers>
<hudson.tasks.ArtifactArchiver>
<artifacts>app/build/outputs/apk/mobileCS/lt/*.apk</artifacts>
<allowEmptyArchive>false</allowEmptyArchive>
<onlyIfSuccessful>false</onlyIfSuccessful>
<fingerprint>false</fingerprint>
<defaultExcludes>true</defaultExcludes>
<caseSensitive>true</caseSensitive>
<followSymlinks>false</followSymlinks>
</hudson.tasks.ArtifactArchiver>
</publishers>
<buildWrappers>
<hudson.plugins.ansicolor.AnsiColorBuildWrapper plugin="ansicolor@1.0.6">
<colorMapName>xterm</colorMapName>
</hudson.plugins.ansicolor.AnsiColorBuildWrapper>
</buildWrappers>
</project>

View file

@ -1,108 +1,114 @@
---
property:
workspace: C:/Users/r0bin/AppData/Roaming/DarkSoulsIII
saveFolder: <!property.workspace>/01100001112a7a14
savePath: <!property.saveFolder>/DS30000.sl2
workspace: .
os:
- aos
- ios
configAOS:
- C:/Jenkins/jobs/mcs-aos
- C:/Jenkins/jobs/mcs-aos-lt
configiOS:
- C:/Jenkins/jobs/mcs-ios
- C:/Jenkins/jobs/mcs-ios-lt
pipeline:
id: main
workflow:
- contain:
list: this is test
target: back
on-true:
- exe: print0
- exe: read-web
- exe: json-read-web
- exe: json-read-local
- exe: diff
- if:
condition-bool: <!property.diff> == true
on-true:
- exe: info
- foreach:
iterator: <!property.os>
setValue: <@property.osValue>
on-do:
- if:
condition-date: <!property.lastSavedWeb> < <!property.info.modified>
condition-string: <!property.osValue> == aos
on-true:
- exe: json-write-local
- exe: upload
- if:
condition-date: <!property.lastSavedWeb> > <!property.lastSavedLocal>
on-true:
- exe: json-write-web
- exe: download
- exe: set-aos
on-false:
- exe: set-ios
- exe: print
- foreach:
iterator: <!property.configs>
setValue: <@property.configValue>
on-do:
- exe: print-config
- exe: read
- exe: branch
- exe: param-modify
# - exe: write
commands:
- command: Print
id: print0
### Set aos
- command: SetValue
id: set-aos
param:
message: test
values-string:
repository: C:/works/oto_cli
values-object:
configs: <!property.configAOS>
- command: FileInfo
id: info
### Set ios
- command: SetValue
id: set-ios
param:
path: <!property.savePath>
setInfo: <@property.info>
- command: WebRequest
id: read-web
param:
url: https://toki-labs.com/cdn/save/darksoulIII/save.json
setResponse: <@property.web>
- command: JsonReader
id: json-read-web
param:
json: <!property.web>
pair:
- from: lastSaved
setValue: <@property.lastSavedWeb>
- command: JsonReaderFile
id: json-read-local
param:
path: <!property.saveFolder>/save.json
pair:
- from: lastSaved
setValue: <@property.lastSavedLocal>
values-string:
repository: C:/works/dart_framework
values-object:
configs: <!property.configiOS>
### Test print
- command: Print
id: print
param:
message: change save file
message: Repository - <!property.repository>
- command: FileDiffCheck
id: diff
### Test print
- command: Print
id: print-config
param:
paths:
- <!property.savePath>
setDiff: <@property.diff>
message: Config - <!property.configValue>
- command: JsonWriterFile
id: json-write-local
### Strings Read
- command: FileRead
id: read
param:
path: <!property.saveFolder>/save.json
showPrint: false
path: <!property.configValue>
setContent: <@property.content>
### Replace
- command: StringReplace
id: replace
param:
showPrint: true
text: <!property.content>
pair:
- from: lastSaved
value: <!property.info.modified>
- from: <description>
to: <test>
setValue: <@property.content>
- command: Copy
id: upload
### List up branches
- command: GitBranch
id: branch
param:
copyMap:
<!property.savePath> : \\192.168.0.97\Macintosh HD\Users\toki\docker\nginx\home\cdn\save\darksoulIII
<!property.saveFolder>/save.json : \\192.168.0.97\Macintosh HD\Users\toki\docker\nginx\home\cdn\save\darksoulIII
path: <!property.repository>
startDay: 60
setBranches: <@property.value>
- command: JsonWriterFile
id: json-write-web
### Modify param
- command: JenkinsParameterModify
id: param-modify
param:
path: <!property.saveFolder>/save.json
pair:
- from: lastSaved
value: <!property.lastSavedWeb>
content: <!property.content>
name: branch
value: <!property.value>
setContent: <@property.content>
- command: Copy
id: download
### Gradle Write
- command: FileWrite
id: write
param:
copyMap:
\\192.168.0.97\Macintosh HD\Users\toki\docker\nginx\home\cdn\save\darksoulIII\DS30000.sl2 : <!property.saveFolder>
path: <!property.configValue>
content: <!property.content>

View file

@ -55,9 +55,11 @@ class BuildiOS extends Command {
var process = await ProcessExecutor.run(shell);
var arr = process.stdout.toString().split('\n');
const result = '[RESULT]: ';
var needIncrementVersionState = ['WAITING_FOR_REVIEW', 'WAITING_FOR_REVIEW', 'IN_REVIEW', 'PENDING_DEVELOPER_RELEASE', 'PENDING_APPLE_RELEASE', 'REPLACED_WITH_NEW_VERSION'];
List<dynamic> jsonArr;
for (var item in arr) {
if (item.contains(result)) {
var jsonArr =
jsonArr =
jsonDecode(item.substring(item.indexOf(result) + result.length))
as List<dynamic>;
for (var item in jsonArr) {
@ -65,13 +67,16 @@ class BuildiOS extends Command {
targetVersion = item['version'];
break;
}
if (needIncrementVersionState.contains(item['state'])) {
targetVersion = incrementVersion(item['version']);
}
}
break;
}
}
if (targetVersion == null) {
throw Exception(
'Can not find target version when state = PREPARE_FOR_SUBMISSION.');
'Can not find target version when state = PREPARE_FOR_SUBMISSION, PENDING_DEVELOPER_RELEASE');
}
version = targetVersion;

View file

@ -17,7 +17,7 @@ class TestflightUpload extends Command {
var shell = StringBuffer();
shell.write(
'FASTLANE_DISABLE_PRECHECK=1 fastlane deliver upload_binary --ipa "$ipaPath" --api_key_path "$apiKeyPath" --force');
'FASTLANE_DISABLE_PRECHECK=1 fastlane deliver upload_binary --ipa "$ipaPath" --api_key_path "$apiKeyPath" --force --skip_app_version_update true --run_precheck_before_submit false --skip_metadata true --skip_screenshots true');
var process = await ProcessExecutor.start(shell,
workspace: workspace,

View file

@ -24,6 +24,7 @@ import 'package:oto_cli/oto/commands/aws/awscli.dart';
import 'package:oto_cli/oto/commands/docker/docker.dart';
import 'package:oto_cli/oto/commands/git/git_hub.dart';
import 'package:oto_cli/oto/commands/gradle/gradle.dart';
import 'package:oto_cli/oto/commands/jenkins/jenkins.dart';
import 'package:oto_cli/oto/commands/jira/jira.dart';
import 'package:oto_cli/oto/commands/process/process.dart';
import 'package:oto_cli/oto/commands/proto/protobuf.dart';
@ -100,6 +101,7 @@ enum CommandType {
GitReset,
GitStashPush,
GitStashApply,
GitBranch,
GitHub,
GitHubPullRequestCreate,
GitHubPullRequestList,
@ -117,7 +119,8 @@ enum CommandType {
ProcessRun,
ProcessKill,
SMBAuth,
Delay
Delay,
JenkinsParameterModify
}
abstract class Command {
@ -175,6 +178,7 @@ abstract class Command {
CommandType.GitReset: () => GitReset(),
CommandType.GitStashPush: () => GitStashPush(),
CommandType.GitStashApply: () => GitStashApply(),
CommandType.GitBranch: () => GitBranch(),
CommandType.GitHub: () => GitHub(),
CommandType.GitHubPullRequestCreate: () => GitHubPullRequestCreate(),
CommandType.GitHubPullRequestList: () => GitHubPullRequestList(),
@ -193,6 +197,7 @@ abstract class Command {
CommandType.ProcessKill: () => ProcessKill(),
CommandType.SMBAuth: () => SMBAuth(),
CommandType.Delay: () => Delay(),
CommandType.JenkinsParameterModify: () => JenkinsParameterModify(),
};
factory Command.byType(CommandType type) {
@ -262,6 +267,9 @@ abstract class Command {
static Future setPropertyValue(String tag, dynamic value,
{bool? showPrint}) async {
var match = regSetEx.firstMatch(tag);
if (match == null) {
throw Exception('Please put the correct value. (ex: <@property.value>)');
}
tag = match!.group(2)!;
if (tag.startsWith('property')) {
var key = tag.replaceFirst('property.', '');

View file

@ -27,7 +27,19 @@ class FileWrite extends Command {
Future execute(DataCommand command) async {
var data = DataFileWrite.fromJson(getParam(command));
var file = File(data.path);
if (file.existsSync()) file.deleteSync();
if (file.existsSync()) {
if (data.backup ?? false) {
var now = DateTime.now();
var postfix =
'_${now.year}${now.month.toString().padLeft(2, '0')}${now.day.toString().padLeft(2, '0')}${now.hour.toString().padLeft(2, '0')}${now.minute.toString().padLeft(2, '0')}${now.second.toString().padLeft(2, '0')}${now.millisecond}';
var fileName = path.basenameWithoutExtension(data.path);
var fileExt = path.extension(data.path);
var backupPath =
path.join(path.dirname(data.path), fileName + postfix + fileExt);
await file.copy(backupPath);
}
file.deleteSync();
}
await file.writeAsString(data.content);
return complete(0, command);

View file

@ -168,16 +168,16 @@ class FTP {
for (var item in list) {
FileType? type;
switch (item.type) {
case FTPEntryType.DIR:
case FTPEntryType.dir:
type = FileType.directory;
break;
case FTPEntryType.FILE:
case FTPEntryType.file:
type = FileType.file;
break;
case FTPEntryType.LINK:
case FTPEntryType.link:
// TODO: Handle this case.
break;
case FTPEntryType.UNKNOWN:
case FTPEntryType.unknown:
// TODO: Handle this case.
break;
}

View file

@ -1,3 +1,6 @@
import 'dart:convert';
import 'dart:io';
import 'package:dart_framework/utils/system_util.dart';
import 'package:oto_cli/oto/application.dart';
import 'package:oto_cli/oto/commands/command.dart';
@ -220,3 +223,53 @@ class GitStashApply extends Command {
return await completeProcess(process, command, passExitCodes: [1]);
}
}
//
class GitBranch extends Command {
@override
Future execute(DataCommand command) async {
var data = DataGitBranch.fromJson(getParam(command));
var shell = StringBuffer('cd ${data.path}');
shell.write(
' $and git for-each-ref --format=\'{"ref": "%(refname:short)", "sha": "%(objectname)", "date": "%(committerdate:iso8601)"}\' refs/remotes | jq -s . > branches.json');
var process =
await ProcessExecutor.start(shell, logHandler: Application.logWithType);
var file = File('${data.path}/branches.json');
var content = file.readAsStringSync();
final List<dynamic> decoded = jsonDecode(content);
final branches = decoded.map((e) => BranchInfo.fromJson(e)).toList();
var features = <String>[];
var releases = <String>[];
var fixedBranch = ['main', 'master', 'develop'];
var existBranch = [];
var excludeBranch = ['origin'];
var startDate = DateTime.now().subtract(Duration(days: data.startDay!));
for (var branch in branches) {
var branchName = branch.ref!.replaceFirst('origin/', '');
if (!excludeBranch.contains(branchName)) {
if (fixedBranch.contains(branchName)) {
existBranch.add(branchName);
} else if (DateTime.parse(branch.date!)
.toUtc()
.difference(startDate)
.inSeconds >
0) {
if (branchName.startsWith('release')) {
releases.add(branchName);
} else {
features.add(branchName);
}
}
}
}
existBranch.sort();
existBranch.addAll(releases);
existBranch.addAll(features);
setProperty(data.setBranches!, existBranch, showPrint: true);
return await completeProcess(process, command);
}
}

View file

@ -0,0 +1,65 @@
import 'package:oto_cli/oto/commands/command.dart';
import 'package:oto_cli/oto/data/command_data.dart';
import 'package:xml/xml.dart' as xml;
class JenkinsParameterModify extends Command {
Function? get error => null;
@override
Future execute(DataCommand command) async {
var data = DataJenkinsParameterModify.fromJson(getParam(command));
var startId = '<hudson.model.ParametersDefinitionProperty>';
var start = data.content?.indexOf(startId);
var end =
data.content?.indexOf('</hudson.model.ParametersDefinitionProperty>');
var startParam = start! + startId.length;
var endParam = end!;
var paramContent = data.content?.substring(start + startId.length, end);
startId = '<name>${data.name}</name>';
start = paramContent
?.substring(0, paramContent.indexOf(startId))
.lastIndexOf('<');
var findContent = paramContent?.substring(start!);
end = findContent?.indexOf('>');
var element = findContent?.substring(1, end! + 1);
startId = '</$element';
end = findContent?.indexOf(startId);
var property = findContent?.substring(0, end! + startId.length);
final def = xml.XmlDocument.parse(property!).rootElement;
var paramName = def.getElement('name');
if (paramName?.innerText == data.name) {
switch (def.localName) {
case 'hudson.model.ChoiceParameterDefinition':
if (data.value is List) {
var choices = def.getElement('choices');
choices?.children.clear();
var a = xml.XmlElement(xml.XmlName('a'),
[xml.XmlAttribute(xml.XmlName('class'), 'string-array')]);
for (var item in data.value) {
a.children.add(xml.XmlElement(
xml.XmlName('string'), [], [xml.XmlText(item)]));
}
choices?.children.add(a);
}
break;
default:
var defaultValue = def.getElement('defaultValue');
defaultValue?.innerText = data.value;
}
property = def.toXmlString();
}
paramContent = paramContent?.replaceRange(
start!, start + end! + startId.length, property);
var content =
data.content?.replaceRange(startParam, endParam, paramContent!);
setProperty(data.setContent!, content, showPrint: data.showPrint);
return await complete(0, command);
}
}

View file

@ -8,28 +8,19 @@ class SetValueCommand extends Command {
Future execute(DataCommand command) async {
var data = DataSetValue.fromJson(getParam(command));
if(data.values_bool != null)
{
for(var pair in data.values_bool!.entries)
{
if (data.values_bool != null) {
for (var pair in data.values_bool!.entries) {
bool value = false;
if(pair.value is bool)
{
if (pair.value is bool) {
value = pair.value;
}
else if(pair.value is String)
{
} else if (pair.value is String) {
var resultTag = replaceSingleTag(pair.value);
if(resultTag is String)
{
if (resultTag is String) {
var toLow = resultTag.toLowerCase();
if(toLow == 'true' || toLow == 'false')
{
if (toLow == 'true' || toLow == 'false') {
value = toLow == 'true';
}
}
else if(resultTag is bool)
{
} else if (resultTag is bool) {
value = resultTag;
}
}
@ -37,28 +28,18 @@ class SetValueCommand extends Command {
}
}
if(data.values_float != null)
{
for(var pair in data.values_float!.entries)
{
if (data.values_float != null) {
for (var pair in data.values_float!.entries) {
double value = 0;
if(pair.value is double)
{
if (pair.value is double) {
value = pair.value;
}
else if(pair.value is String)
{
} else if (pair.value is String) {
var resultTag = replaceSingleTag(pair.value);
if(resultTag is String)
{
if (resultTag is String) {
value = double.parse(resultTag);
}
else if(resultTag is double)
{
} else if (resultTag is double) {
value = resultTag;
}
else if(resultTag is int)
{
} else if (resultTag is int) {
value = resultTag + 0.0;
}
}
@ -66,28 +47,18 @@ class SetValueCommand extends Command {
}
}
if(data.values_int != null)
{
for(var pair in data.values_int!.entries)
{
if (data.values_int != null) {
for (var pair in data.values_int!.entries) {
var value = 0;
if(pair.value is int)
{
if (pair.value is int) {
value = pair.value;
}
else if(pair.value is String)
{
} else if (pair.value is String) {
var resultTag = replaceSingleTag(pair.value);
if(resultTag is String)
{
if (resultTag is String) {
value = int.parse(resultTag);
}
else if(resultTag is int)
{
} else if (resultTag is int) {
value = resultTag;
}
else if(resultTag is double)
{
} else if (resultTag is double) {
value = resultTag.round();
}
}
@ -95,10 +66,14 @@ class SetValueCommand extends Command {
}
}
if(data.values_string != null)
{
for(var pair in data.values_string!.entries)
{
if (data.values_string != null) {
for (var pair in data.values_string!.entries) {
await setProperty(getTag(pair.key), pair.value);
}
}
if (data.values_object != null) {
for (var pair in data.values_object!.entries) {
await setProperty(getTag(pair.key), pair.value);
}
}
@ -106,8 +81,7 @@ class SetValueCommand extends Command {
return complete(0, command);
}
String getTag(String key)
{
String getTag(String key) {
return '<@property.$key>';
}
}

View file

@ -110,6 +110,8 @@ class DataSetValue extends DataParam {
late Map<String, dynamic>? values_string;
@JsonKey(name: 'values-bool')
late Map<String, dynamic>? values_bool;
@JsonKey(name: 'values-object')
late Map<String, dynamic>? values_object;
factory DataSetValue.fromJson(Map<String, dynamic> json) =>
_$DataSetValueFromJson(json);
@ -516,6 +518,7 @@ class DataFileWrite extends DataParam {
late String path;
late String content;
late bool? backup;
factory DataFileWrite.fromJson(Map<String, dynamic> json) =>
_$DataFileWriteFromJson(json);
@ -602,7 +605,6 @@ class DataSlackFile extends DataParam {
Map<String, dynamic> toJson() => _$DataSlackFileToJson(this);
}
//Slack Build
@JsonSerializable()
class DataSlackBuild extends DataSlackSender {
@ -722,6 +724,35 @@ class DataGitCommit extends DataParam {
Map<String, dynamic> toJson() => _$DataGitCommitToJson(this);
}
//GitBranch
@JsonSerializable()
class DataGitBranch extends DataParam {
DataGitBranch();
late String? path;
late int? startDay;
late String? setBranches;
factory DataGitBranch.fromJson(Map<String, dynamic> json) =>
_$DataGitBranchFromJson(json);
@override
Map<String, dynamic> toJson() => _$DataGitBranchToJson(this);
}
@JsonSerializable()
class BranchInfo {
BranchInfo();
late String? ref;
late String? sha;
late String? date;
factory BranchInfo.fromJson(Map<String, dynamic> json) =>
_$BranchInfoFromJson(json);
@override
Map<String, dynamic> toJson() => _$BranchInfoToJson(this);
}
//GitPush
@JsonSerializable()
class DataGitPush extends DataParam {
@ -1204,7 +1235,7 @@ class DataSMBAuthorize extends DataParam {
Map<String, dynamic> toJson() => _$DataSMBAuthorizeToJson(this);
}
//Smb Authorize
//Delay
@JsonSerializable()
class DataDelay extends DataParam {
DataDelay();
@ -1219,3 +1250,18 @@ class DataDelay extends DataParam {
@override
Map<String, dynamic> toJson() => _$DataDelayToJson(this);
}
@JsonSerializable()
class DataJenkinsParameterModify extends DataParam {
DataJenkinsParameterModify();
late String? content;
late String? name;
late dynamic value;
late String? setContent;
factory DataJenkinsParameterModify.fromJson(Map<String, dynamic> json) =>
_$DataJenkinsParameterModifyFromJson(json);
@override
Map<String, dynamic> toJson() => _$DataJenkinsParameterModifyToJson(this);
}

View file

@ -106,6 +106,7 @@ const _$CommandTypeEnumMap = {
CommandType.GitReset: 'GitReset',
CommandType.GitStashPush: 'GitStashPush',
CommandType.GitStashApply: 'GitStashApply',
CommandType.GitBranch: 'GitBranch',
CommandType.GitHub: 'GitHub',
CommandType.GitHubPullRequestCreate: 'GitHubPullRequestCreate',
CommandType.GitHubPullRequestList: 'GitHubPullRequestList',
@ -124,6 +125,7 @@ const _$CommandTypeEnumMap = {
CommandType.ProcessKill: 'ProcessKill',
CommandType.SMBAuth: 'SMBAuth',
CommandType.Delay: 'Delay',
CommandType.JenkinsParameterModify: 'JenkinsParameterModify',
};
DataParam _$DataParamFromJson(Map<String, dynamic> json) => DataParam()
@ -194,7 +196,8 @@ DataSetValue _$DataSetValueFromJson(Map<String, dynamic> json) => DataSetValue()
..values_int = json['values-int'] as Map<String, dynamic>?
..values_float = json['values-float'] as Map<String, dynamic>?
..values_string = json['values-string'] as Map<String, dynamic>?
..values_bool = json['values-bool'] as Map<String, dynamic>?;
..values_bool = json['values-bool'] as Map<String, dynamic>?
..values_object = json['values-object'] as Map<String, dynamic>?;
Map<String, dynamic> _$DataSetValueToJson(DataSetValue instance) =>
<String, dynamic>{
@ -207,6 +210,7 @@ Map<String, dynamic> _$DataSetValueToJson(DataSetValue instance) =>
'values-float': instance.values_float,
'values-string': instance.values_string,
'values-bool': instance.values_bool,
'values-object': instance.values_object,
};
DataAppDataCreator _$DataAppDataCreatorFromJson(Map<String, dynamic> json) =>
@ -910,7 +914,8 @@ DataFileWrite _$DataFileWriteFromJson(Map<String, dynamic> json) =>
..setExitCode = json['setExitCode'] as String?
..showPrint = json['showPrint'] as bool?
..path = json['path'] as String
..content = json['content'] as String;
..content = json['content'] as String
..backup = json['backup'] as bool?;
Map<String, dynamic> _$DataFileWriteToJson(DataFileWrite instance) =>
<String, dynamic>{
@ -921,6 +926,7 @@ Map<String, dynamic> _$DataFileWriteToJson(DataFileWrite instance) =>
'showPrint': instance.showPrint,
'path': instance.path,
'content': instance.content,
'backup': instance.backup,
};
DataFiles _$DataFilesFromJson(Map<String, dynamic> json) => DataFiles()
@ -1277,6 +1283,43 @@ Map<String, dynamic> _$DataGitCommitToJson(DataGitCommit instance) =>
'message': instance.message,
};
DataGitBranch _$DataGitBranchFromJson(Map<String, dynamic> json) =>
DataGitBranch()
..workspace = json['workspace'] as String?
..passExitCodes = (json['passExitCodes'] as List<dynamic>?)
?.map((e) => (e as num).toInt())
.toList()
..setResult = json['setResult'] as String?
..setExitCode = json['setExitCode'] as String?
..showPrint = json['showPrint'] as bool?
..path = json['path'] as String?
..startDay = (json['startDay'] as num?)?.toInt()
..setBranches = json['setBranches'] as String?;
Map<String, dynamic> _$DataGitBranchToJson(DataGitBranch instance) =>
<String, dynamic>{
'workspace': instance.workspace,
'passExitCodes': instance.passExitCodes,
'setResult': instance.setResult,
'setExitCode': instance.setExitCode,
'showPrint': instance.showPrint,
'path': instance.path,
'startDay': instance.startDay,
'setBranches': instance.setBranches,
};
BranchInfo _$BranchInfoFromJson(Map<String, dynamic> json) => BranchInfo()
..ref = json['ref'] as String?
..sha = json['sha'] as String?
..date = json['date'] as String?;
Map<String, dynamic> _$BranchInfoToJson(BranchInfo instance) =>
<String, dynamic>{
'ref': instance.ref,
'sha': instance.sha,
'date': instance.date,
};
DataGitPush _$DataGitPushFromJson(Map<String, dynamic> json) => DataGitPush()
..workspace = json['workspace'] as String?
..passExitCodes = (json['passExitCodes'] as List<dynamic>?)
@ -2087,3 +2130,32 @@ Map<String, dynamic> _$DataDelayToJson(DataDelay instance) => <String, dynamic>{
'minute': instance.minute,
'hour': instance.hour,
};
DataJenkinsParameterModify _$DataJenkinsParameterModifyFromJson(
Map<String, dynamic> json) =>
DataJenkinsParameterModify()
..workspace = json['workspace'] as String?
..passExitCodes = (json['passExitCodes'] as List<dynamic>?)
?.map((e) => (e as num).toInt())
.toList()
..setResult = json['setResult'] as String?
..setExitCode = json['setExitCode'] as String?
..showPrint = json['showPrint'] as bool?
..content = json['content'] as String?
..name = json['name'] as String?
..value = json['value']
..setContent = json['setContent'] as String?;
Map<String, dynamic> _$DataJenkinsParameterModifyToJson(
DataJenkinsParameterModify instance) =>
<String, dynamic>{
'workspace': instance.workspace,
'passExitCodes': instance.passExitCodes,
'setResult': instance.setResult,
'setExitCode': instance.setExitCode,
'showPrint': instance.showPrint,
'content': instance.content,
'name': instance.name,
'value': instance.value,
'setContent': instance.setContent,
};

View file

@ -20,10 +20,10 @@ dependencies:
color: ^3.0.0
file_hasher: ^0.1.0+0
cron: ^0.6.1
xml: ^6.3.0
xml: ^6.6.1
dev_dependencies:
lints: ^5.0.0
lints: ^6.0.0
test: ^1.24.9
build_runner: ^2.1.4
json_serializable: ^6.0.1