Skip to content

ExtensionEngine/pipeline-build-orb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orb Template

CircleCI Build Status CircleCI Orb Version GitHub License CircleCI Community

A project template for Orbs.

This repository is designed to be automatically ingested and modified by the CircleCI CLI's orb init command.

Use this orb to build NodeJS projects and publish to AWS ECR.


Resources

CircleCI Orb Registry Page - The official registry page of this orb for all versions, executors, commands, and jobs described.

CircleCI Orb Docs - Docs for using, creating, and publishing CircleCI Orbs.

Building frontend

The job installs dependencies and runs npm build script. When the build is finished, the files are stored as CircleCI artifacts and persisted to workspace.

Persisting the files to workspace makes it easier to fetch the files in a following job, for example when we want to upload the frontend to S3 or other hosting service.

Setting up OpenID for AWS

Intro

Instead of using AWS access key, we use OpenID for AWS auth. We want to use OpenID credentials because they expire soon after the job is completed and we don't need to set up AWS keys and keep them secret.

Setup

CircleCI Guide is available here https://circleci.com/docs/openid-connect-tokens/

  1. Go to https://app.circleci.com and copy your Organization ID which is listed on the Organization Settings page in CircleCI app.
  2. Log into AWS, go to IAM, then Identity providers page and click Add provider.
  3. In the "Add an Identity Provider" form, select OpenID Connect type. Under "Provider URL", write https://oidc.circleci.com/org/<organization-id> with org ID obtained in step 1. Click Get thumbprint button. Under Audience input, paste the same org ID (but just the ID, without URL or anything else). Click Add provider button to save this provider.
  4. Go back to IAM, to Roles page and click Create role button.
  5. In the create role form, select Web identity, then in "Identity provider" select URL of the provider from step 3, and for "Audience", select the only available option which is your CircleCI organization ID. Click Next.
  6. On the Add permissions page, select permission you want to add. Click Next. TODO - create permissions only for the scope of this orb.
  7. Finally, add name and description to the role, review permissions and save.
  8. Back in IAM, Roles page, click on the newly created role and copy its ARN. Use that ARN when calling build_server job from this orb.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published