Integrate a project with VSC
This tutorial provides step-by-step instructions for integrating your Snoweaver project with Github by using the Snoweaver CLI client.
Prerequisites
Before continuing with this tutorial, ensure you have completed the following prerequisites:
Complete at least one of the tutorials in Job Development.
Ensure Git is installed and available on your client machine.
Export Resources from the Project
Open the LEARN_DEV project in Snoweaver with the LEARN_DEV_DEVELOPER role.
Click Export on the Home page with Resource Type set to All.
Once the export is complete, you’ll find several YAML files generated for the project resources within the CODE stage of LEARN_DEV. The specific files generated will depend on the resources you’ve created in your project.
Create and connect to a Github repository
If you don’t already have an account, sign up for a free GitHub account.
Create a new repository named learn_sw.
Set up a connection to LEARN_DEV in SnowSQL if you haven’t done so already.
Please refer to this page: Configure a connection to a Snoweaver project
Launch a command-line terminal (Linux, macOS) or Git Bash (Windows) on your client machine.
Select your preferred method for authenticating your Github account with the Git command line tool.
Run the following commands to clone the new repository and download the LEARN_DEV project:
cd ~ git clone https://github.com/<Your Org>/learn_sw.git cd learn_sw sw get all -c learn_dev
Run the following commands to push the changes to your repository:
git add . git commit -m 'first commit' git push -u origin main
Warning
The commands and steps in this tutorial are intended to demonstrate the basic integration of Snoweaver with a version control system. In a production environment, it’s crucial to adhere to your organization’s established workflows and best practices for version control. This may include using feature branches, pull requests, code reviews, and other collaborative development practices. Always consult with your team or IT department to ensure your actions align with your organization’s standards and security policies.
Update the project and commit the change
Open the LEARN_DEV project in Snoweaver with the LEARN_DEV_DEVELOPER role.
Add a new project variable on the Home page. as follows:
Name: test_var Type: Text Value: test
Save the changes.
Return to your comand line terminal.
Re-export the project to the CODE stage and then synchronize your local project copy:
sw export all -c learn_dev -d sw get all -c learn_dev -d
Commit your changes to the repository and review the details of the second commit on GitHub.
git add . git commit -m 'add project var test_var' git push -u origin main