Skip to content

Add info about Embedded GlassFish maven plugin to website (and disable tests on docs changes)#25942

Open
OndroMih wants to merge 3 commits intoeclipse-ee4j:mainfrom
OndroMih:ondromih-2026-03-website-egf-maven-plugin
Open

Add info about Embedded GlassFish maven plugin to website (and disable tests on docs changes)#25942
OndroMih wants to merge 3 commits intoeclipse-ee4j:mainfrom
OndroMih:ondromih-2026-03-website-egf-maven-plugin

Conversation

@OndroMih
Copy link
Contributor

@OndroMih OndroMih commented Mar 3, 2026

Also modifies PR pipeline to skip running tests when the only changes are in the docs directory.

Copy link
Contributor

@avpinchuk avpinchuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove garbage from description.

Funny thing - pr-merge for the doc updates always fails. xD

@OndroMih
Copy link
Contributor Author

OndroMih commented Mar 3, 2026

Please remove garbage from description.

I hoped that the comments get removed automatically, not the case. I wish Github supported that.

@OndroMih
Copy link
Contributor Author

OndroMih commented Mar 3, 2026

Fanny thing - pr-merge for the doc updates always fails. xD

It's not even funny anymore :-D It's always some tests that fail. We should look into tuning the Jenkins job to skip running tests if the changes are only in the docs directory.

@OndroMih OndroMih marked this pull request as draft March 3, 2026 12:12
@OndroMih
Copy link
Contributor Author

OndroMih commented Mar 3, 2026

I'm trying changes in Jenkinsfile to skip running tests if only docs change. I moved to draft for now to revent merging this PR.

@OndroMih OndroMih force-pushed the ondromih-2026-03-website-egf-maven-plugin branch from c6aa0f0 to 6a50923 Compare March 3, 2026 18:08
@OndroMih
Copy link
Contributor Author

OndroMih commented Mar 3, 2026

I adjusted Jenkinsfile to skip tests if changes are only in the docs repository. With my previous commit (which contained an exception to skip tests also when Jenkinsfile is modified) it worked: https://ci.eclipse.org/glassfish/job/glassfish_build-and-test-using-jenkinsfile/job/PR-25942/4/

Now I removed an exception for Jenkinsfile and push forced the change. Now Jenkins will run the tests again because the Jenkinsfile is changed.

@dmatej @arjantijms @avpinchuk @pzygielo , please review if this is OK and you agree to disable running tests if only docs are changed.

@OndroMih OndroMih changed the title Add info about Embedded GlassFish maven plugin to website Add info about Embedded GlassFish maven plugin to website (and disable tests on docs changes) Mar 3, 2026
@OndroMih OndroMih marked this pull request as ready for review March 4, 2026 10:23
@dmatej dmatej added this to the 8.0.1 milestone Mar 5, 2026
Jenkinsfile Outdated

def changedFiles = sh(
script: '''
git diff --name-only origin/${CHANGE_TARGET}...HEAD || echo "all"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you grep those files when you could probably simplify that to (I used your branch to see what exactly it does):

git diff --name-only eclipse/main..ondro/ondromih-2026-03-website-egf-maven-plugin -- docs || echo "all"

And yet one problem, it seems git diff always returns 0 error code, so it never echoes "all". I tried with this:

git diff --name-only eclipse/main..eclipse/main  || echo "all"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would work:

dmatej@dmatej-tux:~/work/repo/git/glassfish$ git diff --exit-code --name-only eclipse/main..eclipse/main -- docs && echo "all"
all

dmatej@dmatej-tux:~/work/repo/git/glassfish$ git diff --exit-code --name-only eclipse/main..ondro/ondromih-2026-03-website-egf-maven-plugin -- docs && echo "all"
Jenkinsfile
docs/website/src/main/resources/_includes/documentation-toc.html
docs/website/src/main/resources/documentation.md

--exit-code Make the program exit with codes similar to diff(1). That is, it exits with 1 if there were differences and 0 means no differences.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I use -- docs, then the diff is only in the docs directory. If doesn't detect if changes are both in the docs directory and somewhere else - e.g. the PR contains both code and docs changes.

I want the opposite - create a diff of all files outside of docs directory, and if there are any changed files, run teh tests, otherwise don't run them.

That's why I first list all the changes and then exclude all docs changes with grep. Though I can do it in a single step.

@OndroMih OndroMih force-pushed the ondromih-2026-03-website-egf-maven-plugin branch 3 times, most recently from 6b8cb2e to 9500bdb Compare March 5, 2026 17:57
@OndroMih OndroMih requested a review from dmatej March 5, 2026 17:58
@OndroMih OndroMih force-pushed the ondromih-2026-03-website-egf-maven-plugin branch from 9500bdb to 555fc93 Compare March 5, 2026 20:15
@OndroMih OndroMih force-pushed the ondromih-2026-03-website-egf-maven-plugin branch from 555fc93 to 154a76d Compare March 5, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants