Save 37% off PRO during our Black Friday Sale! »

CircleCI 2.0 First Steps in Beta

CircleCI 2.0 First Steps in Beta


Ladislav Prskavec

April 27, 2017


  1. CircleCI 2.0 First Steps in Beta

  2. New Config 4 circleci.yml -> .circleci/config.yml

  3. Configuration Reference 4 configuration reference

  4. Docker vs Machine 4 configuration types Executor docker machine Start

    time Instant 30-60 sec Clean environment Yes Yes Custom images Yes No Build Docker images Yes (1) Yes Full control over job environment No Yes (1) With Remote Docker.
  5. CircleCI CLI 4 local jobs Installation curl -o /usr/local/bin/circleci \ \ && chmod +x /usr/local/bin/circleci
  6. $ circleci Receiving latest version of circleci... The CLI tool

    to be used in CircleCI. Usage: circleci [flags] circleci [command] Available Commands: build run a full build locally config validate and update configuration files step execute steps tests collect and split files with tests version output version info Flags: -c, --config string config file (default is .circleci/config.yml) --taskId string TaskID --verbose emit verbose logging output Use "circleci [command] --help" for more information about a command.
  7. Next Steps 4 start with small projects - ciphertext

  8. version: 2 jobs: build: working_directory: /app docker: - image: apiaryio/nodejs:4

    steps: - checkout - setup_remote_docker: reusable: true # default - false exclusive: true # default - true - run: name: Install Docker client command: | set -x VER="17.03.0-ce" curl -L -o /tmp/docker-$VER.tgz$VER.tgz tar -xz -C /tmp -f /tmp/docker-$VER.tgz mv /tmp/docker/* /usr/bin # This should go into custom primary image, here's only for the sake of explanation - run: name: Install Docker Compose command: | set -x curl -L`uname -s`-`uname -m` > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose - run: name: Create ciphertext docker image command: docker-compose build - run: name: Run test command: SNYK_TOKEN=$SNYK_TOKEN docker-compose run test
  9. DEMO $ circleci build

  10. Summary 4 beta 4 limitations 4 Building docker images 4

    Custom Images 4 Complex example from CircleCI