Setting up a project on a local machine
While it's recommended that you create a Dev Environment and build your action within a CodeCatalyst-supported IDE, you can also set up your project and build your action on your local machine. For more information about setting up a Dev Environment, see Step 1: Set up your project and Dev Environment.
To set up your project
-
Create an empty project in CodeCatalyst.
Note
Before you create a project, you must have the Space administrator role, and you must create or join the space where you want to create the project. For more information, see Creating a space in CodeCatalyst.
Open the CodeCatalyst console at https://codecatalyst.aws/
. -
Navigate to the space where you want to create a project.
-
On the space dashboard, choose Create project.
-
Choose Start from scratch.
-
Under Give a name to your project, enter the name that you want to assign to your project. The name must be unique within your space.
-
Choose Create project.
-
Create an empty repository in your new project.
Note
Third-party repositories, such as GitHub repositories, aren't supported for developing, testing, and publishing actions. The actions must be developed in a CodeCatalyst repository.
-
Navigate to your project.
-
In the navigation pane, choose Code, and then choose Source repositories.
-
Choose Add repository, and then choose Create repository.
-
In Repository name, provide a name for the repository. Repository names must be unique within a project. For more information about the requirements for repository names, see Quotas for source repositories in CodeCatalyst.
The action name defaults to the repository name, but it can be changed in CodeCatalyst.
-
(Optional) In Description, add a description for the repository that will help other users in the project understand what the repository is used for.
-
(Optional) Add a
.gitignore
file for the type of code you plan to push. -
Choose Create.
Note
CodeCatalyst adds a
README.md
file to your repository when you create it. CodeCatalyst also creates an initial commit for the repository in a default branch named main. You can edit or delete theREADME.md
file, but you can't change or delete the default branch.
-
-
Create a new feature branch and clone the remote repository.
-
In the navigation pane, choose Code, choose Source repositories, and then choose the empty repository you created.
-
Choose Actions, and then choose Create branch.
-
In the Branch name text input field, enter a
.feature-action-name
-
In the Create branch from dropdown menu, ensure main, the source branch you're creating the new branch from, is selected.
-
Choose Clone repository and Copy the HTTPS clone URL for the remote repository.
-
Choose Create token for a personal access token (PAT) needed to clone the repository.
-
Choose Copy and save the copied PAT for a later step.
-
From your working terminal, clone the remote repository in a local folder with the following git command:
git clone https://
[CODECATALYST-USER]
@[GIT-ENDPOINT]
/v1/[CODECATALYST-SPACE-NAME]
/[CODECATALYST-PROJECT-NAME]
/[CODECATALYST-REPO-NAME]
# The url should be available when you visit the repository created.When prompted for a password, paste the copied PAT as the password and enter it in your working terminal.
-
Change your directory to the repository you cloned:
cd
[CODECATALYST-PROJECT-NAME]
-
Switch to the new branch:
git checkout
feature-action-name
-
After setting up your project, you can continue on to the next step before you can begin developing your action using the CodeCatalyst ADK. For more information, see Step 2: Install tools and packages.