...
Download the Kyvos CICD Utility.
Export Utility
Anchor | ||||
---|---|---|---|---|
|
Prerequisites
To use the Export utility, you must have the following.
...
Browse to the Export_Executor folder and double-click the exe file to execute it.
The Export utility starts executing. Once the export is complete, you can check the execution logs in the output folder.
The following figure shows a snippet of the Export Utility execution.If the GITPUSH parameter is set as Y in the Config file, then all the entity XML files will get exported to the Git Feature branch in the following order.
A GIT PULL is performed from the feature branch specified in the config file. So that the remote and local repository (GITRepo) are in sync.
The entities are exported to the GITRepo folder from Kyvos, which is a local repository clone of the Git repository, as shown in the following figure.
Entities are then pushed to the Git feature branch, as shown in the following figure. We have used the working feature branch in this case.
If the GITPUSH parameter is set as N in the Config file, then the entities are directly exported to the Output folder in the Export No GIT PULL and GIT PUSH will be performed in this case.
...
In case the Jenkins job is not created and configured, see the section Creating new Project in Jenkins.
In case the Jenkins job is not Integrated with Git Repository, see the section Git settings to integrate with Jenkins.
In case the Git connection is not created in Jenkins, see the section Creating Git Connection in Jenkins.
Once the above steps are completed, you can execute the Deploy Utility using any of the following methods.
...
You can also deploy entities using the DeployKyvosEntities.py Python script. In this case, the Deploy Utility is triggered by executing the following commands using the Jenkins jobs.
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
ImportantYou must have Python 3.x (with the required packages as mentioned in the Python script) installed on the target system to execute the script. |
...
The Personal Access Token is required for authentication of Export Utility with Git. You are required to provide this in the Export Utility config file, as explained in the Export Utility section.
To create a Personal Access Token in Git, perform the following steps.
In your Git account, navigate to Edit Profile.
On the left pane, click Access Tokens.
Give the token a Descriptive name, select the Scopes which define the access for the Personal tokens, and then click the Create personal access token. A token is generated.
...
In Manage Jenkins > System Configuration > Configure System and then follow these steps.
In the Git section, check the Enable authentication for '/project' end-point
Click Add, then choose Jenkins Credential Provider.
Choose Git API token as the token type.
Enter the Git personal access token's value in the API Token field and click Add.
Enter the Git server's URL in the Git host URL.
Click Test Connection, ensuring the connection is successful before proceeding.
After testing the connection, enter the connection name and save.
Anchor | ||||
---|---|---|---|---|
|
...
Login to your Jenkins account and click New Item from the top left of your dashboard.
Enter the name of the item you want to create, select Freestyle project, and click OK. The project is created.
Navigate to the newly created project and select the Configure option, as shown in the following figure.
On the General tab, click on Git Connection and select the connection.
On the Source Code Management tab, select the Git option on the left and provide your Git Repository URL and Credentials in the corresponding fields.
Change the Branch Specifier as shown in the below screenshot */main this is the branch we intend to build using Jenkins. In this example, we have selected main to Build.
Select the Repository Browser as Auto.
In Additional Behaviours, select the Wipe out repository & force clone option to erase the local repository and clone the fresh repository every time to avoid inconsistency.
On the Build Triggers tab, select Build when a change is pushed to Git
It is used to execute the Deploy Utility as soon entities are merged from the Feature branch to the Master branch in Git repository mentioned in Jenkins above.
Anchor | ||||
---|---|---|---|---|
|
Click Advanced to generate the secret token required for configuring Webhooks.
On the Build Steps tab, select the Execute Window batch command and enter the command (explained in the Deploy Utility section) to execute the Utility.
Click the Save button to save your changes.
...
In your Git Account, select the repository you want to integrate with Jenkins and go to Settings.
Select the Webhooks option from the left pane.
In the URL, enter the URL and append “/project/project name” to this URL, as shown in the figure below, and enter the secret token. To generate the secret token, check the section Creating secret token in Jenkins). For example, http://localhost:8080/project/Git
Select Push events in the trigger and then click Add webhook.