Hello world

1 week ago2 min read
Last updated • Read time
Cloud
This document is applicable to CircleCI Cloud
Server v4+
This document is applicable to CircleCI Server v4+

This page provides configuration examples to get started with a basic pipeline using any execution environment.

Prerequisites

  • A CircleCI account connected to your code. You can sign up for free.

  • A code repository you want to build on CircleCI.

  • Follow the Create a Project guide to connect your repository to CircleCI. You can then use the examples below to configure a basic pipeline using any execution environment.

Echo hello world

These examples adds a job called hello-job that prints hello world to the console.

The job hello-job spins up a container running a pre-built CircleCI Docker image for Node. Refer to Using the Docker execution environment page for more information.

version: 2.1

jobs:
  hello-job:
    docker:
      - image: cimg/node:17.2.0 # the primary container, where your job's commands are run
    steps:
      - checkout # check out the code in the project directory
      - run: echo "hello world" # run the `echo` command

workflows:
  my-workflow:
    jobs:
      - hello-job

Screenshot showing hello world in the job step output

Echo hello world on CircleCI server

These examples add a job called hello-job that prints hello world to the console.

The job hello-job spins up a container running a pre-built CircleCI Docker image for Node. Refer to Using the Docker execution environment page for more information.

version: 2.1

jobs:
  hello-job:
    docker:
      - image: cimg/node:17.2.0 # the primary container, where your job's commands are run
    steps:
      - checkout # check out the code in the project directory
      - run: echo "hello world" # run the `echo` command

workflows:
  my-workflow:
    jobs:
      - hello-job

Screenshot showing hello world in the job step output

Next steps

  • See the Concepts page for a summary of CircleCI-specific concepts.

  • Refer to the Workflows page for examples of orchestrating job runs with concurrent, sequential, scheduled, and manual approval workflows.

  • Find complete reference information for all keys and execution environments in the CircleCI Configuration Reference.