Closed prawen closed 3 years ago
@prawen, The issue you encounter looks like a Groovy issue - The Groovy expects a string, but it gets an unknown property. You can add quotes around ArtifactoryonAWS:
def server = Artifactory.server "ArtifactoryonAWS"
Another option is to define a job parameter ArtifactoryonAWS. Read more about it in the README.
One more thing - It looks like you're using declarative pipelines with the scripted pipelines syntax of the Jenkins Artifactory plugin. I'd recommend using declarative pipelines syntax. You can find many examples here.
Please let me know if that helped. If you have more questions please open an issue in the Jenkins Artifactory plugin GitHub repository: https://github.com/jfrog/jenkins-artifactory-plugin/issues/new/choose
Thank you. This has worked.
stage('Upload Artifacts'){
when {
branch 'master'
}
steps {
rtUpload (
serverId: 'ArtifactoryonAWS',
specPath: 'props-upload.json'
)
}
}
stage ('Publish build info') {
when {
branch 'master'
}
steps {
rtPublishBuildInfo (
serverId: 'ArtifactoryonAWS'
)
}
}
Hello,
I'm not sure if I'm consuming the plugin properly. I have installed https://plugins.jenkins.io/artifactory/ plugin and the version is 3.10.6 I'm able to upload artifacts from the free style job.
I'm facing issues when integrated with pipeline.
I have referred to example at https://github.com/jfrog/project-examples/blob/master/jenkins-examples/pipeline-examples/scripted-examples/declarative-example/Jenkinsfile
ERROR:
I have tried below setting
def server = Artifactory.server ArtifactoryonAWS
ERROR:
Below is my setting on Jenkins
Please let me know if you need additional details.