Skip to content

Commit c92d051

Browse files
committed
fix
2 parents 51b5209 + a36c73a commit c92d051

File tree

64 files changed

+1959
-485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1959
-485
lines changed

jekyll/_cci2/config-policies-for-self-hosted-runner.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Follow this how-to guide to learn how to create a config policy to restrict whic
2020

2121
* Install/update the CircleCI CLI, and ensure you have authenticated with a token before attempting to use the CLI with config policies. See the xref:local-cli#[Installing the Local CLI] page for more information.
2222

23-
* Set up a self-hosted runner. See the xref:runner-installation#[Installing self-hosted runners] guide.
23+
* Set up a self-hosted runner. See the xref:runner-overview/#getting-started[Getting started] section of the Self-hosted runners overview.
2424

2525
* Ensure you have **enabled** config policy evaluation for your organization so that project configurations **will** be evaluated against your organization's policies when pipelines are triggered:
2626
+
@@ -72,7 +72,7 @@ In the following steps you will replace `namespace/resource_class` and `project_
7272
== 2. Update policy with your details
7373

7474
. Replace `namespace/resource_class` with one of your runner resource classes:
75-
.. In the CircleCI web app, go to your self-hosted runner's inventory page by selecting **Self-Hosted Runners** in the sidebar. If you do not see this option, check that you have followed the xref:runner-installation#[Installing self-hosted runners] guide. Here you will see all your available self-hosted runner resource classes.
75+
.. In the CircleCI web app, go to your self-hosted runner's inventory page by selecting **Self-Hosted Runners** in the sidebar. If you do not see this option, check that you have accepted the CircleCI Runner Terms and created a namespace and resource class, as outlined in the runner installation guides. Here you will see all your available self-hosted runner resource classes.
7676
.. Replace `namespace/resource_class` in the `runner.rego` file with the name of the resource class that you would like to restrict.
7777

7878
. Replace `project_UUIDs` with a project ID:

jekyll/_cci2/config-policy-management-overview.adoc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,34 @@ For further reading, see the link:https://circleci.com/blog/compliance-with-conf
375375

376376
It is important to be able to deploy new policies with confidence, knowing how they will be applied, and the decisions they will generate ahead of time. To enable this process, the `circleci policy test` command is available. The `test` subcommand is inspired by the golang and opa test commands. For more information on setting up testing, see the xref:test-config-policies#[Test config policies] guide.
377377

378+
[#dynamic-config]
379+
== Config policies and dynamic configuration
380+
381+
You can write config policies to govern projects that use dynamic configuration too. Policies are evaluated against:
382+
383+
* _Setup_ configurations
384+
* _Continuation_ configurations
385+
* Standard configurations
386+
387+
If required for your project, you can encode rules to apply only to setup configs, or only to non-setup configs, as follows:
388+
389+
[source,rego]
390+
----
391+
enable_hard["setup_rule"] { input.setup } # only applied to configs with `setup: true`
392+
----
393+
394+
[source,rego]
395+
----
396+
enable_hard["not_setup_rule"] { not input.setup } # only applied to configs that do not have `setup: true`
397+
----
398+
399+
[source,rego]
400+
----
401+
enable_hard["some_rule"] # rule applied to all configs
402+
----
403+
404+
For more information about dynamic configuration, see the xref:dynamic-config#[Dynamic configuration overview].
405+
378406
[#example-policy]
379407
== Example policy
380408

jekyll/_cci2/configuration-reference.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,11 @@ A [custom image]({{ site.baseurl
704704

705705
You can specify image versions using tags or digest. You can use any public images from any public Docker registry (defaults to Docker Hub). Learn more about specifying images on the [Using the Docker Execution Environment]({{ site.baseurl }}/using-docker) page.
706706

707+
---
708+
709+
##### Docker registry authentication
710+
{: #docker-auth }
711+
707712
Some registries, Docker Hub, for example, may rate limit anonymous docker pulls. It is recommended you authenticate in such cases to pull private and public images. The username and password can be specified in the `auth` field. See [Using Docker Authenticated Pulls]({{ site.baseurl }}/private-images/) for details.
708713

709714
Example:
@@ -743,7 +748,33 @@ jobs:
743748
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
744749
```
745750

746-
Using an image hosted on [AWS ECR](https://aws.amazon.com/ecr/) requires authentication using AWS credentials. By default, CircleCI uses the AWS credentials you provide by setting the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` project environment variables. It is also possible to set the credentials by using the `aws_auth` field as in the following example:
751+
---
752+
753+
##### AWS authentication
754+
{: #aws-authentication}
755+
756+
Using an image hosted on [AWS ECR](https://aws.amazon.com/ecr/) requires authentication using AWS credentials.
757+
758+
###### Use OIDC
759+
{: #oidc }
760+
761+
Authenticate using OpenID Connect (OIDC) using the `oidc_role_arn` field, as follows:
762+
763+
```yaml
764+
jobs:
765+
job_name:
766+
docker:
767+
- image: <your-image-arn>
768+
aws_auth:
769+
oidc_role_arn: <your-iam-role-arn>
770+
```
771+
772+
For steps to get set up with OIDC to pull images from AWS ECR, see the [Pull and image from AWS ECR with OIDC](/docs/pull-an-image-from-aws-ecr-with-oidc/) page.
773+
774+
###### Use environment variables
775+
{: #env-vars}
776+
777+
By default, CircleCI uses the AWS credentials you provide by setting the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` project environment variables. It is also possible to set the credentials by using the `aws_auth` field as in the following example:
747778

748779
```yaml
749780
jobs:

jekyll/_cci2/container-runner-installation.adoc

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
contentTags:
33
platform:
44
- Cloud
5-
- Server v4.x
6-
- Server v3.x
75
---
86
= Container runner installation (Kubernetes)
97
:page-layout: classic-docs
@@ -12,35 +10,78 @@ contentTags:
1210
:icons: font
1311
:toc: macro
1412
:toc-title:
13+
:container:
1514

1615
This page describes how to install CircleCI's container runner.
1716

18-
{% include snippets/runner-platform-prerequisites.adoc %}
17+
// {% include snippets/runner-platform-prerequisites.adoc %}
1918

20-
[#installation-instructions]
21-
== Installation instructions
19+
[#prerequisites]
20+
== Prerequisites
2221

23-
1. Add the container runner Helm repo by running `helm repo add container-agent https://packagecloud.io/circleci/container-agent/helm`
22+
{% include snippets/runner/container-runner-prereq.adoc %}
2423

25-
2. Run `helm repo update`
24+
[#self-hosted-runner-terms-agreement]
25+
== Self-hosted runner terms agreement
2626

27-
3. Run `kubectl create namespace circleci` to create the `circleci` Kubernetes namespace
27+
{% include snippets/runner/terms.adoc %}
2828

29-
4. Create a file called `values.yaml` file containing the following:
29+
[#create-namespace-and-resource-class]
30+
== 1. Create namespace and resource class
31+
32+
[.tab.container-runner.Web_app_installation]
33+
--
34+
{% include snippets/runner/install-with-web-app-steps.adoc %}
35+
--
36+
[.tab.container-runner.CLI_installation]
37+
--
38+
{% include snippets/runner/install-with-cli-steps.adoc %}
39+
--
40+
41+
[#container-runner-installation]
42+
== 2. Container runner installation
43+
44+
. Add the container runner Helm repo by running the following command:
45+
+
46+
[source,shell]
47+
----
48+
helm repo add container-agent https://packagecloud.io/circleci/container-agent/helm
49+
----
50+
51+
. Next, run the following:
52+
+
53+
[source,shell]
54+
----
55+
helm repo update
56+
----
57+
58+
. Then, run the following command to create the `circleci` Kubernetes namespace:
59+
+
60+
[source,shell]
61+
----
62+
kubectl create namespace circleci
63+
----
64+
65+
. Create a file called `values.yaml` file containing the following:
3066
+
3167
```yaml
3268
agent:
3369
resourceClasses:
3470
namespace/my-rc:
3571
token: <resource_class_token>
3672
```
73+
74+
. Finally, run the following command:
3775
+
38-
5. Run `helm install container-agent container-agent/container-agent -n circleci -f values.yaml`
76+
[source,shell]
77+
----
78+
helm install container-agent container-agent/container-agent -n circleci -f values.yaml
79+
----
3980

4081
[#container-runner-configuration-example]
4182
== Container runner configuration example
4283

43-
Once you have installed the container runner within your cluster, create and trigger a CircleCI job that uses the Docker executor to validate the installation. The fields you must set for a specific job to run using your self-hosted runners are:
84+
Once you have installed the container runner within your cluster, create and trigger a CircleCI job that uses the Docker executor to validate the installation. The fields you must set for a specific job to run using your container runners are:
4485

4586
* `image:`
4687
* `resource_class: <namespace>/<resource-class>`

jekyll/_cci2/container-runner.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This document is a comprehensive guide to operating and configuring jobs with th
1616
[#running-your-first-job]
1717
== Running your first job with container runner
1818

19-
Follow the instructions outlined on the <<runner-installation#,self-hosted runner installation>> page to download the container runner and run your first job. You can also use the link:https://app.circleci.com/[CircleCI web app] to get started with self-hosted runners.
19+
Follow the instructions outlined on the xref:container-runner-installation#[Container runner installation] page to download the container runner and run your first job. You can also use the link:https://app.circleci.com/[CircleCI web app] to get started with self-hosted runners.
2020

2121
[#sample-configuration-container-agent]
2222
== Container runner sample configuration
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
contentTags:
3+
platform:
4+
- Cloud
5+
- Server v4.x
6+
- Server v3.x
7+
---
8+
= CircleCI convenience images support policy
9+
:page-layout: classic-docs
10+
:page-liquid:
11+
:page-description: CircleCI Convenience Images release, update, and deprecation policy
12+
:icons: font
13+
:toc: macro
14+
:toc-title:
15+
16+
[#overview]
17+
== Overview
18+
19+
This document outlines the xref:circleci-images#[CircleCI Docker convenience images] release, update, and deprecation policy.
20+
21+
This policy applies to all CircleCI convenience images we publish to the `cimg` namespace on Docker Hub.
22+
23+
[#base-images]
24+
== Base images
25+
26+
Our Docker convenience images are all built upon our base image, `cimg/base`. This image is in turn built upon the official Ubuntu docker image.
27+
28+
We aim to build variants of this image for all LTS versions of Ubuntu that are being maintained in “Standard Support” status. We will stop building variants of `cimg/base` with Ubuntu LTS versions that drop out of support.
29+
30+
When a new Ubuntu LTS version is released, the child CircleCI convenience images will have the underlying base image switched to this version around 6 months after the first release of the `cimg/base` variant.
31+
32+
By building all of our convenience images on top of a common image, we increase the chance of the underlying base layers being cached by the execution environment, therefore increasing the spin up speed for the job.
33+
34+
We build a new base image each month. However, we only update the base image used in child convenience images once per quarter. These updates are not retroactively applied to existing images, but will apply to new releases of the image after the change has been made.
35+
36+
We encourage users who are building their own images for use on CircleCI to use our `cimg/base` image as a starting point.
37+
38+
[#release-policy]
39+
== Release policy
40+
41+
We track new releases of languages and aim to provide new convenience images that support these new releases within 48 hours. Please note that this is not an SLA (service level agreement). We can not, and do not, provide an official SLA turnaround time for new convenience images.
42+
43+
For our deployment focused images, we provide a new image once per month.
44+
45+
We do not provide new image releases for alpha, beta, preview or release candidates of languages.
46+
47+
[#tagging]
48+
== Tagging
49+
50+
Each image is tagged with the specific `major.minor.patch` version of the language it contains. We also provide `major.minor` tags, which always point to the latest patch release of the image.
51+
52+
In special cases, we also provide additional tags, such as `lts` or `current`, which track releases as per the tagging scheme of the parent project.
53+
54+
We do not provide a `latest`, or `current`, tag for any convenience images, other than special cases as mentioned above. This is by design, and is not something we have plans to implement in the future. We do this to ensure that jobs based on our images are more deterministic in nature, with minimal changes due to us pushing new tags that switch `current` to a new major version, for example. This helps lower the risk of breaking changes occurring when customers have not explicitly updated their configurations.
55+
56+
[#critical-cve-patches]
57+
== Critical CVE patches
58+
59+
When critical CVEs are disclosed that affect the versions of the operating system or software stack in our convenience images, we will investigate the impact that this has on our images being used within CircleCI execution environments.
60+
61+
In most cases, due to the ephemeral and isolated nature of the containers in the environment, it is not necessary to patch these images. We will always communicate our stance on these disclosures on our link:https://discuss.circleci.com/[Discuss Forum].
62+
63+
[#bug-reports-issues-and-prs]
64+
== Bug reports, issues, and PRs
65+
66+
We welcome bug reports and PRs from our community via GitHub for each image. The GitHub repository for each image can be found by visiting the link:https://circleci.com/developer/images[Developer Hub].
67+
68+
As a general rule, minor, non-blocking bugs will be fixed in the next release of the image. For major/blocking changes, we will patch the existing live image, depending on how old the image is.
69+
70+
For issues and PRs that are requesting new features in the image, we ask that justification and scope is provided. Keeping the images small in size and simple to build, whilst providing the most functionality is our main aim.
71+
72+
While we make every effort to respond to issues and PRs in a timely manner, we do not provide an official SLA for this.
73+
74+
[#image-lifespan-eol]
75+
== Image lifespan / EOL
76+
77+
We generally do not remove images from Docker Hub once published, however we encourage customers to follow the projects for the languages they use and update the images in their jobs once the project declares a version as EOL (end-of-life).
78+
79+
For versions that are EOL, we do not issue bug fixes or patches.
80+
81+
[#exceptions]
82+
== Exceptions
83+
84+
​​At any time, we reserve the right to work outside of the information in this document if the circumstances require. In the event that we are required to make an exception to the policy, we will aim to provide as much notice and clarity as possible. In these cases, an announcement will be posted on our Discuss Forum, along with additional outreach, such as an email notice, where possible.

jekyll/_cci2/dynamic-config.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
layout: classic-docs
33
contentTags:
44
platform:
5-
- Cloud
5+
- Cloud
6+
- Server v4.x
7+
- Server v3.x
68
---
79
= Dynamic Configuration
810
:description: Docs page on using Setup Workflows for Dynamic Configuration

jekyll/_cci2/introduction-to-the-circleci-web-app.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ image::web_ui_runner.png[Runner inventory]
129129

130130
New resource classes will require an existing namespace, or creation of a new namespace if no namespace for the organization has been created yet (organizations can only create a single namespace), as well as a label to match your CircleCI job with a type of runner.
131131

132-
In this process you select the environment you are working with (Linux, macOS, etc) and the web app will display the instructions for installing self-hosted runner software. This process is also laid out on the xref:runner-installation#[self-hosted runner] page.
132+
In this process you select the environment you are working with (Linux, macOS, etc) and the web app will display the instructions for installing self-hosted runner software. Learn more and get started with self-hosted runners on the xref:runner-overview#[CircleCI self-hosted runners overview].
133133

134134
image::runnerui_step_four.png[Runner setup]
135135

jekyll/_cci2/openid-connect-tokens.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ CircleCI provides OpenID Connect ID (OIDC) tokens in environment variables. A jo
1919
CircleCI OpenID Connect ID tokens are available in the following environment variables:
2020

2121
* `$CIRCLE_OIDC_TOKEN`
22-
* `$CIRCLE_OIDC_TOKEN_V2`
22+
* `$CIRCLE_OIDC_TOKEN_V2` - Includes a different format for the `sub` claim, See <<format-of-the-openid-connect-id-token>> for full details.
2323

24-
The `$CIRCLE_OIDC_TOKEN_V2` token includes a different format for the `sub` claim, which is highlighted in the table below.
24+
CAUTION: **What about forks?** OIDC tokens will only be generated for forked builds if the **Pass secrets to builds from forked pull requests** setting is enabled. Find this option at **Project settings** > **Advanced**.
2525

2626
[#setting-up-your-cloud-service]
2727
== Setting up your cloud service
@@ -86,6 +86,9 @@ The OpenID Connect ID tokens also contain some https://openid.net/specs/openid-c
8686

8787
| `oidc.circleci.com/context-ids`
8888
| An array of strings containing UUIDs that identify the context(s) used in the job. Currently, just one context is supported.
89+
90+
| `oidc.circleci.com/ssh-rerun`
91+
| A boolean indicating if the CI job is started using the SSH rerun feature.
8992
|===
9093

9194

jekyll/_cci2/parallelism-faster-jobs.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Use parallelism and test splitting to:
1515
* Specify a number of [executors](/docs/executor-intro/) across which to split your tests.
1616
* Split your test suite using one of the options provided by the CircleCI CLI: by name, size or by using timing data.
1717

18+
If you are interested to read about concurrent job runs, see the [Concurrency overview](/docs/concurrency) page.
19+
1820
## Introduction
1921
{: #introduction }
2022

@@ -104,28 +106,21 @@ The first time the tests are run there will be no timing data for the command to
104106
## Manual allocation
105107
{: #manual-allocation }
106108

107-
The CLI looks up the number of available execution environments, along with the current container index (`$CIRCLE_NODE_INDEX`). Then, it uses deterministic splitting algorithms to split the test files across all available containers.
109+
For full control over how tests are split across parallel executors, CircleCI provides two environment variables that you can use in place of the CLI to configure each container individually.
108110

109-
By default, the number of containers is specified by the `parallelism` key in the project configuration file. You can also manually set the number by using the `--total` flag.
111+
* `$CIRCLE_NODE_TOTAL` is the total number of parallel containers being used to run your job.
112+
* `$CIRCLE_NODE_INDEX` is the index of the specific container that is currently running.
110113

111-
```shell
112-
circleci tests split --total=4 test_filenames.txt
113-
```
114+
The CLI looks up the number of available execution environments (`$CIRCLE_NODE_TOTAL`), along with the current container index (`$CIRCLE_NODE_INDEX`). Then, it uses deterministic splitting algorithms to split the test files across all available containers.
115+
116+
The number of containers is specified by the [`parallelism` key](/docs/configuration-reference/#parallelism) in the project configuration file.
114117

115-
Similarly, the current container index is automatically picked up from the `$CIRCLE_NODE_INDEX` environment variable, but can be manually set by using the `--index` flag.
118+
The current container index is automatically picked up from the `$CIRCLE_NODE_INDEX` environment variable, but can be manually set by using the `--index` flag.
116119

117120
```shell
118121
circleci tests split --index=0 test_filenames.txt
119122
```
120123

121-
## Use environment variables to split tests
122-
{: #using-environment-variables-to-split-tests }
123-
124-
For full control over how tests are split across parallel executors, CircleCI provides two environment variables that you can use in place of the CLI to configure each container individually.
125-
126-
* `$CIRCLE_NODE_TOTAL` is the total number of parallel containers being used to run your job.
127-
* `$CIRCLE_NODE_INDEX` is the index of the specific container that is currently running.
128-
129124
Refer to the [Project values and variables](/docs/variables#built-in-environment-variables) page for more details.
130125

131126
## Other ways to split tests

0 commit comments

Comments
 (0)