Getting started with SourceCraft

Note

The service is at the Preview stage. The service is not subject to a service level agreement and is offered free of charge.

SourceCraft is a platform you can use to develop source code, perform version management, test, assemble, deploy, and maintain software products. It is a code repository management system for git with error tracking and a CI/CD pipeline.

SourceCraft terms of use

To get started:

  1. Sign up.
  2. Create a repository.
  3. Check out the test CI process.
  4. Set up your environment.
  5. Add an SSH key to SourceCraft.
  6. Clone the repository.
  7. Make changes to the new branch.
  8. Create a pull request.
  9. Merge with the main branch.

Sign up

  1. If you do not have a Yandex ID yet, sign up.

    If using your social network profile to log in to Yandex, create a username and password.

  2. On the homepage, click Submit request.

  3. In the form that opens, provide your contact information, accept the personal data processing agreement, and click Send.

    Once your request is approved, a confirmation for access to SourceCraft at the Preview stage will be emailed to you at the address you provided.

  4. On the SourceCraft homepage, click Log in and select the Yandex ID profile you want to use to sign up for the service.

  5. Select the organization you are going to use to work with the service.

    If you already have an organization registered in Yandex Cloud, you can use the same one in SourceCraft.

    If you have none, an organization will be automatically created for you to work with SourceCraft.

    You can also create a new organization.

  6. Click Proceed .

  7. On the page that opens, fill out the profile information:

    • Name: Required field
    • Country
    • City
    • Company
    • Name
    • Bio
    • Links

    You can also add a profile image and a background.

  8. Click Looks good to me, open Dashboard.

Create a repository .

  1. In the left-hand panel, click Create repository.
  2. Under Your new repository details:
    • Select Create blank repository to create a new repository.

      You can import an existing repository to SourceCraft.

    • In the Name field, specify a name for the repository, e.g., test-repo. The name may contain the following ASCII characters: lowercase and uppercase Latin letters, numbers, commas, hyphens, and underscores.

    • Optionally, in the Description field, enter a repository description.

  3. Under Repository template, click Browse templates, select suitable repository template, and click Use template.

    Templates contain a preinstalled CI/CD configuration and standard project files.

    To view the template contents, click Preview.

  4. Under Visibility, select Private for repository access type. Only users invited by you will be able to access the repository.
  5. Click Create repository.

Check out the test CI/CD process

When initializing the repository, a test CI/CD process will be initiated.

Check out the CI/CD process:

  1. Under Code on the repository page, go to CI/CD.
  2. Select a running workflow.
  3. The page that opens will display all the workflow tasks, cubes (task steps), as well as statuses and execution results.

Set up your environment

  1. Install Git.

  2. Create a pair of public and private SSH keys for your SourceCraft account:

    1. Open the terminal.

    2. Use the ssh-keygen command to create a new key:

      ssh-keygen -t ed25519 -C "<optional_comment>"
      

      You can specify an empty string in the -C parameter to avoid adding a comment, or you may not specify the -C parameter at all: in this case, a default comment will be added.

      After running this command, you will be prompted to specify the name and path to the key files, as well as enter the password for the private key. If you only specify the name, the key pair will be created in the current directory. The public key will be saved in a file with the .pub extension, while the private key, in a file without extension.

      By default, the command prompts you to save the key under the id_ed25519 name in the following directory: /home/<username>/.ssh. If there is already an SSH key named id_ed25519 in this directory, you may accidentally overwrite it and lose access to the resources it is used in. Therefore, you may want to use unique names for all SSH keys.

    If you do not have OpenSSH installed yet, follow this guide to install it.

    1. Run cmd.exe or powershell.exe (make sure to update PowerShell before doing so).

    2. Use the ssh-keygen command to create a new key:

      ssh-keygen -t ed25519 -C "<optional_comment>"
      

      You can specify an empty string in the -C parameter to avoid adding a comment, or you may not specify the -C parameter at all: in this case, a default comment will be added.

      After running this command, you will be prompted to specify the name and path to the key files, as well as enter the password for the private key. If you only specify the name, the key pair will be created in the current directory. The public key will be saved in a file with the .pub extension, while the private key, in a file without extension.

      By default, the command prompts you to save the key under the id_ed25519 name in the following folder: C:\Users\<username>/.ssh. If there is already an SSH key named id_ed25519 in this directory, you may accidentally overwrite it and lose access to the resources it is used in. Therefore, you may want to use unique names for all SSH keys.

    Create keys using the PuTTY app:

    1. Download and install PuTTY.

    2. Add the folder with PuTTY to the PATH variable:

      1. Click Start and type Change system environment variables in the Windows search bar.
      2. Click Environment Variables... at the bottom right.
      3. In the window that opens, find the PATH parameter and click Edit.
      4. Add your folder path to the list.
      5. Click OK.
    3. Launch the PuTTYgen app.

    4. Select EdDSA as the pair type to generate. Click Generate and move the cursor in the field above it until key creation is complete.

      ssh_generate_key

    5. In Key passphrase, enter a strong password. Enter it again in the field below.

    6. Click Save private key and save the private key. Do not share its key phrase with anyone.

    7. Click Save public key and save the public key to a file named <key_name>.pub.

  3. Launch the SSH agent:

    1. Run this command:

      ssh-agent -s
      
    2. For the SSH agent to start on login, add the launch command to the ~/.profile file:

      ssh-agent -s
      
    1. Open the Start button context menu.
    2. Select Computer Management.
    3. Go to Services and ApplicationsServices.
    4. Open the context menu of the SSH agent service and select Properties.
    5. On the Main tab, change the startup type from Off to Automatic.
    6. Click OK and start the service.
  4. Add a key to the SSH agent:

    ssh-add <private_key_path>
    

You can also access the repository using a personal token (PAT).

Add an SSH key to SourceCraft

  1. Open the service home page.
  2. In the left-hand panel, click Settings and select SSH Keys.
  3. Click Add.
  4. In the window that opens:
    • In the Key name field, specify a key name.
    • In the Content field, paste the contents of the public SSH key file.
  5. Click Add.

Clone the repository

  1. In the top-right corner of the repository page, click Clone.

  2. Copy the link for cloning the repository from the SSH field:

  3. In the terminal, run this command:

    git clone <link_for_cloning_repository>
    
  4. Go to your cloned repository:

    cd <repository_name>
    

Make changes to the new branch

  1. Create a new branch for the changes and push it to the remote repository:

    git checkout -b new-feature
    git push -u origin new-feature
    
  2. Make changes to the repository files; for example, edit README.md.

  3. Add the modified file to the git index, then commit and push the changes to the remote repository:

    git add .
    git commit -m "updated README.md"
    git push origin new-feature
    

Create a pull request

  1. Under Code on the repository page in SourceCraft, go to Pull requests.
  2. In the top-right corner, click Create pull request.
  3. In the source drop-down list, select the new-feature branch, and main in target.
  4. Optionally, provide a name and description for the pull request.
  5. Click Publish pull request.

Merge with the main branch

  1. To see the changes made under the pull request, navigate to the Files changed tab.
  2. To approve the changes, click Approve in the top-right corner.
  3. Click Merge pull request.

See also