Git is the most popular technology used by developers to store and version code. It is difficult to imagine a tool for developers without a Git integration. So, there was no question that Artifakt should feature a Git integration as well.
But we didn’t want just a Git integration. We challenged ourselves with creating the smoothest experience possible. We wanted to avoid:
- all the copy/paste issues with the repository URL, keys and branch. Don’t tell me it has never happened to you!) .
- security issues and complexity of generating key pairs. Does mixing up public and private keys or using the wrong key type sound familiar?
- a complicated setup with multiple steps. Everyone loves one-click workflows.
Our Product and Engineering Teams worked hard on this and we are happy to present our new and efficient Git integration for the Artifakt Platform. 🚀
You can now deploy directly from your favorite Git platform: Github, Gitlab, Bitbucket and self-hosted Git repositories!
The Git ecosystem
If you are already familiar with Git technology and Git Providers, don’t hesitate to skip this part.
Git is a technology for tracking any changes in your source code, usually used for coordinating work among developers collaboratively developing web applications.
Although Git is not the only version control tool—SVN and Mercurial also have a fair share of users—We strongly believe that Git is the best option. Compared to the other tools, Git is much faster and offers more features. This is also the main reason we designed to integrate Git with the Artifakt platform, instead of another tool.
Now, Git features often differ from one provider to another and everyone has their favorite. Let’s have a look at the most popular Git platforms.
- GitHub: The #1 Git platform in the world. It is used for open source projects but, after its acquisition by Microsoft, more and more companies use GitHub for their private and enterprise projects.
- GitLab: The big competitor of GitHub. GitLab has been the best solution for hosting private repos for free. Although GitHub also added this feature later on. GitLab offers more DevOps features and their product has an open source as well as self-hosted version.
- Bitbucket: Bitbucket is the Git provider of Atlassian. So, if you are using Jira or any Atlassian products, Bitbucket is a good choice because it’s natively integrated.
- Self-hosted: Somes companies prefer not to use online Git platforms for strategic or security reasons. So, they usually implement a self-hosted Git solution on their own.
Deploying faster with Git
The structure of the Artifakt Platform is based on Projects. A project is usually one web application (one Git repository) and includes all your different environments, settings, and members working on the project. Learn more about the Artifakt structure in our documentation.
Note: As Artifakt offers an integration only with Git, if you are not already using Git, please migrate your source code before following the next steps. Check out this article to help you migrate your code.
Creating a project
After creating a new project, Artifakt asks if you want to connect your Git repositories.
There are three choices:
- Connect to a Git provider: You can choose to connect to a Git provider (GitLab, GitHub, or Bitbucket). Artifakt asks for your credentials (Auth0) in order to generate a token that will allow Artifakt to interact with the API and retrieve data for your Git provider. This way, you are able to pick your repository and the branch directly from a list. That’s all! Simple, right?
- Connect to a self-hosted Git: If you don’t use one of the main Git platforms listed above, you can simply select “Git”. Artifakt automatically generates a public SSH key—you use it to authorize Artifakt on your Git platform.
- Skip and create the project: This is where Artifakt magic happens! 💪 We set a default Git repository on your project including the code of the runtime you selected. For instance, if you picked WordPress 5.7, the Git repository we created will include the code of a blank WordPress website. This way, you are ready to deploy your first environment without the need to have a Git repository at your disposal.
If you decide to change the Git configuration (repository and default branch) later on, you can do so in the Project Settings. The default branch would be used each time you create new environments.
Your first deployment
Your Git repository is now connected and configured to your Artifakt project. What’s next?
Now, you can create your first environment by giving it a name and picking the right Git branch. If you previously selected a Git provider, the branch list would be updated automatically depending on your current branches. I won’t be getting into the details of how to use the other options in this post. But you can always check out our documentation on creating new environments if you want to learn more.
And voila, Your environment is ready! Every time you build or run a Deploy job, Artifakt will connect to your repository, clone the right branch and build your application to create a new release.✨
We hope you will love this feature! 💪 All our customers use it to save time each time they create new projects. Developers are also happy to find their favorite Git technology and providers integrated directly into the Artifakt Platform.
But there is always room for improvement! Here are some of the ideas on how to improve our Git integration:
- Adding more Git providers or offering our own Git solution.
- Accessing and changing source code directly from Artifakt.
- Create, update or delete environments on the fly, depending on your branch lifecycle (CI/CD).
Do you have any other interesting ideas? Don’t hesitate to reach out! We are looking forward to your feedback.