buildframework/helium/tools/preparation/password.ant.xml
changeset 179 d8ac696cc51f
parent 1 be27ed110b50
child 217 0f5e3a7fb6af
equal deleted inserted replaced
1:be27ed110b50 179:d8ac696cc51f
    26     </description>
    26     </description>
    27 
    27 
    28     <!-- Retrieve the ATS password from the .netrc file and store it into ats.password property. -->
    28     <!-- Retrieve the ATS password from the .netrc file and store it into ats.password property. -->
    29     <target name="ats-password">
    29     <target name="ats-password">
    30         <hlm:netrcPasswordMacro output-prop="ats.password" result-prop="ats.password.available" type="ats"/>
    30         <hlm:netrcPasswordMacro output-prop="ats.password" result-prop="ats.password.available" type="ats"/>
       
    31         <hlm:logreplace regexp="ats.password"/>
    31     </target>
    32     </target>
    32     
    33     
    33     <!-- Retrieve the ATS username from the .netrc file and store it into ats.username property. -->
    34     <!-- Retrieve the ATS username from the .netrc file and store it into ats.username property. -->
    34     <target name="ats-username">
    35     <target name="ats-username">
    35         <hlm:netrcUsernameMacro output-prop="ats.username" result-prop="ats.username.available" type="ats"/>
    36         <hlm:netrcUsernameMacro output-prop="ats.username" result-prop="ats.username.available" type="ats"/>
    36     </target>
    37     </target>
    37 
    38 
    38     <!-- Retrieve the unix password from the .netrc file and store it into unix.password property. -->
    39     <!-- Retrieve the unix password from the .netrc file and store it into unix.password property. -->
    39     <target name="unix-password">
    40     <target name="unix-password">
    40         <hlm:netrcPasswordMacro output-prop="unix.password" result-prop="unix.password.available" type="synergy"/>
    41         <hlm:netrcPasswordMacro output-prop="unix.password" result-prop="unix.password.available" type="synergy"/>
       
    42         <hlm:logreplace regexp="${unix.password}"/>
    41     </target>
    43     </target>
    42     
    44     
    43     <!-- Retrieve the unix username from the .netrc file and store it into unix.username property. -->
    45     <!-- Retrieve the unix username from the .netrc file and store it into unix.username property. -->
    44     <target name="unix-username">
    46     <target name="unix-username">
    45         <hlm:netrcUsernameMacro output-prop="unix.username" result-prop="unix.username.available" type="synergy"/>
    47         <hlm:netrcUsernameMacro output-prop="unix.username" result-prop="unix.username.available" type="synergy"/>
    46     </target>
    48     </target>
    47     
    49     
    48     <!-- Ask for unix login using UI. -->
    50     <!-- Ask for unix login using UI. -->
    49     <target name="get-unix-password" depends="unix-username,unix-password">
    51     <target name="get-unix-password" depends="unix-username,unix-password">
    50         <hlm:filterRecordStartMacro/>
    52         <hlm:filterRecordStartMacro pattern="${unix.password}" category="unix"/>
    51         <if>
    53         <if>
    52             <not>
    54             <not>
    53                 <equals arg1="${unix.password.available}" arg2="0"/>
    55                 <equals arg1="${unix.password.available}" arg2="0"/>
    54             </not>
    56             </not>
    55             <then>
    57             <then>
    59                     <textProperty label="UNIX password:" property="unix.password" password="true"/>
    61                     <textProperty label="UNIX password:" property="unix.password" password="true"/>
    60                 </antform>
    62                 </antform>
    61                 <property name="unix.password.available" value="1"/>
    63                 <property name="unix.password.available" value="1"/>
    62             </then>
    64             </then>
    63         </if>
    65         </if>
    64         <hlm:filterRecordStopMacro pattern="${unix.password}"/>
    66         <hlm:filterRecordStopMacro/>
    65     </target>
    67     </target>
    66     
    68     
    67     <!-- Retrieve the GRACE password from the .netrc file and store it into release.grace.password property. -->
    69     <!-- Retrieve the GRACE password from the .netrc file and store it into release.grace.password property. -->
    68     <target name="grace-password" if="release.grace">
    70     <target name="grace-password" if="release.grace">
    69         <hlm:netrcPasswordMacro output-prop="release.grace.password" result-prop="grace.password.available" type="grace"/>
    71         <hlm:netrcPasswordMacro output-prop="release.grace.password" result-prop="grace.password.available" type="grace"/>
       
    72         <hlm:logreplace regexp="${release.grace.password}"/>
    70     </target>
    73     </target>
    71     
    74     
    72     <!-- Retrieve the NOE password from the .netrc file and store it into noe.password property. -->
    75     <!-- Retrieve the NOE password from the .netrc file and store it into noe.password property. -->
    73     <target name="noe-password">
    76     <target name="noe-password">
    74         <hlm:netrcPasswordMacro output-prop="noe.password" result-prop="noe.password.available" type="noe"/>
    77         <hlm:netrcPasswordMacro output-prop="noe.password" result-prop="noe.password.available" type="noe"/>
       
    78         <hlm:logreplace regexp="${noe.password}"/>
    75         <if>
    79         <if>
    76             <not>
    80             <not>
    77                 <isset property="noe.password"/>
    81                 <isset property="noe.password"/>
    78             </not>
    82             </not>
    79             <then>
    83             <then>
    86     </target>
    90     </target>
    87     
    91     
    88     <!-- Retrieve the notes password from the .netrc file and store it into notes.password property. -->    
    92     <!-- Retrieve the notes password from the .netrc file and store it into notes.password property. -->    
    89     <target name="notes-password">
    93     <target name="notes-password">
    90         <hlm:netrcPasswordMacro output-prop="release.notes.password" result-prop="notes.password.available" type="notes"/>
    94         <hlm:netrcPasswordMacro output-prop="release.notes.password" result-prop="notes.password.available" type="notes"/>
       
    95         <hlm:logreplace regexp="${release.notes.password}" />
    91     </target>
    96     </target>
    92 
    97 
    93     <!-- Retrieve the ccm password from the .netrc file and store it into ccm.password property. 
    98     <!-- Retrieve the ccm password from the .netrc file and store it into ccm.password property. 
    94     Requires ccm.enabled tobe set to 'true' to work.-->
    99     Requires ccm.enabled tobe set to 'true' to work.-->
    95     <target name="ccm-password">
   100     <target name="ccm-password" if="run.ccm">
    96         <if>
   101         <hlm:netrcPasswordMacro output-prop="ccm.password.rc" result-prop="ccm.password.available" type="synergy"/>
    97             <isset property="run.ccm"/>
       
    98             <then>
       
    99                 <hlm:netrcPasswordMacro output-prop="ccm.password.rc" result-prop="ccm.password.available" type="synergy"/>
       
   100             </then>
       
   101         </if>
       
   102     </target>
   102     </target>
   103     
   103     
   104     <!-- Retrieve the ccm username from the .netrc file and store it into ccm.username property.
   104     <!-- Retrieve the ccm username from the .netrc file and store it into ccm.username property.
   105     Requires ccm.enabled tobe set to 'true' to work. -->
   105     Requires ccm.enabled tobe set to 'true' to work. -->
   106     <target name="ccm-username">
   106     <target name="ccm-username" if="run.ccm">
   107         <if>
   107         <hlm:netrcUsernameMacro output-prop="ccm.login.rc" result-prop="ccm.username.available" type="synergy"/>
   108             <isset property="run.ccm"/>
       
   109             <then>
       
   110                 <hlm:netrcUsernameMacro output-prop="ccm.login.rc" result-prop="ccm.username.available" type="synergy"/>
       
   111             </then>
       
   112         </if>
       
   113     </target>
   108     </target>
   114     
   109     
   115     <!--
   110     <!--
   116         This target retreive user's login and password and tries to
   111         This target retreive user's login and password and tries to
   117         open a synergy session. if it fails it leaves ant
   112         open a synergy session. if it fails it leaves ant
   122     -->
   117     -->
   123     <target name="get-ccm-password" depends="ccm-password,ccm-username" unless="ccm.user.password">
   118     <target name="get-ccm-password" depends="ccm-password,ccm-username" unless="ccm.user.password">
   124         <if>
   119         <if>
   125             <isset property="run.ccm"/>
   120             <isset property="run.ccm"/>
   126             <then>
   121             <then>
   127                 <hlm:filterRecordStartMacro/>
   122                 <hlm:filterRecordStartMacro pattern="${ccm.password.rc}" category="ccm"/>
   128                 <if>
   123                 <if>
   129                     <not>
   124                     <not>
   130                         <and>
   125                         <and>
   131                             <isset property="ccm.login.rc"/>
   126                             <isset property="ccm.login.rc"/>
   132                             <isset property="ccm.password.rc"/>
   127                             <isset property="ccm.password.rc"/>
   156                     <else>
   151                     <else>
   157                         <property name="ccm.user.login" value="${ccm.login.rc}"/>
   152                         <property name="ccm.user.login" value="${ccm.login.rc}"/>
   158                         <property name="ccm.user.password" value="${ccm.password.rc}"/>
   153                         <property name="ccm.user.password" value="${ccm.password.rc}"/>
   159                     </else>
   154                     </else>
   160                 </if>
   155                 </if>
   161         
       
   162                 <antcall target="ccm-check"/>
   156                 <antcall target="ccm-check"/>
   163                 <hlm:filterRecordStopMacro pattern="${ccm.user.password}"/>
   157                 <hlm:filterRecordStopMacro/>
   164             </then>
   158             </then>
   165             <!--echo> ccm not enabled so not get password</echo-->
   159             <!--echo> ccm not enabled so not get password</echo-->
   166         </if>
   160         </if>
   167     </target>
   161     </target>
   168     
   162