To upload Knime workflows to Bitbucket, we need to first zip them.
This activity needs to be done on a daily basis.
So I’m thinking of developing a utility which can zip knime workflow folders on a server.
We have tried the “compress files/folders” node but that does not accept folder paths while using CUSTOM URL.
Please provide your feedback, and I would appreciate it if any working examples were available.
Hi @nitin15585 and welcome to the Knime Community.
Perhaps this should be done at the OS level instead of within Knime. I’d write a script to do this (batch script for Windows and sh script for Linux/Unix/MacOS).
Zip the workflows, upload the zip files to bitbucket. This script could even be schduled to run by itself on a daily basis.
Thanks for sharing. This solution works perfectly on the local machine. But I need to perform this activity on the server. I have tried that but still have no success. I will give one more attempt to do the same, or else move to a linux-based script solution.
Server executors have only limited direct access to the server repository and the local file system.
Take a look at the Workflow Reader node which allows you to read a workflow as a port object, you can then use the Workflow Writer node to create a workflow archive. Both nodes support file system connection ports, so you can read workflows from the server with the KNIME Server Connector and then write them e.g. a temporary directory. Take a look at this workflow:
Note that with that method you can only read / write workflows, if your users also upload other files to the server, you need to use the Transfer Files node for these files.