.load [-o] [-e] [-v] [-j] [<relative_path>/]<filename>
.load -r|-p <registername>
.load -s `<command name>`
.load 명령은 XML 파일에서 프로젝트를 로드하고 .load 명령을 실행한 단계 다음에 로드된 프로젝트의 단계를 현재 프로젝트에 추가하며, 프로젝트가 실행 시에 단계를 동적으로 작성하고 로드할 수 있게 합니다. 옵션을 사용하면, .load 명령이 레지스터 또는 명령 출력에서 데이터를 가져오게 할 수 있습니다.
.load 명령의 XML 파일을 작성하려면 기존 프로젝트에서 내보내기 파일로 시작하여 적절한 기본 구조를 제공하십시오. 또한 시스템에 프로젝트를 작성한 후 .load 명령에서 이를 사용하도록 내보낼 수 있습니다. 이 주제에는 샘플 XML 코드가 포함되어 있습니다.
.load 명령으로 로드된 단계는 인라인 또는 체인 프로젝트에 대한 참조를 포함할 수 있습니다. 기본적으로 시스템은 XML 파일에서 인라인 프로젝트의 정의를 찾고 단계를 로드합니다. 시스템이 데이터베이스에서 인라인 프로젝트 정의를 가져오도록 하는 방법은 이 주제에서 아래의 -e 옵션을 참조하십시오. 패스 체인 또는 실패 체인 프로젝트의 경우, 시스템은 항상 데이터베이스에서 프로젝트 정의를 찾습니다.
시스템이 호출 프로젝트와 함께 인라인 프로젝트를 내보내기 때문에 XML 파일은 여러 프로젝트를 포함할 수 있습니다. .load 명령은 파일에서 기본 레이블이 붙은 프로젝트를 실행합니다. 이 프로젝트는 <project> 요소에 대한 primary="1" 속성을 갖습니다.
.load ../../project.xml
명령은 단계의 경로 특성이 "/"(기본값)라고 가정하고 서버 디렉토리(프로젝트 및 작업 디렉토리를 포함하는 디렉토리)에서 project.xml 파일을 로드합니다.
.load -r|-p <registername>
-r 옵션이
일반 레지스터에서 단계를 로드하는 반면, -p 옵션은 프로젝트 레지스터에서 단계를 로드합니다. 프로젝트의 이전 단계에서
레지스터에 데이터를 빌드한 후 이 명령을 사용하여 레지스터에서 단계를 로드할 수 있습니다. .load -s `<command name>`
다음 예제는 .load 명령과 함께 사용할 XML 파일을 표시합니다. XML은 HelloWorldPlusInline이라는 프로젝트를 내보내 작성되었습니다.
bfexport -l
<?xml version="1.0" encoding="UTF-8"?>
<buildforge schema="7.115014" comment="">
<project access="6" active="Y" name="HelloWorldPlusInline" primary="1"
selectorId="Choose_local" maxthread="0" increment="Y" tagsync="0"
buildclass="Production" sticky="N" envId="0" tag="BUILD_$B" id="19" exclusive="0">
<tagvar autoincrement="Y" name="B" id="1">2</tagvar>
<step absolute="N" failwait="N" selectorId="" dir="/" broadcast="N"
timeout="300" id="1" passwait="N" inline="N" threadable="N" chainId="2"
access="6" active="Y" passnotify="0" description="EchoHelloWorld" onfail=" "
failnotify="0" envId="0" commandStore="echo Hello World">
<command>echo Hello World</command>
</step>
<step absolute="N" failwait="N" selectorId="" dir="/" broadcast="N"
timeout="300" id="2" passwait="N" inline="N" threadable="N" access="6"
active="Y" passnotify="0" description="export proj to build and server folders"
onfail=" " failnotify="0" envId="0"
commandStore=".export $BF_PROJECTNAME_PHYS.xml copy /Y $BF_PROJECTNAME_PHYS.xml ..\..">
<command>.export $BF_PROJECTNAME_PHYS.xml
copy /Y $BF_PROJECTNAME_PHYS.xml ..\..</command>
</step>
</project>
<project access="6" active="Y" name="Sleepytime" primary="0"
selectorId="Choose_local" maxthread="0" increment="Y" tagsync="0"
buildclass="Production" sticky="N" envId="0" tag="SLEEP_$B" id="2" exclusive="0">
<tagvar autoincrement="Y" name="B" id="1">21</tagvar>
<step absolute="N" failwait="N" selectorId="" dir="/" broadcast="N"
timeout="300" id="1" passwait="N" inline="N" threadable="N" access="6"
active="Y" passnotify="0" description="Sleep, perchance to dream" onfail=" "
failnotify="0" envId="0" commandStore=".sleep 0">
<command>.sleep 0</command>
</step>
</project>
<class maxdays="0" access="1" entranceprojectId="1" name="Production" keepfiles="B"
deletechangedata="N" purgeprojectId="2" exitProjectId="5" candidates="AnyBuild "
maxbuilds="0"></class>
<selector operator="" required="" access="6" value="" name="Choose_local"
selectorId="" property=""></selector>
</buildforge>