On This Page
This document describes how to get started with a basic build of your Linux, Android, Windows, or macOS project on CircleCI after you sign up.
Echo hello world on Linux
This example adds a job called
build that spins up a container running a pre-built CircleCI Docker image for Node. Then, it runs a simple
echo command. To get started, complete the following steps:
Create a directory called
.circleciin the root directory of your local GitHub or Bitbucket code repository.
- Create a
config.ymlfile with the following lines (if you are using CircleCI server v2.x, use
version: 2.1 jobs: build: docker: - image: cimg/node:17.2.0 # the primary container, where your job's commands are run auth: username: mydockerhub-user password: $DOCKERHUB_PASSWORD # context / project UI env-var reference steps: - checkout # check out the code in the project directory - run: echo "hello world" # run the `echo` command
Commit and push the changes.
Go to the Projects page in the CircleCI app, then click the Set Up Project button next to your project. If you do not see your project, make sure you have selected the associated org. See the Org Switching section below for tips.
- Follow the steps to configure your
config.ymlfile for the project and trigger your first pipeline.
The Workflow page appears with your
build job and prints
Hello World to the console.
Tip: If you get a
No Config Found error, it may be that you used
.yaml file extension. Be sure to use
.yml file extension to resolve this error.
Hello world for Android
Using the basic ideas from the Linux example above, you can add a job that uses the
docker executor with a pre-built Android image in the same
config.yml file as follows:
jobs: build-android: docker: - image: cimg/android:2021.10.2 auth: username: mydockerhub-user password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
See the Android Language Guide for details and a sample project.
Hello world for macOS
Using the basics from the Linux example above, you can add a job that uses the
macos executor and a supported version of Xcode as follows:
jobs: build-macos: macos: xcode: 12.5.1
Refer to the Hello World on MacOS document for more information and a sample project.
Hello world for Windows
Using the basics from the Linux example above, you can add a job that uses the Windows executor as follows. Notice the cloud version of this requires the use of
version: 2.1 config as well as orbs:
More about using and authoring orbs
Orbs are a great way to simplify your config or re-use config across your projects, by referencing packages of config in the CircleCI Orbs Registry.
Following / unfollowing projects
You automatically follow any new project that you push to, subscribing you to email notifications and adding the project to your dashboard. You can also manually follow or stop following a project by selecting your organization in the CircleCI application (as detailed below), clicking Projects in the sidebar, and then clicking the button next to the project you want to follow or stop following.
In the top left, you will find the Org switcher.
If you do not see your project and it is not currently building on CircleCI, check your org in the top left corner of the CircleCI application. For example, if the top left shows your user
my-user, only GitHub projects belonging to
my-user will be available. If you want to add the GitHub project
your-org/project, you must select
your-org from the org switcher.
See the Concepts document for a summary of 2.0 configuration and the hierarchy of top-level keys in a
Refer to the Workflows document for examples of orchestrating job runs with concurrent, sequential, scheduled, and manual approval workflows.
Help make this document better
This guide, as well as the rest of our docs, are open source and available on GitHub. We welcome your contributions.
- Suggest an edit to this page (please read the contributing guidefirst).
- To report a problem in the documentation, or to submit feedback and comments, please open an issue on GitHub.
- CircleCI is always seeking ways to improve your experience with our platform. If you would like to share feedback, please join our research community.
Our support engineers are available to help with service issues, billing, or account related questions, and can help troubleshoot build configurations. Contact our support engineers by opening a ticket.
You can also visit our support site to find support articles, community forums, and training resources.
CircleCI Documentation by CircleCI is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.