Azure DevOps Self-Hosted Agent maven Build Failure - maven

I configured a self-hosted agent which is a k8s pod. When I use it in a pipeline the maven build stage fails. But when I exec into the agent and run the same command that starts with /usr/bin/mvn -f /azp/_work/2/s/pom.xml inside the agent it works without an error.
What am I missing here?
Thanks

Related

docker file is not running on AWS

Dockerfile is successfully build in CICD pipeline but its not running
This is cicd pipeline screenshot

What yaml build command to put to run sonar cloud for github repo?

I have followed all the steps to setup to run my github repo for sonar cloud scan. I am not sure what to put under <your build command>.
When I leave it empty, I got an error when running the job at github action.
I have found the command already, dotnet build

How to build Quarkus container based on profile with Gradle?

8.1
I'm able to build my container image with Jib running: ./gradlew clean build -Dquarkus.container-image.build=true
And then I can run it with docker run
The container built is running using the production profile.
I have a separate dev/staging container environment, where I can actually deploy and obviously the configs for passwords and domains are different.
Is there a way to specify the profile during the container build, so for example when it runs it uses the dev profile configurations?
This did the trick:
./gradlew clean build -Dquarkus.container-image.build=true -Dquarkus.profile=dev

Teamcity SSH Upload Build step can not find artifacts of dependency build

I have two build jobs.
Job Build and Job Deployment.
Job Deployment depends on the artifacts of Job Build
When Job Build ran the artifacts are available. Now I want to use the SSH Upload Build Step for Job Deployment. It asks for the sources to be deployed.
I give the following path
When I execute the build chain the SSH Upload Build Step failed
Can anybody tell me how to point to the artifact path?
Please check your TC agent or remote host if this *.jar exists there first.
If yes - check the artifacts path and follow documentation:
https://confluence.jetbrains.com/display/TCD3/Build+Artifact
Sometimes when you have a pool with more than 2 TC agents - another TC agent can run Job Deployment step - verify that you build from the same chain and on the same agent (go to agent directory and check work folder).

Jenkins pipeline re-download maven artifacts again and again when running the pipeline

I need to know why in my jenkins pipeline when creating a docker container for building a java app with maven everytime that I run the pipeline it downloads all the java artifacts/requirements again and again from the pom.xml file,, help please!
Because the directory, where maven caches these artifacts (~/.m2) is inside the docker container and thus not preserved between runs.

Resources