Skip to content

Conversation

@manojmsrit
Copy link
Owner

Change added

@github-learning-lab
Copy link

Nice work getting this pull request opened!

This pull request updates the .circleci/config.yml configuration file. This file is necessary to return a successful build and where we define how to build and test the code.

All projects have different needs, ranging from standard unit tests to custom configuration. Regardless of the definition of "success" for your project, this is the place to define it.

There isn't much in this file right now, but we're going to change that. We'll make a change to configure the build environment.

Notice that this configuration file includes a Docker image to execute the build, defining the environment. There's also a checkout command that allows CircleCI to access your project.

CircleCI is only triggered by new commits. To trigger CircleCI, add the below text in place of the REPLACE-ME-WITH-DOCKER-IMAGE placeholder:

githubtraining/ci-custom:latest

Step 3: Specify the Docker image

To get the CI build to succeed, replace the placeholder text and commit the change.

⌨️ Activity: Select a specific configuration

  1. In this pull request, replace the placeholder text with githubtraining/ci-custom:latest. You can do this by editing the file from the Files changed tab, or by scrolling down and accepting the suggested change.

I'll respond below with your next step.

Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response, wait a few seconds and refresh the page for your next steps.

Copy link

@github-learning-lab github-learning-lab bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Soon, your CI build should succeed! 🎉

When the build completes, notice that your pull request shows all checks have passed with 1 successful check. If it isn't showing up green in a few minutes, try refreshing the page. To see more details, you can click "See all checks".

screen shot 2018-12-11 at 2 41 48 pm

Why did my CI build succeed?

The .circleci/config.yml file defines your build environment and tests. This important config.yml file defines the entire delivery process. Your CI build will succeed if:

  • The .circleci/config.yml file is present
  • Your commit passes the tests as outlined in the config.yml file

Ensuring quality

Tests can be an important contributing factor to ensuring quality, but they're still only a piece of the puzzle. Integrations like CircleCI offer the most benefit with quality, high coverage tests.

No matter how well written your tests are, tests work best when paired with thorough review. Remember that all tests are most effective when paired with pull request reviews. To learn more about reviews on GitHub, take a look at the Reviewing pull requests Learning Lab course.

Step 4: Merge the configuration

Now that our CI build is succeeding, merge this pull request so the .circleci/config.yml file is present on the main branch.

⌨️ Activity: Share your configuration with the team by merging it

  1. Click Merge pull request.
  2. Delete your branch.

I'll respond below with your next step.

Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response, wait a few seconds and refresh the page for your next steps.

Copy link

@github-learning-lab github-learning-lab bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Soon, your CI build should succeed! 🎉

When the build completes, notice that your pull request shows all checks have passed with 1 successful check. If it isn't showing up green in a few minutes, try refreshing the page. To see more details, you can click "See all checks".

screen shot 2018-12-11 at 2 41 48 pm

Why did my CI build succeed?

The .circleci/config.yml file defines your build environment and tests. This important config.yml file defines the entire delivery process. Your CI build will succeed if:

  • The .circleci/config.yml file is present
  • Your commit passes the tests as outlined in the config.yml file

Ensuring quality

Tests can be an important contributing factor to ensuring quality, but they're still only a piece of the puzzle. Integrations like CircleCI offer the most benefit with quality, high coverage tests.

No matter how well written your tests are, tests work best when paired with thorough review. Remember that all tests are most effective when paired with pull request reviews. To learn more about reviews on GitHub, take a look at the Reviewing pull requests Learning Lab course.

Step 4: Merge the configuration

Now that our CI build is succeeding, merge this pull request so the .circleci/config.yml file is present on the main branch.

⌨️ Activity: Share your configuration with the team by merging it

  1. Click Merge pull request.
  2. Delete your branch.

I'll respond below with your next step.

Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response, wait a few seconds and refresh the page for your next steps.

@manojmsrit manojmsrit merged commit b11a6c9 into main Feb 18, 2022
@github-learning-lab
Copy link

The .circleci/config.yml file treats configuration and build environments as code. Version control is an important part of secure collaboration for code. Configuration as code adds the benefits of Git version control for test and build environments.

Now that your CI build is succeeding, let's add some validations to your project.


I've opened a new pull request for your next steps.

Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response, wait a few seconds and refresh the page for your next steps.

@manojmsrit manojmsrit deleted the initial-circle-config branch February 18, 2022 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants