qcastel / github-actions-maven-release

Release your Java application and publish artifacts
129 stars 38 forks source link

maven-project-folder not recognized #18

Closed ASarco closed 3 years ago

ASarco commented 3 years ago

I was trying to test this action, but when it runs I get:

Warning: Unexpected input(s) 'maven-project-folder', valid inputs are ['entryPoint', 'args', 'release-branch-name', 'gpg-enabled', 'gpg-key-id', 'gpg-key', 'maven-local-repo-path', 'maven-repo-server-id', 'maven-repo-server-username', 'maven-repo-server-password', 'maven-args', 'git-release-bot-name', 'git-release-bot-email', 'access-token'] Run qcastel/github-actions-maven/actions/release@master with: maven-project-folder: customers/ release-branch-name: master git-release-bot-name: release-bot git-release-bot-email: release-bot@example.com gpg-enabled: false maven-local-repo-path: $M2_HOME/repository env: JAVA_HOME_15.0.2_x64: /opt/hostedtoolcache/jdk/15.0.2/x64 JAVA_HOME: /opt/hostedtoolcache/jdk/15.0.2/x64 JAVA_HOME_15_0_2_X64: /opt/hostedtoolcache/jdk/15.0.2/x64 /usr/bin/docker run --name a2644afa438eb9bc21f6f7bf56af_2e4700 --label 442333 --workdir /github/workspace --rm -e JAVA_HOME_15.0.2_x64 -e JAVA_HOME -e JAVA_HOME_15_0_2_X64 -e INPUT_MAVEN-PROJECT-FOLDER -e INPUT_RELEASE-BRANCH-NAME -e INPUT_GIT-RELEASE-BOT-NAME -e INPUT_GIT-RELEASE-BOT-EMAIL -e INPUT_ACCESS-TOKEN -e INPUT_GPG-ENABLED -e INPUT_GPG-KEY-ID -e INPUT_GPG-KEY -e INPUT_MAVEN-LOCAL-REPO-PATH -e INPUT_MAVEN-REPO-SERVER-ID -e INPUT_MAVEN-REPO-SERVER-USERNAME -e INPUT_MAVEN-REPO-SERVER*** INPUT_MAVEN-ARGS -e RELEASE_BRANCH_NAME -e GPG_ENABLED -e GPG_KEY_ID -e GPG_KEY -e MAVEN_LOCAL_REPO_PATH -e MAVEN_REPO_SERVER_ID -e MAVEN_REPO_SERVER_USERNAME -e MAVEN_REPO_SERVER_PASSWORD -e MAVEN_ARGS -e GIT_RELEASE_BOT_NAME -e GIT_RELEASE_BOT_EMAIL -e GITHUB_ACCESS_TOKEN -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/streams-monorepo/streams-monorepo":"/github/workspace" 442333:5465a2644afa438eb9bc21f6f7bf56af "release.sh" Last release-bot commit: Current commit: 48e1815024d827f30bedfd4ff16385aa9a0e20bf Current branch: master Already on 'master' Your branch is up to date with 'origin/master'. HEAD is now at 48e1815 Merge remote-tracking branch 'origin/master'

Then the job just fails with no explanation, the last message is: HEAD is now at 48e1815 Merge remote-tracking branch 'origin/master'

I don't know if it fails because of the warning (it's just a warning, so it shouldn't of for any other reason)

ASarco commented 3 years ago

The configuration I used is:

- name: Release
  uses: qcastel/github-actions-maven/actions/release@master
  with:
    maven-project-folder: "customers/"
    release-branch-name: "master"
    git-release-bot-name: "release-bot"
    git-release-bot-email: "release-bot@example.com"
    access-token: ${{ secrets.GITHUB_ACCESS_TOKEN }}  
qcastel commented 3 years ago

Hello @ASarco ,

Is it by any chance a public repo? Would you be able to share the link?

ASarco commented 3 years ago

No, unfortunately it is not public, it is my company's so I can't share it. But let me know if I can post some other info.

BTW, I replaced maven-project-folder with maven-local-repo-path (which I don't know if it's the same since the latter is not documented), and now I don't get the warning but the job still fails.

qcastel commented 3 years ago

What I am surprise is that I can see this log: https://github.com/qcastel/github-actions-maven-release/issues/18#issuecomment-773493501

but not https://github.com/qcastel/docker-maven-release/blob/master/release.sh#L19 or https://github.com/qcastel/docker-maven-release/blob/master/release.sh#L27

I am not sure where your github action job went, there is no real bash commands in between that could crash

You can reproduce this issue all the time? meaning if you commit an empty commit, does it always died there?

ASarco commented 3 years ago

Yes, it happens all the time. Now that you pointed me to the source code, yes, it's weird that we don't see anything else. I am just starting with github actions, so I still don't know much. Can it be in conflict with another action? Previously to this, I run checkout and setup-java

qcastel commented 3 years ago

a yeah, don't setup that github actions first:

What this action does is preparing the default docker container that all github containers shared. For that, it installs java and setup environmetn variables. As we choose to have the maven release inside its own docker container for consistancy and not relying on github changing the base image, this cause a bit of a problem when there are environments variables that corrupt the correct JAVA_HOME for example.

Al that said, you haven't reach the point where you even run maven. Maybe github is dropping some logs when the job crashes badly?

I would suggest to try without this setup-java github actions. Instead I installed a few different version of Java that you can enable following this: https://github.com/qcastel/github-actions-maven-release#jdk-version

qcastel commented 3 years ago

I guess you may have given up trying to use this github actions @ASarco :(

I will close this ticket but feel free to re-open it at any time