Skip to content

Commit f996ee8

Browse files
Merge pull request circleci#4709 from circleci/revert-4704-add/new-config-recipes
Revert "add matrix example to config cookbook"
2 parents 222940f + 0ed9174 commit f996ee8

File tree

5 files changed

+24
-76
lines changed

5 files changed

+24
-76
lines changed

jekyll/_cci2/configuration-cookbook.md

Lines changed: 20 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This page, and its associated recipes, describes how you can perform specific co
2121
### What Are CircleCI Orbs?
2222
{:.no_toc}
2323

24-
CircleCI orbs are configuration packages that enable you to get started with the CircleCI platform. Orbs enable you to share, standardize, and simplify configurations across your projects. You may also want to use orbs as a reference for configuration best practices.
24+
CircleCI orbs are configuration packages that enable you to get started with the CircleCI platform. Orbs enable you to share, standardize, and simplify configurations across your projects. You may also want to use orbs as a refererence for configuration best practices.
2525

2626
Refer to the [CircleCI Orbs Registry](https://circleci.com/orbs/registry/) for the complete list of available orbs.
2727

@@ -42,7 +42,6 @@ workflows:
4242
For more detailed information about CircleCI orbs, refer to the [Orbs Introduction]({{ site.baseurl }}/2.0/orb-intro/) page.
4343
4444
## Configure Your Environment for CircleCI Pipelines and Orbs
45-
{:.no_toc}
4645
4746
Most recipes in this cookbook call for version 2.1 configuration, pipelines and often, orbs. Before using the examples provided, you should check that you are set up for these features. The following notes and steps will get you where you need to be.
4847
@@ -52,6 +51,19 @@ Most recipes in this cookbook call for version 2.1 configuration, pipelines and
5251
* In the examples on this page that use orbs, you will notice that the orbs are versioned with tags, for example, `aws-s3: circleci/[email protected]`. If you copy paste any examples you will need to edit `x.y.z` to specify a version. You can find the available versions listed on the individual orb pages in the [CircleCI Orbs Registry](https://circleci.com/orbs/registry/).
5352
* Any items that appear within `< >` should be replaced with your own parameters.
5453

54+
## Configuration Recipes
55+
56+
The table below lists some recipes to help and inspire your projects.
57+
58+
Configuration Recipe | Description
59+
------------|-----------
60+
[Deploy Changes to Amazon Elastic Container Service (ECS)](#deploy-changes-to-amazon-ecs) | This section describes how you can deploy changes to the Amazon Elastic Container Service (ECS) using a CircleCI-certified ECS orb.
61+
[Interact with Google Kubernetes Engine (GKE)](#interact-with-google-kubernetes-engine-gke) | This section describes how you can deploy changes to the Google Kubernetes Engine (GKE) using a CircleCI-certified GKE orb.
62+
[Using Amazon Elastic Container Service for Kubernetes (Amazon EKS)](#using-amazon-elastic-container-service-for-kubernetes-amazon-eks) | This section describes how you can use the Amazon ECS service for Kubernetes for Kubernetes-related tasks and operations.
63+
[Enabling Custom Slack Notifications in CircleCI Jobs](#enabling-custom-slack-notifications-in-circleci-jobs) | This section describes how you can enable customized Slack notifications in CircleCI jobs.
64+
[Using Logic in Configuration](#using-logic-in-configuration) | This section describes how you can use pipeline values & parameters to select the work to perform.
65+
{: class="table table-striped"}
66+
5567
## Deploy changes to Amazon ECS
5668

5769
The Amazon Elastic Container Service (ECS) is a scalable container orchestration service that enables you to support Docker containers and allows you to run and scale containerized applications on AWS. By using Amazon ECS, you will be able to use this service without installing and configuring your own container orchestration software, thereby eliminating the complexity of your deployment and ensuring you have a simple and optimized container deployment on the CircleCI platform. This recipe shows you how to quickly deploy software changes to Amazon ECS using CircleCI orbs, but if you would like more detailed information about the how Amazon ECS service works, and its underlying components and architecture, please refer to the [Amazon ECS]( https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html) documentation.
@@ -452,11 +464,11 @@ Notice in the example that the job is run and a Slack status alert is sent to yo
452464

453465
For more detailed information about this orb and its functionality, refer to the Slack orb in the [CircleCI Orb Registry](https://circleci.com/orbs/registry/orb/circleci/slack).
454466

455-
## Selecting a Workflow to Run Using Pipeline Parameters
467+
## Using Logic in Configuration
456468

457-
You might find that you want to be able to trigger a specific workflow to run, manually, using the API, but still run a workflow on every push to your project. To achieve this, use [pipeline parameters]({{ site.baseurl }}/2.0/pipeline-variables/#pipeline-parameters-in-configuration) to decide which workflow(s) to run.
469+
### Selecting a Workflow With a Pipeline Parameter
458470

459-
The following example defaults to running the `build` workflow, but allows control of which other workflow to run using the API:
471+
If you want to be able to trigger custom workflows manually via the API, but still run a workflow on every push, you can use pipeline parameters to decide which workflows to run. For more information see the [API Reference Documentation]({{ site.baseurl }}/2.0/configuration-cookbook/#selecting-a-workflow-with-a-pipeline-parameter) and the [API Developers Guide Example]({{ site.baseurl }}/2.0/api-developers-guide/#example-end-to-end-api-request)
460472

461473
```yaml
462474
version: 2.1
@@ -494,7 +506,7 @@ workflows:
494506
- report
495507
```
496508

497-
The `action` parameter will default to `build` on pushes to the project. Below is an example of supplying a different value to `action` using the API v2 [Trigger a New Pipeline]({{ site.baseurl }}/api/v2/#trigger-a-new-pipeline) endpoint to select a different workflow to run, in this example, the workflow named `report` would run. Remember to substitute [`project-slug`]({{ site.baseurl }}/2.0/api-developers-guide/#getting-started-with-the-api) with your values.
509+
The `action` parameter will default to `build` on pushes. Below is an example of supplying a different value using the API v2 Trigger a New Pipeline endpoint and Pipeline Parameters to select a different workflow to run, in this case, `report`. Remember to substitute [`project-slug`({{ site.baseurl }}/2.0/api-developers-guide/#getting-started-with-the-api) for your values.
498510

499511
```sh
500512
curl -X POST https://circleci.com/api/v2/project/{project-slug}/pipeline \
@@ -504,13 +516,9 @@ curl -X POST https://circleci.com/api/v2/project/{project-slug}/pipeline \
504516
-d '{ "parameters": { "action": report } }'
505517
```
506518

507-
For more information on using API v2 endpoints, see the [API Reference Documentation]({{ site.baseurl }}/api/v2/) and the [API Developers Guide Worked Example]({{ site.baseurl }}/2.0/api-developers-guide/#example-end-to-end-api-request).
519+
### Branch-filtering for Job Steps
508520

509-
## Branch-filtering for Job Steps
510-
511-
Branch filtering has previously only been available for workflows, but with compile-time logic statements, you can also implement branch filtering for job steps.
512-
513-
The following example shows using the [pipeline value]({{ site.baseurl }}/2.0/pipeline-variables/#pipeline-values) `pipeline.git.branch` to control `when` a step should run. In this case the step `run: echo "I am on master"` only runs when the commit is on the master branch:
521+
Branch filtering has previously only been available for workflows, but with compile-time logic statements, you can implement it for job steps as well.
514522

515523
```yaml
516524
version: 2.1
@@ -532,63 +540,3 @@ workflows:
532540
jobs:
533541
- my-job
534542
```
535-
536-
## Use Matrix Jobs to Run Multiple OS Tests
537-
538-
Using matrix jobs is a good way to run a job multiple times with different arguments, using parameters. There are many uses for this, including testing on multiple operating systems and against different language/library versions.
539-
540-
In the following example the `test` job is run across Linux, Windows and macOS environments, using two different versions of node. On each run of the `test` job different parameters are passed to set both the OS and the node version:
541-
542-
```yaml
543-
version: 2.1
544-
545-
orbs:
546-
node: circleci/[email protected]
547-
win: circleci/[email protected]
548-
549-
executors:
550-
linux: # linux executor using the node base image
551-
docker:
552-
- image: cimg/node
553-
windows: win/default # windows executor - uses the default executor from the windows orb
554-
macos: # macos executor using xcode 11.6
555-
macos:
556-
xcode: 11.6
557-
558-
jobs:
559-
test:
560-
parameters:
561-
os:
562-
type: executor
563-
node-version:
564-
type: string
565-
executor: << parameters.os >>
566-
steps:
567-
- checkout
568-
- node/install:
569-
node-version: << parameters.node-version >>
570-
install-yarn: true
571-
- run: yarn test
572-
573-
workflows:
574-
all-tests:
575-
jobs:
576-
- test:
577-
matrix:
578-
parameters:
579-
os: [linux, windows, macos]
580-
node-version: ["13.13.0", "14.0.0"]
581-
```
582-
583-
The expanded version of this matrix runs the following list of jobs under the `all-tests` workflow:
584-
585-
```
586-
- test-13.13.0-linux
587-
- test-14.0.0-linux
588-
- test-13.13.0-windows
589-
- test-14.0.0-windows
590-
- test-13.13.0-macos
591-
- test-14.0.0-macos
592-
```
593-
594-
For full details of the matrix jobs specification, see the [Configuration Reference]({{ site.baseurl }}/2.0/configuration-reference/#matrix-requires-version-21).

jekyll/_cci2/orb-author-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,4 @@ steps:
106106
- Refer to [Orb Publishing Process]({{site.baseurl}}/2.0/creating-orbs/) for information about orbs that you may use in your workflows and jobs.
107107
- Refer to [Orbs Reference]({{site.baseurl}}/2.0/reusing-config/) for examples of reusable orbs, commands, parameters, and executors.
108108
- Refer to [Orb Testing Methodologies]({{site.baseurl}}/2.0/testing-orbs/) for information on how to test orbs you have created.
109-
- Refer to [Configuration Cookbook]({{site.baseurl}}/2.0/configuration-cookbook/) for more detailed information about how you can use CircleCI orb recipes in your configurations.
109+
- Refer to [Configuration Cookbook]({{site.baseurl}}/2.0/configuration-cookbook/#configuration-recipes) for more detailed information about how you can use CircleCI orb recipes in your configurations.

jekyll/_cci2/orbs-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ You attempted to run a local build with version 2.1 of configuration.
7676
- Refer to [Orbs Concepts]({{site.baseurl}}/2.0/using-orbs/) for high-level information about CircleCI orbs.
7777
- Refer to [Orb Publishing Process]({{site.baseurl}}/2.0/creating-orbs/) for information about orbs that you may use in your workflows and jobs.
7878
- Refer to [Orbs Reference]({{site.baseurl}}/2.0/reusing-config/) for examples of reusable orbs, commands, parameters, and executors.
79-
- Refer to [Configuration Cookbook]({{site.baseurl}}/2.0/configuration-cookbook/) for more detailed information about how you can use CircleCI orb recipes in your configurations.
79+
- Refer to [Configuration Cookbook]({{site.baseurl}}/2.0/configuration-cookbook/#configuration-recipes) for more detailed information about how you can use CircleCI orb recipes in your configurations.

jekyll/_cci2/testing-orbs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,4 @@ For advanced testing, you may also want to use a shell unit testing framework su
186186
- Refer to [Orbs Concepts]({{site.baseurl}}/2.0/using-orbs/) for high-level information about CircleCI orbs.
187187
- Refer to [Orb Publishing Process]({{site.baseurl}}/2.0/creating-orbs/) for information about orbs that you may use in your workflows and jobs.
188188
- Refer to [Orbs Reference]({{site.baseurl}}/2.0/reusing-config/) for examples of reusable orbs, commands, parameters, and executors.
189-
- Refer to [Configuration Cookbook]({{site.baseurl}}/2.0/configuration-cookbook/) for more detailed information about how you can use CircleCI orb recipes in your configurations.
189+
- Refer to [Configuration Cookbook]({{site.baseurl}}/2.0/configuration-cookbook/#configuration-recipes) for more detailed information about how you can use CircleCI orb recipes in your configurations.

jekyll/_cci2/using-orbs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,4 @@ If the case arises where you need to delete an orb for emergency reasons, please
232232

233233
- Refer to [Orb Introduction]({{site.baseurl}}/2.0/orb-intro/), for a high-level overview of using and authoring orbs.
234234
- Refer to [Orbs Reference]({{site.baseurl}}/2.0/reusing-config/) for more detailed examples of reusable orbs, commands, parameters, and executors.
235-
- Refer to [Configuration Cookbook]({{site.baseurl}}/2.0/configuration-cookbook/) for more detailed information about how you can use CircleCI orb recipes in your configurations.
235+
- Refer to [Configuration Cookbook]({{site.baseurl}}/2.0/configuration-cookbook/#configuration-recipes) for more detailed information about how you can use CircleCI orb recipes in your configurations.

0 commit comments

Comments
 (0)