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

Release workflows broken #251

Closed
hohwille opened this issue Mar 18, 2024 · 3 comments
Closed

Release workflows broken #251

hohwille opened this issue Mar 18, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@hohwille
Copy link
Member

hohwille commented Mar 18, 2024

Expected behavior

As a developer of IDEasy, I want automated workflows that build releases so that I can download the latest SNAPSHOT or publish an official release.

Actual behavior

Both the nightly-build workflow and the release workflow are broken.
Error from the log:

[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy (injected-nexus-deploy) on project ide-cli:
Failed to install artifact com.devonfw.tools.IDEasy:ide-cli:tar.gz:linux:2024.03.001-alpha-SNAPSHOT: /home/runner/work/IDEasy/IDEasy/cli/target/ide-cli-linux-x64.tar.gz (No such file or directory) -> [Help 1]

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. See the nightly build workflow or run it manually

Related/Dependent Issues

#221

Comments/Hints:

This is where the release file for linux is defined and should be deployed:

<file>target/${project.artifactId}-linux-x64.tar.gz</file>

As this used to work before and it now fails the question is:
Are all release packages not build anymore and therefore the file does not exist?
Or are they build but somehow now located in a different directory or with different name so they are not found?

Affected version:

  • OS: Linux, maybe all
@hohwille hohwille added the bug Something isn't working label Mar 18, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Mar 18, 2024
@hohwille
Copy link
Member Author

Looking at the logs in more detail, I can find that the linux release is the first one trying to be installed what immediately fails:

[INFO] Installing /home/runner/work/IDEasy/IDEasy/cli/target/ide-cli-2024.03.001-alpha-SNAPSHOT.jar to /home/runner/work/IDEasy/IDEasy/documentation/target/nexus-staging/deferred/com/devonfw/tools/IDEasy/ide-cli/2024.03.001-alpha-SNAPSHOT/ide-cli-2024.03.001-alpha-SNAPSHOT.jar
[INFO] Installing /home/runner/work/IDEasy/IDEasy/cli/.flattened-pom.xml to /home/runner/work/IDEasy/IDEasy/documentation/target/nexus-staging/deferred/com/devonfw/tools/IDEasy/ide-cli/2024.03.001-alpha-SNAPSHOT/ide-cli-2024.03.001-alpha-SNAPSHOT.pom
[INFO] Installing /home/runner/work/IDEasy/IDEasy/cli/target/ide-cli-2024.03.001-alpha-SNAPSHOT-sources.jar to /home/runner/work/IDEasy/IDEasy/documentation/target/nexus-staging/deferred/com/devonfw/tools/IDEasy/ide-cli/2024.03.001-alpha-SNAPSHOT/ide-cli-2024.03.001-alpha-SNAPSHOT-sources.jar
[INFO] Installing /home/runner/work/IDEasy/IDEasy/cli/target/ide-cli-2024.03.001-alpha-SNAPSHOT-javadoc.jar to /home/runner/work/IDEasy/IDEasy/documentation/target/nexus-staging/deferred/com/devonfw/tools/IDEasy/ide-cli/2024.03.001-alpha-SNAPSHOT/ide-cli-2024.03.001-alpha-SNAPSHOT-javadoc.jar
[INFO] Installing /home/runner/work/IDEasy/IDEasy/cli/target/ide-cli-linux-x64.tar.gz to /home/runner/work/IDEasy/IDEasy/documentation/target/nexus-staging/deferred/com/devonfw/tools/IDEasy/ide-cli/2024.03.001-alpha-SNAPSHOT/ide-cli-2024.03.001-alpha-SNAPSHOT-linux.tar.gz

This is nothing in the log before saying that the linux release was ever build.

@hohwille
Copy link
Member Author

The other relevant part seems to be this one:

IDEasy/cli/pom.xml

Lines 274 to 275 in 8e44c02

<os.detected.classifier>linux</os.detected.classifier>
<os.detected.arch>x64</os.detected.arch>

And here:
<releaseName>${project.artifactId}-${os.detected.classifier}-${os.detected.arch}</releaseName>

If I get this correctly it worked as following:

  • on each OS we build the native-image (ideaasy or ideasy.exe) via the native-maven-plugin in the native profile
  • the same native profile also runs maven-assembly-plugin with the exec.xml
  • these results had been build into the target folder.
  • the aggregated build then does the deployment of the 3 OS specific together so that we either get a release for all 3 OS or none if some of them fails (if I understood it correctly - I am just reverse-engineering the workflow YAML, pom.xml, exec.xml.
  • to do so, the native image releases get moved as this is where we broke it:
    Before:
mv ./natives/* ./cli/target/

After the change:

mv ./natives/* ./cli/target/package/bin/

So if I got all correct, we assumed that the 3 matrix OS builds only build the native image and then on the aggregated build we run the assembly to package it. However, that assumtion was wrong so this change needs to be reverted.

hohwille added a commit that referenced this issue Mar 18, 2024
hohwille added a commit that referenced this issue Mar 18, 2024
@hohwille
Copy link
Member Author

Verified fixed as now the releases are published and contain both native-image and wrapper script in bin folder as expected.

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
Status: ✅ Done
Development

No branches or pull requests

1 participant