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

Automatic CD blocked by linux agents only running powershell.exe in build goals of pom.xml #38

Open
cotovanu-cristian opened this issue Oct 19, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@cotovanu-cristian
Copy link

Reproduction steps

  1. In the pom.xml run a powershell script
    e.g:
<execution>
    <id>Generate help files</id>
    <phase>generate-resources</phase>
    <goals>
        <goal>run</goal>
    </goals>
    <configuration>
        <target>
            <exec executable="powershell.exe">
                <arg value=".\GenerateHelpFiles.ps1 " />
            </exec>
        </target>
    </configuration>
</execution>

Our use case: https://github.com/jenkinsci/uipath-automation-package-plugin/blob/8b71aa4c7815988f3cc6ab9b6a6207c8d4363d49/pom.xml#L123-L129

  1. Run the cd.yaml workflow

Expected Results

Expected release to be executed

Actual Results

The release failed cause the agent did not have powershell.exe
Example: https://github.com/jenkinsci/uipath-automation-package-plugin/actions/runs/11416796536/job/31768407458
chrome_zcnUwLVl44

Anything else?

In the pom.xml we run a powershell script in the build goals, but the agent building plugin for the release in the github workflow is a linux agent thus it won't be capable of building the plugin.

Another thing is that this is not happening in the Jenkins pipelines as they are building with a windows agent (e.g: https://ci.jenkins.io/job/Plugins/job/uipath-automation-package-plugin/job/develop/10/)

We have this release blocker issue, could you please provide assistance or suggest a solution on how we can solve it?

@cotovanu-cristian cotovanu-cristian added the bug Something isn't working label Oct 19, 2024
@timja
Copy link
Member

timja commented Oct 19, 2024

I think your script is trying to localise help files as html, why not just use a jelly help file and use its built-in localisation?

@cotovanu-cristian
Copy link
Author

I managed to fix this by using pwsh instead of powershell.exe. ✅
💡 But adding the option to build on windows agents would be a nice addition.

e.g:

<execution>
    <id>Generate help files</id>
    <phase>generate-resources</phase>
    <goals>
        <goal>run</goal>
    </goals>
    <configuration>
        <target>
            <exec executable="pwsh">
                <arg value=".\GenerateHelpFiles.ps1 " />
            </exec>
        </target>
    </configuration>
</execution>

@cotovanu-cristian
Copy link
Author

I think your script is trying to localise help files as html, why not just use a jelly help file and use its built-in localisation?

Could you refer an example here so I can evaluate the changes for doing so?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants