Welcome to the Linux Foundation Forum!

Lab 4-1 Step 9. Add Post-build Action - disabled



  1. Add Post-build Action
    This is Jenkins build configuration for Maven.
    The "Archive the artifacts" was disabled so I cannot select it.
    Is there way to enable the selection? Or what would be work-around choice?
    I think if I select one from list, it becomes disable somehow.

  1. How can I log in the Vagrant VM?
    I mean what is UID and Password for Linux VM?



  • freshon
    freshon Posts: 4

    regarding my first question.
    I had removed the Vagrant VM and restarted it over again.
    Then I could able to select "Archive the artifacts" for build configuration.

    However my first build had failed.
    Would you know what could be wrong?

    Started by user student
    Running as SYSTEM
    Building remotely on docker-agent-00000w3175kq7 on docker (docker-agent) in workspace /home/jenkins/workspace/java-demo-app
    The recommended git tool is: NONE
    No credentials specified
    Cloning the remote Git repository
    Cloning repository http://gitserver:3000/student/maven-examples.git

    git init /home/jenkins/workspace/java-demo-app # timeout=10

    Fetching upstream changes from http://gitserver:3000/student/maven-examples.git

    git --version # timeout=10
    git --version # 'git version 2.20.1'
    git fetch --tags --force --progress -- http://gitserver:3000/student/maven-examples.git +refs/heads/:refs/remotes/origin/ # timeout=10

    ERROR: Error cloning remote repo 'origin'
    hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- http://gitserver:3000/student/maven-examples.git +refs/heads/:refs/remotes/origin/" returned status code 128:
    stderr: remote: Unauthorized
    fatal: Authentication failed for 'http://gitserver:3000/student/maven-examples.git/'


  • luisviveropena
    luisviveropena Posts: 1,163

    Hi Jay,

    No credentials specified

    This message indicates that you may have missed the credential creation for GIT, so the operation gave the error:

    stderr: remote: Unauthorized
    fatal: Authentication failed for 'http://gitserver:3000/student/maven-examples.git/'

    I did a test case and it worked for me. This is the log file data at the end of the Console Output:

    [INFO] Installing /home/jenkins/workspace/java-demo-app/java-demo-app/target/java-demo-app.jar to /root/.m2/repository/com/hgautam/examples/java-demo-app/1.0-SNAPSHOT/java-demo-app-1.0-SNAPSHOT.jar
    [INFO] Installing /home/jenkins/workspace/java-demo-app/java-demo-app/pom.xml to /root/.m2/repository/com/hgautam/examples/java-demo-app/1.0-SNAPSHOT/java-demo-app-1.0-SNAPSHOT.pom
    [INFO] ------------------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 02:34 min
    [INFO] Finished at: 2022-07-27T15:12:35Z
    [INFO] ------------------------------------------------------------------------
    Archiving artifacts
    Finished: SUCCESS

    So you need to check on Step 7. Configure SCM Repository in the PDF file.



Upcoming Training