devonfw / IDEasy

Tool to automate the setup and updates of a development environment for any project (Successor of devonfw-ide).
Apache License 2.0
8 stars 22 forks source link

Release workflows broken #251

Closed hohwille closed 7 months ago

hohwille commented 7 months ago

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: https://github.com/devonfw/IDEasy/blob/8e44c02fffb25707b176042d53d4c564113fc0f0/cli/pom.xml#L155

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:

hohwille commented 7 months ago

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 commented 7 months ago

The other relevant part seems to be this one: https://github.com/devonfw/IDEasy/blob/8e44c02fffb25707b176042d53d4c564113fc0f0/cli/pom.xml#L274-L275 And here: https://github.com/devonfw/IDEasy/blob/8e44c02fffb25707b176042d53d4c564113fc0f0/cli/pom.xml#L17

If I get this correctly it worked as following:

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 commented 7 months ago

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