Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. I have attempted to create a minimal repro case, but there I was able to use PLASTICSCM_CHANGESET_ID from the start.
  3. I was able to trigger this error several times in succession. Apparently the problem went away if I waited a few minutes and triggered the same build again. It has something to do with how that 'cm find changeset' operation uses a particular time interval to know which changes are of interest.
  4. Repro steps: 1. Create a new, empty repository. 2. Add the following file to the repository with the name Jenkinsfile, and check it in: pipeline { agent any stages { stage ('Fetch PLASTICSCM_CHANGESET_ID') { steps { echo "Change set ID: ${PLASTICSCM_CHANGESET_ID}" } } } } 3. Create a new Pipeline job in Jenkins. Set it to be of type "Pipeline script from SCM". Point it to your repository. 4. Tell Jenkins to build the job once. This is the resulting error message: Started by user admin Obtained Jenkinsfile from repository "ChangeSetIdTest@local" path "/" smartbranch "/main" Running in Durability level: MAX_SURVIVABILITY [Pipeline] node Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\ChangeSetIdTest [Pipeline] { [Pipeline] stage [Pipeline] { (Declarative: Checkout SCM) [Pipeline] checkout [ChangeSetIdTest] $ cm find changeset where date between '2019-02-17T17:07:01' and '2019-02-17T17:08:46' and branch='/main' on repositories 'ChangeSetIdTest@local' --xml --dateformat=yyyy'-'MM'-'dd'T'HH':'mm':'ss <?xml version="1.0" encoding="utf-8" ?> <PLASTICQUERY> <CHANGESET> <ID>6</ID> <CHANGESETID>0</CHANGESETID> <COMMENT>Root dir</COMMENT> <DATE>2019-02-17T17:08:07</DATE> <OWNER>[redacted]</OWNER> <REPOSITORY>ChangeSetIdTest</REPOSITORY> <REPNAME>ChangeSetIdTest</REPNAME> <REPSERVER>local</REPSERVER> <BRANCH>/main</BRANCH> <PARENT>-1</PARENT> <GUID>0497ef04-4c81-4090-8458-649885400c84</GUID> </CHANGESET> <CHANGESET> <ID>16</ID> <CHANGESETID>1</CHANGESETID> <COMMENT>Added jenkinsfile</COMMENT> <DATE>2019-02-17T17:08:40</DATE> <OWNER>[redacted]</OWNER> <REPOSITORY>ChangeSetIdTest</REPOSITORY> <REPNAME>ChangeSetIdTest</REPNAME> <REPSERVER>local</REPSERVER> <BRANCH>/main</BRANCH> <PARENT>0</PARENT> <GUID>f96514d9-4b05-49e5-98c8-5b2fd5751202</GUID> </CHANGESET> </PLASTICQUERY> [ChangeSetIdTest] $ cm gwp "C:\Program Files (x86)\Jenkins\workspace\ChangeSetIdTest" --format={1} C:\Program Files (x86)\Jenkins\workspace\ChangeSetIdTest is not in a workspace. [ChangeSetIdTest] $ cm diff cs:0@ChangeSetIdTest@local --format={path}#@_sep_@#{revid}#@_sep_@#{parentrevid}#@_sep_@#{status} --repositorypaths Can't diff cset cs:0@ChangeSetIdTest@local because it doesn't have a parent. [ChangeSetIdTest] $ cm diff cs:0@ChangeSetIdTest@local --format={path}#@_sep_@#{revid}#@_sep_@#{parentrevid}#@_sep_@#{status} --repositorypaths Can't diff cset cs:0@ChangeSetIdTest@local because it doesn't have a parent. [ChangeSetIdTest] $ cm diff cs:0@ChangeSetIdTest@local --format={path}#@_sep_@#{revid}#@_sep_@#{parentrevid}#@_sep_@#{status} --repositorypaths Can't diff cset cs:0@ChangeSetIdTest@local because it doesn't have a parent. FATAL: The cm command 'cm diff cs:0@ChangeSetIdTest@local --format={path}#@_sep_@#{revid}#@_sep_@#{parentrevid}#@_sep_@#{status} --repositorypaths' failed after 3 retries [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: The cm command 'cm diff cs:0@ChangeSetIdTest@local --format={path}#@_sep_@#{revid}#@_sep_@#{parentrevid}#@_sep_@#{status} --repositorypaths' failed after 3 retries Finished: FAILURE I'm not sure why, but I think that the Jenkins plugin is attempting to find ancestors starting from cset 0, and this operation fails.
  5. I introduced a workaround into my build script, which is a first step that looks like this... First some helper logic: /////////////////////////////////////////////////////////////////////////////////////////////// def scmChangeSetId = null /////////////////////////////////////////////////////////////////////////////////////////////// // Return a string on the format "1234" with latest changeset ID def getSCMChangeSetId() { def cmResult = bat script: "cm status --nochanges ${SOURCE_DIR}", returnStdout: true // Result will be a multiline string like this: // // <blank line> // C:\Jenkins\workspace\PongSP-Windows>cm status --nochanges C:\Jenkins\workspace\PongSP-Windows/PongSP // cs:67@rep:PongSP@repserver:FallDamage@Cloud // Extract the number '67' from the above multiline string def cmResultLines = cmResult.split('\n') assert 3 == cmResultLines.size() echo "cmResult[2]: " + cmResultLines[2] def changeSetId = cmResultLines[2].tokenize(':@')[1] return changeSetId } ... and then a build step, before the others: stage('RetrieveSCMInfo') { steps { timeout(time: "${DEFAULT_STAGE_TIMEOUT_MINUTES}" as int, unit: 'MINUTES') { script { scmChangeSetId = getSCMChangeSetId() } echo "Changeset ID: ${scmChangeSetId}" } } } ... and then I change any remaining build steps to refer to scmChangeSetId instead of PLASTICSCM_CHANGESET_ID. I trigger a build, and 5 minutes later the build progress display looks like this - which means it's good and it's doing what it is supposed to:
  6. Hi, I have recently created two new Jenkins build jobs based off of an existing build job. The existing build job has been working fine for some time, but the two new build jobs fail. What I find is that with the new build jobs, I get the following error: groovy.lang.MissingPropertyException: No such property: PLASTICSCM_CHANGESET_ID for class: groovy.lang.Binding This is strange, and it is causing trouble when we are about to make a major release. I have a workaround, which I will use for the time being -- directly calling `cm status` and using that result instead of he PLASTICSCM_CHANGESET_ID variable. Still, it would be nice if you could find a solution for this long term. The entire project exists in a Plastic repo. The Jenkins build job is a Declarative Pipeline job. The Jenkinsfile is configured to be fetched as "Pipeline script from SCM", with a selector like this: repository "Freedom@FallDamage@Cloud" path "/" smartbranch "/main" (Use update is enabled, Lightweight checkout is enabled) I am not performing any extra checkouts, just relying on what Jenkins automatically does. Now, the step that fails looks like this: // Build 64-bit Windows Standalone player, with Steam activated // Source project location: ${SOURCE_DIR} // Target build location: ${SOURCE_DIR}/SteamBuild/input // Target executable name: ${PROJECT_NAME}.exe stage('Build') { steps { timeout(time: "${BUILD_STAGE_TIMEOUT_MINUTES}" as int, unit: 'MINUTES') { script { failedStage = STAGE_NAME try { bat "if exist ${WORKSPACE}\\UnityEditor.log del ${WORKSPACE}\\UnityEditor.log" bat "START /WAIT \"Unity\" \"${UNITY_INSTALLATION_DIR}/Editor/Unity.exe\"" + " -quit" + " -batchmode" + " -executeMethod CustomBuild.GenerateBuild_CommandLine" + " -BuildInfo.SourceControl.RepositoryServer \"<org>@Cloud\"" + " -BuildInfo.SourceControl.Repository \"${SCM_REPOSITORY_NAME}\"" + " -BuildInfo.SourceControl.ChangeSetId \"${PLASTICSCM_CHANGESET_ID}\"" + " -BuildInfo.BuildJob.Name \"${JOB_NAME}\"" + " -BuildInfo.BuildJob.Id \"#${BUILD_ID}\"" + " -BuildInfo.Configuration \"${CONFIGURATION}\"" + " -BuildInfo.BuildTimeStamp \"${BUILD_TIMESTAMP}\"" + " -CustomBuild.OnlineVersion \"${JOB_NAME}.${PLASTICSCM_CHANGESET_ID}\"" + " -CustomBuild.Configuration \"${CONFIGURATION}\"" + " -CustomBuild.TargetExecutable \"${SOURCE_DIR}/SteamBuild/input/${PROJECT_NAME}.exe\"" + " -projectPath \"${SOURCE_DIR}\"" + " -logFile \"${WORKSPACE}/UnityEditor.log\"" + " && IF ERRORLEVEL 1 EXIT /B 1" } finally { bat "type \"${WORKSPACE}\\UnityEditor.log\"" } } } } } It is the ${PLASTICSCM_CHANGESET_ID} variable reference which Jenkins claims is unassigned. Now, again -- I am using the same exact script, but with 4 environment variables changed, for another build job that is working well. This is what the Stage view looks like. I triggered the build job twice. The first time, the checkout took a long time since it had to pull down the entire repository. The second time, there were no changes to the repo, so checkout was quick. My wild guess: The PlasticSCM plugin does not publish changes or set some environment variables to Jenkins for a particular build job, until that job has run successfully at least once. Let me know if you want a support ticket with more detailed logs, build scripts & screenshots.
  7. Yesterday
  8. bpivaty

    GUI 2D branch explorer

    Too bad for Linux that is missing since long time.
  9. Last week
  10. Ramz-UK

    2D Revision Tree and 'filter only parents'

    Thanks @manu, much appreciated!
  11. calbzam

    Automating workflow with jira and mergebots

    Hi, would you mind reaching us at support@codicesoftware.com? We can arrange a gotomeeting session and help you with the setup. Regards, Carlos.
  12. khan-amil

    Automating workflow with jira and mergebots

    Yeah I followed this blog post. And if jira isn't linked to it then it's working as intended. But if jira is linked then the bot either stops doing anything(if no jira task is linked to the branch), or fails, so I guess I made some kind of mistake while setting it up. Does the jira plug need to have the full path to the project, or only the root path? Can I find some logs related to these bots somewhere to dig into that?
  13. calbzam

    Automating workflow with jira and mergebots

    Hi, Regarding the mergebot configuration, I guess you have followed the steps from: http://blog.plasticscm.com/2018/09/add-mergebot-to-your-repo.html Also, I guess you have filled all the "Issue Tracker Integration" values in the form and also created the plug. The mergebot is monitoring the branch attributes. For instance, once the branch has the attribute status=resolved, it will also check the status value in the JIRA task to check if it's ready to be merged. Regards, Carlos.
  14. calbzam

    Local Network replication (or proxy?) server with cloud

    You could host a local Plastic server (replicating to the cloud) to speed up your builds and your developers can still connect to the cloud if they prefer. Regards, Carlos.
  15. calbzam

    GUI 2D branch explorer

    Hi, I'm afraid the "2D revision history" view is not available. Just the regular "View history" panel. Regards, Carlos
  16. Hi, I'm currently setting up plastic and wanted to automate parts of the workflow between jira and plastic. I've looked into mergebot(trunkbot), and it looked like a perfect fit : when a jira task is put as validated/done, mergebot sees this and tries to merge the branch to /main. Except, trunkbot seems to only checks branches attributes, and not the jira state, even though the setup part of the bot seems to indicate that it should poll for jira status? Am I missing something with the setup, or wrongly setup something? Or does it need some extra steps to link all together?
  17. Ryder_Redhook

    Local Network replication (or proxy?) server with cloud

    That is unfortunate, we need data caching more than we need replication. Similar to how we use the Unity Cache Server to speed up build times. Our office network is not the greatest for hosting for our remote users but I'll set it up and see how it goes for us. Thanks for the clarity.
  18. Hello all, I am back on trying Plastic SCM on Linux after some time. The GUI works without any issue but there is no 2D branch explorer per file. Is that normal or am I having an installation issue?
  19. calbzam

    Add/set comment on branch using cm

    Yes, I recommend you to upgrade to get the latest features
  20. kennethharder

    Add/set comment on branch using cm

    Hi, I do not have a editcomment command for cm changeset. It might be due to the version I am using 5.4.16.918. I ended up using attributes, but good to know that there is a solution for the comment.
  21. calbzam

    Add/set comment on branch using cm

    Hi, you can change the changeset comments via: cm changeset editcomment More info at cm changeset --help But I'm afraid you cannot change the branch comment via command line. Regards, Carlos.
  22. calbzam

    Local Network replication (or proxy?) server with cloud

    Hi, I think we already answer your support ticket. Just to summarize: - Plastic Cloud doesn't support a proxy server. Note that the proxy server is just a data cache server, not a full hosted server allowinh replicas... - You can always host your Plastic server and your developers connect to it instead of the cloud. This way, you can also use the locking workflow. - You can still use the cloud to replicate your repos from your hosted server (or to support the workflow for distributed people) but note that the lock workflow will only work if all the developers are pointing to the same central server (hosted or cloud). Regards, Carlos.
  23. Ryder_Redhook

    Local Network replication (or proxy?) server with cloud

    Bit more exploring and found out that if I install the Team Edition client that it gives the option to connect to a Proxy server but the Proxy server logs an error when connected to Plastic Cloud. Which I assume means that Proxy support is not enabled with Plastic Cloud despite the option for it in the Team Edition client. ERROR ExceptionTracerSink - Dumping in-transit exception:There has been an unexpected error "ReadDataForObjects is not available on the azure server". For more information check the server log.
  24. Ryder_Redhook

    Local Network replication (or proxy?) server with cloud

    I was hoping there would have been an answer to this. We basically have the same situation where we have a cloud account we would like to replicate locally or cache common requests. Due to some crossed-wires I got the Plastic SCM proxy server running before realizing it only works with the Enterprise client. Most of my team works in the same office but a few people work remotely. Ideally file locking would also work but I understand that breaks with distributed networks. Do we need to run a local server with the Team License and have our remote team members connect to that? Enterprise seems like overkill for what we are trying to do.
  25. calbzam

    Apply windows folder/file locks to a read-only xlink

    Hi, Plastic can prevent to checkin the changes to a read-only Xlink but it can't prevent an external tool to locally modify these changes out of the Plastic control (eg. via Windows Explorer or text editor). I think you asking for something at the OS level? By the way, Plastic support creating triggers for specific repos. https://www.plasticscm.com/documentation/triggers/plastic-scm-version-control-triggers-guide eg: cm mktrigger before-mklabel "label-bl-fix" "c:\tmp\triggers\label-bl-fix.bat" --filter="rep:default,bl*,fix*" Regards, Carlos.
  26. We have recently set up a project where a directory within that project is an xlink to another project. The files within this xlink are meant to never be edited, so we have the xlink on read-only. Whilst this is fine to prevent any changes to the files on source control, we need to enforce that our users cannot modify the files locally at all. Ideally this would be with a windows file lock applied recursively to the directory. Is there a convention for doing this within plastic? The closest idea I have is to use client-side triggers to file lock the directory, but I cant see a way of applying the trigger to a single repository? It feels like I am probably missing an element of Plastic SCM to solve this problem? Any help much appreciated! Thanks
  27. kennethharder

    Add/set comment on branch using cm

    I am trying to set the comment of a branch through cm. Is this possible?
  28. calbzam

    "replicate" one server to "another"

    You can try to enable gitserver and check if this way you can workaround the problem. For the replica error you reported, it seems to be a database problem (the guid ... for the object was not found). Why don't you just upgrade your original Palstic server to the last 8.0 version and try to migrate to git from this new version (it includes improvements in gitsync and gitserver). We can follow the different approaches to migrate to git, but I would do it from the last Plastic version. Also, what is your company name and registered account at www.plasticsc.com? Regards, Carlos.
  1. Load more activity
×