Synchronize Resource Files to Code Repository
This section describes how to synchronize resource files in a project to a code repository. After synchronization, you can manage the project’s resource files in the code repository.
Prerequisites
-
The DevOps extension must be installed and enabled on the KubeSphere platform.
-
A workspace, a DevOps project, and a user (for example, project-regular) have been created. The user has been invited to the DevOps project and granted the operator role. Refer to Invite a User to a DevOps Project.
-
A code repository has been imported.
Steps
-
Log in to the KubeSphere console as the project-regular user and enter your workspace.
-
Click DevOps > Resource Management in the left navigation pane.
-
Select a DevOps project from the drop-down list in the upper left corner of the page.
-
Click the Custom Resource List button. In the directory tree or the list on the right, select the resource files to be synchronized to the code repository. You can also click Add to List on the file content details page. The selected files will be displayed in the Pending Synchronization Resource List on the right.
-
Under the Pending Synchronization Resource List, click Sync to Code Repository.
-
On the Basic Information tab, confirm the resources to be synchronized, then click Next.
Click
to edit the resource file. After editing, click
at the bottom to save.
-
On the Application Settings tab, select the cluster, DevOps project, code repository, and branch. Set the storage directory, commit information, etc. Click OK to start the synchronization.