Skip to content

Commit 842c4ee

Browse files
Merge pull request circleci#8466 from circleci/fixes
remove incorrect use of machine: true
2 parents 630fae5 + deac106 commit 842c4ee

6 files changed

+37
-21
lines changed

jekyll/_cci2/migrating-from-github.adoc

+8-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This document provides an overview of how to migrate from GitHub Actions to Circ
1919
[#jobs-and-workflows]
2020
=== Jobs and workflows
2121

22-
Both GitHub Actions and CircleCI share similar concepts around "jobs" and "workflows". A workflow is an end-to-end flow of connected jobs, which in turn consist of commands to achieve an atomic task (e.g. "run unit tests" or "build a Docker image").
22+
Both GitHub Actions and CircleCI share similar concepts around "jobs" and "workflows". A workflow is an end-to-end flow of connected jobs, which in turn consist of commands to achieve an atomic task (for example, "run unit tests" or "build a Docker image").
2323

2424
CircleCI differs primarily in configuration syntax, setting up workflow and job dependencies in a separate section as opposed to inline in the job.
2525

@@ -122,15 +122,17 @@ docker:
122122
- image: cimg/openjdk:17.0
123123
124124
# Linux Ubuntu Executor
125-
machine: true
125+
machine:
126+
image: ubuntu-2004:202010-01
126127
127128
# macOS Executor
128129
macos:
129130
xcode: 14.2.0
130131
131132
# Windows Executor
132-
# NOTE: Orb declaration needed. See docs
133-
executor: win/vs2019
133+
machine:
134+
image: 'windows-server-2022-gui:current'
135+
resource_class: windows.medium # can be medium, large, xlarge, 2xlarge
134136
----
135137

136138
2+| Specifying dependencies/services. All images specified after the first in CircleCI are treated https://circleci.com/docs/configuration-reference/#docker[as dependencies].
@@ -239,8 +241,8 @@ jobs:
239241
webhook: # WEBHOOK
240242
----
241243

242-
2+| Using conditional steps in the workflow. CircleCI offers https://circleci.com/docs/configuration-reference/#the-when-attribute[basic conditions on steps] (e.g., on_success [default], +
243-
on_success, on_failure) as well as https://circleci.com/docs/configuration-reference/#the-when-step[conditional steps] based on parameters. We also have https://circleci.com/docs/reusing-config/#using-the-parameters-declaration[conditional jobs], and +
244+
2+| Using conditional steps in the workflow. CircleCI offers https://circleci.com/docs/configuration-reference/#the-when-attribute[basic conditions on steps] (for example, `on_success` [default], +
245+
`on_success`, `on_failure`) as well as https://circleci.com/docs/configuration-reference/#the-when-step[conditional steps] based on parameters. We also have https://circleci.com/docs/reusing-config/#using-the-parameters-declaration[conditional jobs], and +
244246
currently conditional, parameterized workflows and pipelines https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/conditional-workflows.md[are in preview].
245247

246248
a|

jekyll/_cci2/pipeline-variables.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ commands:
160160

161161
jobs:
162162
daily-message:
163-
machine: true
163+
machine:
164+
image: ubuntu-2004:current
165+
resource_class: large
164166
parameters:
165167
message:
166168
type: string

jekyll/_cci2/private-images.adoc

+6-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ workflows:
9090
9191
jobs:
9292
machine-job:
93-
machine: true
93+
machine:
94+
image: ubuntu-2004:current
95+
resource_class: large
9496
steps:
9597
- docker/check:
9698
docker-username: DOCKERHUB_LOGIN # DOCKER_LOGIN is the default value, if it exists, it automatically would be used.
@@ -109,7 +111,9 @@ Or with the CLI:
109111
version: 2.1
110112
jobs:
111113
build:
112-
machine: true
114+
machine:
115+
image: ubuntu-2004:current
116+
resource_class: large
113117
working_directory: ~/my_app
114118
steps:
115119
# Docker is preinstalled, along with docker-compose

jekyll/_cci2/reusing-config.md

+16-8
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ jobs:
165165
type: integer
166166
default: 1
167167
parallelism: << parameters.p >>
168-
machine: true
168+
docker:
169+
- image: cimg/base:2023.11
169170
steps:
170171
- checkout
171172
workflows:
@@ -298,7 +299,8 @@ commands:
298299
299300
jobs:
300301
build:
301-
machine: true
302+
docker:
303+
- image: cimg/base:2023.11
302304
steps:
303305
- run-tests:
304306
after-deps:
@@ -699,7 +701,8 @@ version: 2.1
699701
# Yaml from foo-orb
700702
executors:
701703
bar:
702-
machine: true
704+
docker:
705+
- image: cimg/base:2023.11
703706
environment:
704707
RUN_TESTS: foobar
705708
```
@@ -793,7 +796,8 @@ jobs:
793796
description: "To whom shall we say hello?"
794797
default: "World"
795798
type: string
796-
machine: true
799+
docker:
800+
- image: cimg/base:2023.11
797801
steps:
798802
- run: echo "Hello << parameters.saywhat >>"
799803
@@ -839,7 +843,8 @@ jobs:
839843
description: "To whom shall we say hello?"
840844
default: "World"
841845
type: string
842-
machine: true
846+
docker:
847+
- image: cimg/base:2023.11
843848
steps:
844849
- saywhat:
845850
saywhat: "<< parameters.saywhat >>"
@@ -925,7 +930,8 @@ jobs:
925930
description: "To whom shall we say hello?"
926931
default: "World"
927932
type: string
928-
machine: true
933+
docker:
934+
- image: cimg/base:2023.11
929935
steps:
930936
- say:
931937
# Since the command "say" doesn't define a default
@@ -996,7 +1002,8 @@ The following example defines pre-steps and post-steps in the `bar` job of the `
9961002
version: 2.1
9971003
jobs:
9981004
bar:
999-
machine: true
1005+
docker:
1006+
- image: cimg/base:2023.11
10001007
steps:
10011008
- checkout
10021009
- run:
@@ -1039,7 +1046,8 @@ jobs:
10391046
preinstall-foo:
10401047
type: boolean
10411048
default: false
1042-
machine: true
1049+
docker:
1050+
- image: cimg/base:2023.11
10431051
steps:
10441052
- run: echo "preinstall is << parameters.preinstall-foo >>"
10451053
- when:

jekyll/_cci2/selecting-a-workflow-to-run-using-pipeline-parameters.adoc

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ parameters:
3333
3434
jobs:
3535
build:
36-
machine: true
36+
docker:
37+
- image: cimg/base:2023.11
3738
steps:
3839
- checkout
3940
- run: ./run-tests.sh
4041
4142
report:
42-
machine: true
43+
docker:
44+
- image: cimg/base:2023.11
4345
steps:
4446
- checkout
4547
- run: ./create-report.sh

jekyll/_data/sidenav.yml

-2
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,6 @@ en:
264264
link: runner-config-reference
265265
- name: How-to Guides
266266
children:
267-
- name: Upgrading machine runner on cloud
268-
link: upgrading-circleci-machine-runner-on-cloud
269267
- name: Upgrade machine runner on server
270268
link: runner-upgrading-on-server
271269
- name: Reference

0 commit comments

Comments
 (0)