Engineering

Our engineering is underpinned by principles that celebrate both the integrity of code and the ambition to innovate. This manifesto champions excellence, advocates for the adoption of cutting-edge technologies, and fosters an environment of continuous intellectual growth.

Semaphore 2 setup

Whenever you push your code, Semaphore will automatically run your build, test and deploy pipeline

Initialize semaphore in your project

Install the sem CLI and connect to your organization.

curl https://storage.googleapis.com/sem-cli-releases/get.sh | bash sem connect ORGANIZATION.semaphoreci.com ACCESS_TOKEN Then run sem init to create a semaphore.yml file.

Configure semaphore.yml

Blocks are used to define what to do at each step in the pipeline. For most of our projects, we have 3-4 blocks: setup, linters, tests and build.

All the commands needed to run your app should be in the first block. Put the main task for the block under jobs. Use prologue and epilogue for caching and other commands. For example:

blocks: - name: Setup task: prologue: commands: - checkout // clones the github repo of the project to the job's VM environment. - cache restore node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum mix.lock) jobs: - name: Install dependencies commands: - yarn install epilogue: commands: - cache delete node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum mix.lock) - cache store node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum mix.lock) node_modules

Caching dependencies

Since jobs each have their own VM environment, we need to cache dependencies to be able to reuse them and to prevent slowing down the pipeline.

Parallel jobs While blocks run one after the other, jobs can run in parallel. This is useful for linter commands. For example:

- name: "Linter" task: prologue: commands: - checkout - cache restore node-modules-$(checksum yarn.lock) jobs: - name: Stylelint commands: - yarn stylelint - name: Eslint commands: - yarn eslint - name: Prettier.js commands: - yarn prettier - name: Flow commands: - yarn flow

Deploy with promotions

Promotions are used to move to a different pipeline. Add one under the blocks in your semaphore.yml file.

promotions: - name: Production deploy pipeline_file: production-deploy.yml

Deployment can be done manually or automatically. For example:

promotions: - name: Staging deploy // Auto pipeline_file: staging-deploy.yml auto_promote_on: - result: passed branch: - develop - name: Production deploy // Manual pipeline_file: production-deploy.yml
Next: Design Playbook

Connect.

Mashup Garage, a premier software development team, specialises in crafting exceptional products for startups and enterprises. With expertise in React, Elixir/Phoenix, and Ruby on Rails, we deliver solutions that meet your unique needs. Our mission is to bring value backed by decades of technical expertise and global co-founding experience.

What do you need help with?

Build a project

Build a team

Consult

Speak to someone

Expect a guaranteed response from us in 1-2 business days.

United Kingdom

London

Islington, London

+44 738 777 3405

LDN

Philippines

Manila

3F Topy IV Building, 3 Economia Road, Bagumbayan, Quezon City, 1110

+63 917 3084089

MNL