简体   繁体   中英

Filter the file from maven metadata plugin to deployment

I used maven metadata plugin to list my nexus artifacts in jenkins. It shown as below.

Maven的元数据

Now, I want to select the version from jenkins shell to publish to deployment server. How can I do this? Can I access metadata plugin parameters using shell commands?

Below command helped me to solve this.

#!/bin/bash

#get the selected snapshot artifact
selectSnap(){

    wget "$Select_Snapshot_Version_ARTIFACT_URL"
}

#get the selected release artifact
selectRel(){

    wget "$Select_Release_Version_ARTIFACT_URL"
}



selectSnap
selectRel

When I run this it will automatically save selected version into my jenkins workspace.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM