Welcome to the Jumpstart Templates repository! This repository contains a collection of templates for various frameworks and languages to help you kickstart your projects with ease using the Jumpstart CLI & VSCode extension.
We welcome contributions to the Jumpstart Templates repository! Follow these guidelines to contribute:
- Fork the repository to your GitHub account.
- Create a new branch for your feature or bug fix with the following branch name convention
feat/framework-name
orfix/framework-name
. - Make your changes to the templates or add new templates. Ensure to update the corresponding YAML files with accurate information.
- Commit your changes with clear and concise messages.
- Push your changes to your forked repository.
- Open a pull request with details about your changes. Provide a clear description of the purpose and impact of your contribution.
- Your contribution will be reviewed, and upon approval, it will be merged into the main repository.
Each template is a folder with the following structure:
template-name
├── package.yml
└── templates
├── README.md
└── ...
The package.yml
file contains the metadata for the template. It is a YAML file with the following structure:
name: Template name
# This is used to check if it exists on the system
binary: <binary name>
commands:
- <command 1>
- <command 2>
# Default pipeline configuration
pipeline:
setup:
-
-
build:
-
install:
-
-
run:
Let's take a look at each of the fields in the package.yml
file:
-
name
: The name of the template. -
binary
: The name of the binary used to check if the template exists on the system. -
commands
: The list of commands to run so that a project gets generated using this template. -
pipeline
: The default pipeline configuration for the template to generate theDockerfile
. The pipeline is a list of stages, and each stage is a list of commands in that order.setup
: The setup stage is used to install any dependencies required by the template.build
: The build stage is used to build the project.install
: The install stage is used to install any dependencies required by the project.run
: The run stage is used to run the project.
The
setup
stage is added before thebuild
stage, and theinstall
stage is added before therun
stage.Pipeline Dockerfile pipeline: setup: - FROM golang - WORKDIR /src - COPY go.* ./ - RUN go mod download - COPY . . # Perform the build build: - RUN make releases/{{name}} install: - FROM alpine - COPY --from=0 /src/releases/{{name}} / run: /{{name}}
FROM golang
WORKDIR /src COPY go.* ./ RUN go mod download COPY . . RUN make releases/gogin FROM alpine COPY --from=0 /src/releases/gogin / ENTRYPOINT /gogin
The
package.yml
template file can contain variables that are replaced with the corresponding values when the project is generated. The variables are enclosed in double curly braces{{}}
. The following variables are available:{{name}}
: The name of the project that will be generated using this template.{{codeprovider}}
: The code provider is the VCS host. For now, only GitHub is supported. The default value isgithub.com
.{{namespace}}
: The namespace is the organization or user name on the code provider.
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions, feel free to open an issue. We appreciate your feedback!
Happy coding with Jumpstart Templates!