I am setting up a very basic stream architecture, whereby I have a mainline stream and then a development stream beneath that. I want to reuse my workspace so I can move between the two, but for some reason my child stream doesn't have any files in it.
I thought that the child stream automatically inherited the paths, and all I have in my paths is the most basic 'share ...'
Wth stupid mistake am I making??
If all the files are share ..., you need to populate them from the parent before they appear in the child:
p4 populate -r -S //stream/your_dev_stream
Note that the p4 switch command (which I think is normally only available on "local" servers but you can flip a server configurable to allow it on shared servers) does this automatically. Use p4 switch -c your_dev_stream to automatically create your_dev_stream as a child stream of your current stream within the same stream depot, populate it from the parent stream, and switch your workspace to it (shelving any pending work first).
Related
Is it possible to somehow serialize current Thingsboard (let's call it TBoard) configuration, save it and than latter load saved configuration on TBoard startup.
I am specifically interested in loading device profiles, rule chains, and dashboards.
I want to save configuration together with my project in git repository so than latter I could just use docker-compose to start multiple services from project (let's call them sensors) and single TBoard instance with saved configuration which will be used for collecting telemetry from sensors and drawing dashboards.
Another reason for saving configuration is what happens if for some reason TBoard container crashes or somehow get corrupted so it can't be started again, would I have to click on the things again in order to create all device profiles, dashboards, configure rule chains ... etc etc ... ?
Regarding this line
I am specifically interested in loading device profiles, rule chains, and dashboards. I want to save configuration together with my project in git repository
I have just recently implemented version control for my Thingsboard deployment. The way i am doing it is with the python REST client.
I have written functions to export all dashboards/data converters/integrations/rule chains/widgets into json files which I save into a github repository.
I have also written the reverse script to push the stored files to a fresh environment, essentially "flashing" it. Surprisingly, this works perfectly.
I have an idea to publish this as a package, but it's something I've never done before so I'm unsure if I will get to it.
Just letting you know that it is definitely possible to get source control operational via the API.
I have clearcase VOB. We create private file during jenkins run on the VOB(dynamic view).
But recently, we need many people to access the VOB but we dont want them to have checkout n checkin, but allow their view to create private file.
Can some one guide how this is possible?
Currently developers having complete access to VOB have full permission by adding them to primary group.
First, a private file does not involve checkout/checkin, so if you are talking about actual private files, you won"t have any co/ci operation to worry about.
This is different when you want to make local modification (ie modifications you don't intent to checkin ever) to tracked elements. Then you need to checkout, or to eclipse files (dynamic views) or to hijack them (snapshot view).
Second, as long as use the same dynamic view in a Jenkins job, the private files should be preserved (in the dynamic view vws storage) accross build, as long as you don't activate any "cleanup before build" option.
But if it is still not maintained, then you need to explore if it is possible to generate those private files in another shared dedicated filesystem, which would then be outside of any ClearCase view.
Since you can not delete a workspace or reference tree in AccuRev (only deactivate it), we want to create local copy of a streams contents, without using those.
I could ofcourse use something like accurev hist in combination with accurev cat, but that sounds like an awful workaround for such a basic functionality.
So, I wonder, is there an easy command to do this?
I only want to use this in my Jenkins CI environment to check the sources (compile, run tests, etcetera). I never have to push any changes back to AccuRev, so the AccuRev gurus would probably recommend using a reference tree.
However, I want to create these dynamically and they will only be used once.
It does not seem like a good idea to clutter the AccuRev server with thousands of unused reference trees.
You can use the accurev pop command to do exactly what you want. Within Jenkins, this is the equivalent of using the option of "Neither" a workspace or reference tree if you are using the AccuRev plug-in for Jenkins.
If you prefer to script this yourself, you can use accurev pop -R -v <stream-name> -L <some-directory-location> /./ where you substitute in your stream name and the directory location to which you want to write. The /./ in the command tells AccuRev to populate the depot root directory and -R is to recurse the entire contents below that. You can specify another directory below that level using its depot relative path.
I am using Jenkins in combination with the Git and Gerrit plugins. I would like to trigger a job on Ref Updated. However, I need to understand if the action behind this event is the creation of a new branch. If it is, then I will execute my shell script, otherwise not.
As far as I understood, this info is available in the Gerrit's event json response, but I do not know how to consume this json object via Jenkins in the first place.
Is there a way to achieve this easily via Jenkins (maybe something in the interface I missed)? Or is there another way to monitor the creation of a new branch while still in the Jenkins/Gerrit plugin environment?
So I just recalled there are a bunch of Gerrit environmental variables which are available to use in the building script,
namely these ones. I will just have to check if GERRIT_OLDREV is equal to 0000000000000000000000000000000000000000 and if so, it would mean the branch is newly created (for reference: here). Here is the picture I attached in full size.
For example, I have written a document and submited to p4.Then I would like to share it on the company intranet or notify the others by email.
I create a post and refer to the p4 document as a hyperlink in the post.
When the user click on it, his local P4 will be launched to sync the document according to his p4 config(would be failed if he is not allow to access the relevant repo), then the document will be opend on his PC.
By imaging this feature, I am just trying to find a solution to share p4 document easily.
Since I dont want to upload the documents to the intranet then sync it between p4 manually.
Any suggestion is welcome.
thanks.
You can try using a custom url protocol and handler. This would allow you to write urls like p4v://Some/place/some/where/. The setup will depend on your platform.
Windows
Gnome
You could then set the handler to the p4v executable with the -s option. This will open a location, but it won't provide any kind of syncing.
p4v -s "//Some/place/some/where/"
You may also need to coerce the url into a valid perforce path. For example, windows urls will include the text before the colon, causing problems.
p4v -s "p4v://Some/place/some/where/"
So you will probably have to write a wrapper script around the execution of p4v to do some text filtering. This is all kind of a pain, which is why I haven't done it myself.
Another simple technique is to set up your intranet web server to serve documents from a frequently-sync'd workspace, as described here: http://www.perforce.com/customers/white_papers/web_content_management_perforce in the section "2. A Simple WCM Approach".
I have used this mechanism, with an Apache web server, and a Perforce client workspace with a cron script sync'ing the workspace every 10 seconds, to share documents via URL in a development environment with dozens of active developers, quite successfully.
The only thing that comes to mind is P4Web, which serves Perforce depot via HTTP. It still wouldn't solve the "sync automatically according to his p4 config", but at least you could send links to your document.