Hi,

I've a question. I'm working on plugin which will match different multi 
configuration builds, using different git branches and push artifacts to 
remote repo. 
So I've multiple label/slaves to run on different platforms, like 
axis=PLATFORM, node-4 with label RHEL5_64 and RHEL5_64_DEC.

In matrix configuration i've only RHEL5_64_DEC enabled, and when i start 
the build I see that's it's picked correctly (it's also validated in 
makefile, and i put echo after build):

Building remotely on node-4 <http://build-master:8080/computer/build-node-4> 
(RHEL5_64 RHEL5_64_DEC) in workspace /home/jenkins/.../PLATFORM/*AS5_64_DEC*

... 

+ echo 'After build PLATFORM=AS5_64_DEC'
After build PLATFORM=AS5_64_DEC



When build finish and I try to push binaries to repo. I would expect that 
env varaible PLATFORM=RHEL5_64_DEC, but for some occasionally it's RHEL5_64:

publisher code:
public class MyArtifactsPublisher  extends Recorder
{

    @Override
    public boolean perform(AbstractBuild build, Launcher 
launcher,BuildListener listener) throws InterruptedException, IOException 
    {
        if(build instanceof MatrixRun)
        {
            MatrixRun mr= (MatrixRun)build;

            String branch = GetBranchNameFromGlobalCfg(mr);

            // append platform to the branch name
            EnvVars envs = build.getEnvironment(listener);
            if(envs.containsKey("PLATFORM"))
                branch = branch + "_" + envs.get("PLATFORM");

          final FilePath tempWorkspace = GetTempWorkspace(mr);

          listener.getLogger().println(MessageFormat.format("Trying to 
check out branch {0} into local temp directory {1}", branch, 
tempWorkspace.getName()));
           .....


and in the logs:

Trying to check out branch DevBranch_*RHEL5_64* into local temp directory 
gitpushtempdir



Can anyone tell me why the value have changed? in post build actions i just 
have "archieve the artifacts" and 'build other builds".
Is there other way to get correct axis value other than parsing JOB_NAME?

Regards,
Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/53e10eb0-cee0-40a7-97d3-5fb3d656aae2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to