mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 05:52:26 +00:00
implemented #469 "Allow more than one tags on the same build"
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3133 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
4bcd2ddd15
commit
3094479022
3 files changed
+66
-43
No files matched your search
@@ -1017,6 +1017,7 @@ public class CVSSCM extends AbstractCVSFamilySCM implements Serializable {
|
||||
|
||||
/**
|
||||
* If non-null, that means the build is already tagged.
|
||||
* If multiple tags are created, those are whitespace-separated.
|
||||
*/
|
||||
private volatile String tagName;
|
||||
|
||||
@@ -1047,8 +1048,9 @@ public class CVSSCM extends AbstractCVSFamilySCM implements Serializable {
|
||||
return "tagBuild";
|
||||
}
|
||||
|
||||
public String getTagName() {
|
||||
return tagName;
|
||||
public String[] getTagNames() {
|
||||
if(tagName==null) return new String[0];
|
||||
return tagName.split(" ");
|
||||
}
|
||||
|
||||
public TagWorkerThread getWorkerThread() {
|
||||
@@ -1065,8 +1067,6 @@ public class CVSSCM extends AbstractCVSFamilySCM implements Serializable {
|
||||
}
|
||||
|
||||
private synchronized String chooseAction() {
|
||||
if(tagName!=null)
|
||||
return "alreadyTagged.jelly";
|
||||
if(workerThread!=null)
|
||||
return "inProgress.jelly";
|
||||
return "tagForm.jelly";
|
||||
@@ -1207,7 +1207,10 @@ public class CVSSCM extends AbstractCVSFamilySCM implements Serializable {
|
||||
* Atomically set the tag name and then be done with {@link TagWorkerThread}.
|
||||
*/
|
||||
private synchronized void onTagCompleted(String tagName) {
|
||||
this.tagName = tagName;
|
||||
if(this.tagName!=null)
|
||||
this.tagName += ' '+tagName;
|
||||
else
|
||||
this.tagName = tagName;
|
||||
this.workerThread = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user