Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into devonfw#734-improve-p…
Browse files Browse the repository at this point in the history
…rocess-result

# Conflicts:
#	cli/src/main/java/com/devonfw/tools/ide/process/ProcessContextImpl.java
#	cli/src/main/java/com/devonfw/tools/ide/process/ProcessResultImpl.java
  • Loading branch information
alfeilex committed Dec 10, 2024
2 parents 292aa5b + 95e7d15 commit 41a42ce
Show file tree
Hide file tree
Showing 142 changed files with 4,057 additions and 2,356 deletions.
49 changes: 10 additions & 39 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,13 @@ on:
workflow_dispatch

jobs:
# Builds documentation pdf file in cli/target/package and uploads artifact to docs
build-documentation:
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '17'
- name: Make documentation available
run: |
cd documentation
mvn -B -ntp -Dstyle.color=always -DskipTests=true package
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: docs
path: documentation/target/generated-docs/*.pdf

# Downloads documentation docs artifact, builds all native images, archives native image for each os with documentation pdf file and uploads artifacts to f.e. natives-windows-latest
# Builds all native images and uploads each binary as a separate artifact
build-natives:
name: Build native images
needs: build-documentation
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest, macos-13 ]

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -45,26 +20,25 @@ jobs:
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Download documentation
uses: actions/download-artifact@v4
with:
name: docs
path: ./cli/target/package
- name: Build native image
shell: bash
run: |
maven_config="$(cat .mvn/maven.config)"
current_version="${maven_config/#*-Drevision=}"
current_version="${current_version/ */}"
current_version="${current_version/-SNAPSHOT/-$(date +%m_%d_%H)-SNAPSHOT}"
cd cli
mvn -B -ntp -Dideasy.assembly.id=${{ matrix.os }} -Pnative -DskipTests=true package
mvn -B -ntp -Pnative -DskipTests=true -Drevision=${current_version} package
- name: Upload native image
uses: actions/upload-artifact@v4
with:
name: natives-${{ matrix.os }}
path: cli/target/*.tar.gz
path: cli/target/ideasy*

# Downloads all native image artifacts to cli/target and builds the project for deployment to OSSRH Nexus
# Downloads all native image artifacts to cli/target and builds the project using assemblies for final deployment to OSSRH Nexus
deploy:
name: Build Project and Deploy
needs: [ build-documentation, build-natives ]
needs: [ build-natives ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -80,11 +54,8 @@ jobs:
with:
pattern: natives-*
path: ./cli/target/
merge-multiple: true
- run: |
mvn -B -ntp -Dstyle.color=always install
- name: Deploy to OSSRH nexus
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: mvn --settings .mvn/settings.xml -DskipTests=true -Darchetype.test.skip=true -Dmaven.install.skip=true -Dgpg.skip=true -Dstyle.color=always -B -ntp -Pdeploy deploy
run: mvn --settings .mvn/settings.xml -DskipTests=true -Darchetype.test.skip=true -Dgpg.skip=true -Dstyle.color=always -B -ntp -Passembly,deploy deploy
46 changes: 9 additions & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,13 @@ on:

jobs:

# Builds documentation pdf file in cli/target/package and uploads artifact to docs
build-documentation:
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '17'
- name: Make documentation available
run: |
cd documentation
mvn -B -ntp -Dstyle.color=always -DskipTests=true package
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: docs
path: documentation/target/generated-docs/*.pdf

# Downloads documentation docs artifact, builds all native images, archives native image for each os with documentation pdf file and uploads artifacts to f.e. natives-windows-latest
# Adjusts the revision to the latest version, builds images for each OS type/architecture using matrix:os and uploads each binary as a separate artifact
build-natives:
name: Build native images
needs: build-documentation
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest, macos-13 ]

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -48,11 +23,6 @@ jobs:
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Download documentation
uses: actions/download-artifact@v4
with:
name: docs
path: ./cli/target/package
- name: Build native image
shell: bash
run: |
Expand All @@ -61,17 +31,20 @@ jobs:
current_version="${current_version/ */}"
next_version="${current_version/-SNAPSHOT/}"
cd cli
mvn -B -ntp -Drevision=${next_version} -Dideasy.assembly.id=${{ matrix.os }} -Pnative -DskipTests=true package
mvn -B -ntp -Drevision=${next_version} -Pnative -DskipTests=true package
- name: Upload native image
uses: actions/upload-artifact@v4
with:
name: natives-${{ matrix.os }}
path: cli/target/*.tar.gz
path: cli/target/ideasy*

# Downloads all native image artifacts to cli/target and builds the project using assemblies for final deployment to Maven Central.
# The version number for the next build will be incremented automatically.
# A GitHub release and download URLs pointing to the respective OS/architecture archives on Maven Central will be created.
release:
name: Release on Sonatype OSS
runs-on: ubuntu-latest
needs: [ build-documentation, build-natives ]
needs: build-natives
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -91,8 +64,7 @@ jobs:
with:
pattern: natives-*
path: ./cli/target/
merge-multiple: true
- name: Publish to Apache Maven Central
- name: Create assemblies and publish to Apache Maven Central
run: |
maven_config="$(cat .mvn/maven.config)"
current_version="${maven_config/#*-Drevision=}"
Expand All @@ -106,7 +78,7 @@ jobs:
git tag -a "release/${next_version}" -m "tagged version ${next_version}"
export GPG_TTY=$TTY
mkdir -p ./cli/target/
mvn --settings .mvn/settings.xml -B -ntp deploy -Pdeploy -Dgpg.pin.entry.mode=loopback -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
mvn --settings .mvn/settings.xml -B -ntp deploy -Passembly,deploy -Dgpg.pin.entry.mode=loopback -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
Expand Down
25 changes: 24 additions & 1 deletion CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,30 @@ This file documents all notable changes to https://github.com/devonfw/IDEasy[IDE

== 2024.12.001

NOTE: ATTENTION: When installing this release as an update, you need to manually remove IDEasy entries from `.bashrc` and if present also `.zshrc`.
Also you should delete all files from your `$IDE_ROOT/_ide` folder before extracting the new version to it.
Then run the `setup` and all should work fine.

Release with new features and bugfixes:

* https://github.com/devonfw/IDEasy/issues/774[#774]: HTTP proxy support not working properly
* https://github.com/devonfw/IDEasy/issues/792[#792]: Honor new variable IDE_OPTIONS in ide command wrapper
* https://github.com/devonfw/IDEasy/issues/589[#589]: Fix NLS Bundles for Linux and MacOS
* https://github.com/devonfw/IDEasy/issues/778[#778]: Add icd command
* https://github.com/devonfw/IDEasy/issues/587[#587]: Checks for git installation before performing git operations
* https://github.com/devonfw/IDEasy/issues/779[#779]: Consider functions instead of alias
* https://github.com/devonfw/IDEasy/issues/810[#810]: setup not adding IDEasy to current shell
* https://github.com/devonfw/IDEasy/issues/782[#782]: Fix IDE_ROOT variable on Linux
* https://github.com/devonfw/IDEasy/issues/637[#637]: Added option to disable updates
* https://github.com/devonfw/IDEasy/issues/764[#764]: IDEasy not working properly in CMD
* https://github.com/devonfw/IDEasy/issues/799[#799]: binaries from zip download lack executable flags
* https://github.com/devonfw/IDEasy/issues/81[#81]: Implement Toolcommandlet for Kubernetes
* https://github.com/devonfw/IDEasy/issues/737[#737]: Adds cd command to ide shell
* https://github.com/devonfw/IDEasy/issues/879[#879]: cannot omit default settings URL in ide create
* https://github.com/devonfw/IDEasy/issues/758[#758]: Create status commandlet
* https://github.com/devonfw/IDEasy/issues/824[#824]: ide create «settings-url»#«branch» not working
* https://github.com/devonfw/IDEasy/issues/754[#754]: Again messages break processable command output
* https://github.com/devonfw/IDEasy/issues/737[#739]: Improved error handling to show 'You are not inside an IDE installation' only when relevant.

The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/16?closed=1[milestone 2024.12.001].

Expand All @@ -16,7 +38,8 @@ Release with new features and bugfixes:
* https://github.com/devonfw/IDEasy/issues/632[#632]: Add .editorconfig to settings workspaces
* https://github.com/devonfw/IDEasy/issues/415[#415]: Added a message that will inform the user for what process he will need to enter his sudo-password
* https://github.com/devonfw/IDEasy/issues/708[#708]: Open vscode in workspace path
* https://github.com/devonfw/IDEasy/issues/608[#608]: Enhanced error messages. Now logs missing command output and error messages
* https://github.com/devonfw/IDEasy/issues/608[#608]: Enhanced error messages.
Now logs missing command output and error messages
* https://github.com/devonfw/IDEasy/issues/715[#715]: Show "cygwin is not supported" message for cygwin users
* https://github.com/devonfw/IDEasy/issues/745[#745]: Maven install fails with NPE

Expand Down
121 changes: 44 additions & 77 deletions cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@
<version>1.5.3</version>
<!--optional>true</optional-->
</dependency>
<!-- Needed for WireMock test support -->
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<version>2.35.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>me.tongfei</groupId>
<artifactId>progressbar</artifactId>
Expand All @@ -90,6 +83,21 @@
<artifactId>jansi</artifactId>
<version>${jansi.version}</version>
</dependency>
<!-- Test dependencies -->
<!-- Mockito for mocking -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<!-- Needed for WireMock test support -->
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<version>2.35.1</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- required for advanced mocking -->
<groupId>net.bytebuddy</groupId>
Expand All @@ -102,11 +110,13 @@
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-core</artifactId>
<version>2.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-assertj3</artifactId>
<version>2.9.1</version>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down Expand Up @@ -174,6 +184,33 @@

<profiles>
<!-- Builds the native image and archives it with the documentation from the github artifact -->
<profile>
<id>assembly</id>
<build>
<plugins>
<!-- Assembly Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${assembly.maven.plugin.version}</version>
<executions>
<execution>
<id>create-distribution</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${revision}</finalName>
<appendAssemblyId>true</appendAssemblyId>
<descriptorSourceDirectory>src/main/assembly</descriptorSourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>native</id>
<build>
Expand Down Expand Up @@ -209,80 +246,10 @@
<imageName>${imageName}</imageName>
<buildArgs>
<arg>--enable-url-protocols=http,https</arg>
<arg>-H:IncludeResources="nls/.*"</arg>
<arg>--initialize-at-build-time=org.apache.commons</arg>
</buildArgs>
</configuration>
</plugin>
<!-- Assembly Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${assembly.maven.plugin.version}</version>
<executions>
<execution>
<id>create-distribution</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${revision}</finalName>
<appendAssemblyId>true</appendAssemblyId>
<descriptors>
<descriptor>/src/main/assembly/release-${ideasy.assembly.id}.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<!-- Attaches artifacts stored in cli/target/*.tgz to the maven build, moves them to documentation/target/nexus-staging/.../*.tgz and deploys them with the name defined in the classifier -->
<profile>
<id>deploy</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${revision}-windows-x64.tar.gz</file>
<type>tar.gz</type>
<classifier>windows-x64</classifier>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${revision}-linux-x64.tar.gz</file>
<type>tar.gz</type>
<classifier>linux-x64</classifier>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${revision}-mac-x64.tar.gz</file>
<type>tar.gz</type>
<classifier>mac-x64</classifier>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${revision}-mac-arm.tar.gz</file>
<type>tar.gz</type>
<classifier>mac-arm</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down
Loading

0 comments on commit 41a42ce

Please sign in to comment.