Switching to AWS EC2 Mac instance was an attempt to improve performance of build machine but also security, stability and scalability. So all the steps can be reproduced for local machines also?.
Having dozens of merges into master branch daily we needed to automate our delivery pipeline in order to provide latest builds to our testers and promote stable builds to beta/production.įor iOS we have started out by having old MacBook Pro (2015 series) lying on the table in the office with GitLab runner installed connected to the internet via local WiFi.
In this article we will present step by step guide on how to create AWS EC2 Mac instances and how to set up necessary tooling for automated builds of iOS React Native apps using GitLab and its runners. While building and provisioning Fairo banking app we have spent quite some time on setting up the CI/CD processes in GitLab for our mobile application that is written in React Native. The system will connect to the server and upload the files that have been modified on your local computer.Setting up GitLab runner on AWS Mac EC2 for React Native iOS builds To commit the changes to your local GIT repository you can use the following command: git commit -a -m "Commit comment." At this stage, the site will be downloaded to your local computer and you can edit your files via your favorite editor. After that, you should see the repository copied on your local computer. Git clone will take several minutes to clone the repository. It is available in your Site Tools > Devs > Git > go to the Action menu for the corresponding repository > Git Info: Now all that is left is to navigate to the folder where you want to clone your repository and run the clone command. To start the SSH agent and add the private key to it using: ssh-add ~/.ssh/file_name Once the key file is created change its permissions to 600 with: chmod 600 file_nameĪfter that run the following command: eval `ssh-agent -s` Here, create an empty file, paste your SSH private key inside it and save the file. Then create a new folder named “.ssh” and navigate to it using: mkdir.
Replace YourUsername in the above command with your Windows Account username. Run the Git Bash application once the installation is complete and go to the C:/Users/YourUser directory using the following command: cd /C/Users/YourUsername Start by downloading Git for Windows and installing it using the default settings. The system will connect to the server and upload the files that have been modified on your local computer. To push the changes to the server you have to use the following command: git push
The above command will commit the changes to your local repository and the comment will be added to the Git logs. The above command will clone the repository and the application will be saved on your local computer in the “ /home/user/Desktop/mainsitegit” folder. If you want to clone your site to a specific folder you can use the following modified command: git clone /home/user/Desktop/mainsitegit After that, you should see your application copied on your local computer. Git clone computer will need several minutes to clone the repository. In this example, the command will clone the repository for the main WordPress site. Commands to clone locally and commit back online Linux/Mac You can check our detailed SSH tutorial for more information on how to manage your SSH keys. If you do not know your SSH key password, you will have to generate a new key from Devs > SSH Keys Manager in Site Tools.
Once you have a key, go to the Action menu > Private Key:Ī new window will appear in which you will be provided with your SSH key:ĭue to security reasons, the password for your SSH key will not be displayed in the tool. If you still do not have a key, you can create one there. To get an SSH key for your site, go to your Site Tools > Devs > SSH Keys Manager. This means that in order to clone the repository you need to have SSH access to your website.
The Git system uses the SSH protocol to transfer data between the server and your local computers. This way you can work and develop your project locally. This tutorial explains how to clone your Git repository to your local machine.