No agents meet this job's requirements.

Issue #38 resolved
Chad Schwieterman created an issue

After creating a new PowerShell task the following error displays: “No agents meet this job's requirements.”

However, in the agent’s /bin/bamboo-capabilities.properties capability file the following property has been configured:

system.builder.stellarity-powershell.Powershell=/root/.dotnet/tools/pwsh

This can be confirmed in the bamboo database and on the agent:

Any ideas why the plugin is not seeing the PowerShell capability?

Thanks

Comments (7)

  1. Chad Schwieterman reporter

    I can confirm it is set to Any. Currently the only value supplied is the file location for a ps1 script.

    There is a psPassword field in the java spec that is set. I masked this information below (not sure what this value represents).

            final Plan plan = new Plan(new Project()
                    .key(new BambooKey("CHAD"))
                    .name("Chad-Testing"),
                "test",
                new BambooKey("DT"))
                .pluginConfigurations(new ConcurrentBuilds())
                .stages(new Stage("Default Stage")
                        .jobs(new Job("Default Job",
                                new BambooKey("JOB1"))
                                .tasks(new AnyTask(new AtlassianModule("com.stellarity.bamboo.powershell-task:powerShellTask"))
                                        .configuration(new MapBuilder()
                                                .put("psLocation", "FILE")
                                                .put("psRunAsUser", "")
                                                .put("psBody", "")
                                                .put("psLoadProfile", "DEFAULT")
                                                .put("psBitness", "ANY")
                                                .put("psArguments", "")
                                                .put("psEnvironment", "")
                                                .put("psUsername", "")
                                                .put("psFile", "/audits/BBAudit.ps1")
                                                .put("psPassword", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                .put("psSubdirectory", "")
                                                .build()))))
                .planBranchManagement(new PlanBranchManagement()
                        .delete(new BranchCleanup())
                        .notificationForCommitters());
            return plan;
    

    I am currently on Bamboo 8.0.4 build 80012 with 1.2.7 of the app.

  2. Sergey Podobry

    Ok. I noticed that you manually set path to pwsh. Try to remove it from the agent capabilities and add /root/.dotnet/tools to the $PATH environment variable. Thus pwsh will be detected automatically on agent start and everything should work fine.

  3. Chad Schwieterman reporter

    I reinstalled the remote agent on the dev instance and enabled the auto capability detection (our standard across the enterprise is to disable), e.g., -DDISABLE_AGENT_AUTO_CAPABILITY_DETECTION=true

    Checking in the database, it appears the value is <yes> rather than a path for system.builder.stellarity-powershell.PowerShell. I’ll try setting the value to <yes> manually in the capabilities file and test and disable the capability detection. I report back, but I suspect it should work.

    Thanks!

  4. Log in to comment