Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't use in conditional publisher #12

Open
mbassett opened this issue Jun 7, 2017 · 3 comments
Open

can't use in conditional publisher #12

mbassett opened this issue Jun 7, 2017 · 3 comments

Comments

@mbassett
Copy link

mbassett commented Jun 7, 2017

publishers:
- conditional-publisher:
    - condition-kind: boolean-expression
      condition-expression: '$RELEASE_RPMS'
      action:
         - ssh:
             site: 'repomaster'
             target: 'somefolder'
             source: '*.rpm'

with this config the ssh publisher is added, but everything in targets / source / all blank.

@mbassett
Copy link
Author

mbassett commented Jun 7, 2017

screenshot_2017-06-06_17-23-25

@mbassett
Copy link
Author

mbassett commented Jun 7, 2017

    <org.jenkins__ci.plugins.flexible__publish.FlexiblePublisher>
      <publishers>
        <org.jenkins__ci.plugins.flexible__publish.ConditionalPublisher>
          <condition class="org.jenkins_ci.plugins.run_condition.core.BooleanCondition">
            <token>$RELEASE_RPMS</token>
          </condition>
          <runner class="org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail"/>
          <publisherList>
            <jenkins.plugins.publish__over__ssh.BapSshBuilderPlugin>
              <consolePrefix>SSH: </consolePrefix>
              <delegate>
                <publishers>
                  <jenkins.plugins.publish__over__ssh.BapSshPublisher>
                    <configName>repomaster</configName>
                    <verbose>true</verbose>
                    <transfers>
                      <jenkins.plugins.publish__over__ssh.BapSshTransfer>
                        <remoteDirectory>6/x86_64</remoteDirectory>
                        <sourceFiles>target/rpm/daily-challenge-admin/RPMS/noarch/*.rpm</sourceFiles>
                        <excludes/>
                        <removePrefix>target/rpm/daily-challenge-admin/RPMS/noarch</removePrefix>
                        <remoteDirectorySDF>false</remoteDirectorySDF>
                        <flatten>false</flatten>
                        <cleanRemote>false</cleanRemote>
                        <execCommand>/root/push_release</execCommand>
                      </jenkins.plugins.publish__over__ssh.BapSshTransfer>
                    </transfers>
                    <useWorkspaceInPromotion>false</useWorkspaceInPromotion>
                    <usePromotionTimestamp>false</usePromotionTimestamp>
                  </jenkins.plugins.publish__over__ssh.BapSshPublisher>
                </publishers>
                <continueOnError>false</continueOnError>
                <failOnError>false</failOnError>
                <alwaysPublishFromMaster>false</alwaysPublishFromMaster>
                <hostConfigurationAccess class="jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin" reference="../.."/>
              </delegate>
            </jenkins.plugins.publish__over__ssh.BapSshBuilderPlugin>
          </publisherList>
        </org.jenkins__ci.plugins.flexible__publish.ConditionalPublisher>
      </publishers>

@mbassett
Copy link
Author

mbassett commented Jun 7, 2017

appears this is a thing to do with maven project. in maven project it must be in postbuilders not publishers..

postbuilders:
    - raw:
        xml: |
          <org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder plugin="[email protected]">
          <condition class="org.jenkins_ci.plugins.run_condition.core.BooleanCondition" plugin="[email protected]">
          <token>$RELEASE_RPMS</token>
          </condition>
          <buildStep class="jenkins.plugins.publish_over_ssh.BapSshBuilderPlugin" plugin="[email protected]">
          <delegate>
          <consolePrefix>SSH: </consolePrefix>
          <delegate>
          <publishers>
          <jenkins.plugins.publish__over__ssh.BapSshPublisher>
          <configName>repomaster</configName>
          <verbose>false</verbose>
          <transfers>
          <jenkins.plugins.publish__over__ssh.BapSshTransfer>
          <remoteDirectory>6/x86_64</remoteDirectory>
          <sourceFiles>target/rpm/{project_rpm}/RPMS/noarch/*.rpm</sourceFiles>
          <excludes />
          <removePrefix>target/rpm/{project_rpm}/RPMS/noarch</removePrefix>
          <remoteDirectorySDF>false</remoteDirectorySDF>
          <flatten>false</flatten>
          <cleanRemote>false</cleanRemote>
          <noDefaultExcludes>false</noDefaultExcludes>
          <makeEmptyDirs>false</makeEmptyDirs>
          <patternSeparator>[, ]+</patternSeparator>
          <execCommand />
          <execTimeout>120000</execTimeout>
          <usePty>false</usePty>
          <useAgentForwarding>false</useAgentForwarding>
          </jenkins.plugins.publish__over__ssh.BapSshTransfer>
          </transfers>
          <useWorkspaceInPromotion>false</useWorkspaceInPromotion>
          <usePromotionTimestamp>false</usePromotionTimestamp>
          </jenkins.plugins.publish__over__ssh.BapSshPublisher>
          </publishers>
          <continueOnError>false</continueOnError>
          <failOnError>false</failOnError>
          <alwaysPublishFromMaster>false</alwaysPublishFromMaster>
          <hostConfigurationAccess class="jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin" reference="../.." />
          </delegate>
          </delegate>
          </buildStep>
          <runner class="org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail" plugin="[email protected]" />
          </org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant