I am trying to deploy a Gradle artifact using JFrog CLI command which works as expected. However, when running the build-collect-env command and publishing the build-info for it, it shows an additional blank module in the Jfrog build page which is not required. Below are the commands:
jfrog config add ******
jfrog rt gradle-config --server-id-deploy=*** --repo-deploy=***
jfrog rt gradle clean artifactoryPublish -b build.gradle --build-name=*** --build-number=***
jfrog rt build-collect-env <build-name> <build-num>
jfrog rt bp --build-url=*** <build-name> <build-num>
Note: This behavior is only when running inside a container through Jenkins pipeline whereas it works all fine if executed manually.
This issue was resolved in JFrog CLI version 2.12.0 as also described in this Github issue.
Related
I'm trying to execute Build action for a dot net core application using Jenkins Pipeline (Cloudbees Jenkins). During the build, when the dotnet restore command is executed, necessary dependency has to be pulled from JFrog antifactory. As of now I have created a local repo, Remote repo and also Virtual repo as suggested by JFrog. What steps have to be taken to make the connection and configuration possible (All the way from Jenkins to Jfrog).
Thanks in Advance.
You should be able to use the Jenkins Artifacttory Plugin. Refer this.
We are using JFrog as artifactory and Jenkins is our CI/CD tool. I have created a Jenkins which should run upon an artifact gets published to jfrog artifactory. But seems to be the plugin is not working as expected. When i googled, found the below URL and as per URL its applicable only for JFrog Pro-version. https://www.jfrog.com/jira/browse/HAP-1138
My question is, this option applicable only for JFrog pro-version or am i missing something here.
Thanks,
Srikanth.
The Artifactory Trigger feature in Jenkins, allowing to trigger Jenkins jobs following changes in pre-configired paths in Artifactory, requires at least an Artifactory Pro license.
We are using the "Generic-Artifactory Integration" (with legacy pattern) in our Jenkins jobs to upload artifacts.
Is it somehow possible to upload the artifacts even if the build fails?
I don't seem to find an option on the configuration page (Freestyle build).
It isn't a good practice to upload an artifact if your build fail. I recomend you to create a new pipeline or to edit your actual pipeline.
If your artifact is building sucessfully but your pipeline if failing you can upload it using Jfrog Cli with this command in your pipeline code:
For packed (jar, zip...) artifact:
jfrog rt upload "JENKINS_PATH_TO_YOUR_ARTIFACT/*" YOUR_ARTIFACTORY_REPO/
For unzip or unpacked artifact:
jfrog rt upload --flat=false "JENKINS_PATH_TO_YOUR_ARTIFACT/*" YOUR_ARTIFACTORY_REPO/
Check Jfrog Cli manual:
Jfrog Cli
Check my post with similar task using Bamboo: Upload artifact to Jfrog Artifactory using Jfrog CLI
I am trying to create a jenkins job that will build a github project inside a docker container that shall be generated from the Dockerfile contained in the github project itself. To do so, I am using docker slaves plugin but I am running into an issue when I run the jenkins job.
Error during container provisioning
The configuration I am using for the jenkins job is the following:
jenkins job config
So the job right now should only clone the repo and build the image. Any suggestions?
The solution to the problem was to set the remoting image to jenkinsci/slave in the global configuration of jenkins
Jenkins global config
I have added Artifactory plugin in Jenkins and was trying to move the build to Artifactory with the help of the Jenkins Artifactory plugin. I have created a sample Maven project.
The build creation is successful and I am getting a URL of Artifactory on console output of Jenkins which tells that my build has been sent to Artifactory. If I am clicking the URL it, I should get my war downloaded but this is not happening. I am getting 404.
I am using Jenkins 1.617 and JFrog Artifactory 3.8.0
If I am using jfrog artifactory 2.6.4 its working but with other release its not working.
below is the log
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /root/.jenkins/jobs/TestJob/workspace/pom.xml to org.ABC/testapp/0.0.1-SNAPSHOT/testapp-0.0.1-SNAPSHOT.pom
[JENKINS] Archiving /root/.jenkins/jobs/TestJob/workspace/target/testapp-0.0.1-SNAPSHOT.war to org.ABC/testapp/0.0.1-SNAPSHOT/testapp-0.0.1-SNAPSHOT.war
channel stopped
Deploying artifacts to http:192.168.X.X:8080
Deploying artifacts of module: org.ABC:testapp
Deploying artifact: http://192.168.X.X:8080/libs-snapshot-local/org/ABC/testapp/0.0.1-SNAPSHOT/testapp-0.0.1-SNAPSHOT.war
Deploying artifact: http://192.168.X.X:8080/libs-snapshot-local/org/ABC/testapp/0.0.1-SNAPSHOT/testapp-0.0.1-SNAPSHOT.pom
Deploying build info to: http192.168.X.X:8080/test/build
I looks like the log output is buggy. The url http192.168.X.X:8080/test/build should, of course, be http://192.168.X.X:8080/test/build.
Please report it in GitHub Jenkins plugin repo.
Thanks!