Skip to content

Commit 78b9db9

Browse files
authored
Merge pull request #177 from react-native-community/nc/update-orb-development-kit
Update the Orb development kit
2 parents 43c7903 + ec0edd4 commit 78b9db9

File tree

11 files changed

+125
-919
lines changed

11 files changed

+125
-919
lines changed

.circleci/config.yml

Lines changed: 29 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,39 @@
11
version: 2.1
2-
2+
setup: true
33
orbs:
4-
cli: circleci/[email protected]
5-
orb-tools: circleci/orb-tools@2
4+
orb-tools: circleci/[email protected]
5+
shellcheck: circleci/[email protected]
6+
node: circleci/[email protected]
67

7-
jobs:
8-
pack:
9-
executor: cli/default
10-
steps:
11-
- checkout
12-
- orb-tools/pack:
13-
source: src/
14-
destination: packed-orb.yml
15-
- orb-tools/validate:
16-
orb-path: packed-orb.yml
17-
- store_artifacts:
18-
path: packed-orb.yml
19-
- persist_to_workspace:
20-
root: .
21-
paths: .
22-
publish:
23-
docker:
24-
- image: cimg/node:12.22
25-
steps:
26-
- attach_workspace:
27-
at: .
28-
- run:
29-
name: Install latest CircleCI CLI
30-
command: |
31-
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | DESTDIR=~ bash
32-
which ~/circleci
33-
~/circleci --help
34-
- restore_cache:
35-
key: yarn-cache-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
36-
- run:
37-
name: Yarn Install
38-
command: yarn install --non-interactive --cache-folder /tmp/yarn
39-
- save_cache:
40-
paths:
41-
- /tmp/yarn
42-
key: yarn-cache-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
43-
- run:
44-
name: Add Github to known hosts
45-
command: |
46-
mkdir -p ~/.ssh
47-
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts
48-
- run:
49-
name: Publish to CircleCI Orb Registry
50-
command: yarn semantic-release
8+
filters: &filters
9+
tags:
10+
only: /.*/
5111

5212
workflows:
53-
btd:
13+
lint-pack:
5414
jobs:
55-
- pack
56-
57-
- orb-tools/publish:
58-
orb-path: packed-orb.yml
59-
orb-ref: "react-native-community/react-native@dev:${CIRCLE_BRANCH}"
60-
publish-token-variable: CIRCLECI_API_TOKEN
61-
attach-workspace: true
62-
checkout: false
63-
requires: [pack]
64-
filters:
65-
branches:
66-
ignore: master
15+
- orb-tools/lint:
16+
filters: *filters
17+
- orb-tools/pack:
18+
filters: *filters
19+
- orb-tools/review:
20+
exclude: RC002,RC005,RC009
21+
filters: *filters
22+
- shellcheck/check:
23+
filters: *filters
24+
- orb-tools/continue:
25+
pipeline_number: << pipeline.number >>
26+
vcs_type: << pipeline.project.type >>
27+
orb_name: react-native
28+
requires: [orb-tools/lint, orb-tools/pack, orb-tools/review, shellcheck/check]
29+
filters: *filters
6730

68-
- publish:
69-
requires: [pack]
31+
release:
32+
jobs:
33+
- node/run:
34+
yarn-run: semantic-release
35+
version: "20.11"
36+
pkg-manager: yarn
7037
filters:
7138
branches:
7239
only: master

.circleci/test-deploy.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: 2.1
2+
orbs:
3+
orb-tools: circleci/[email protected]
4+
# The orb definition is intentionally not included here. It will be injected into the pipeline.
5+
react-native: {}
6+
7+
filters: &filters
8+
tags:
9+
only: /.*/
10+
11+
# Filter for release tags.
12+
release-filters: &release-filters
13+
branches:
14+
ignore: /.*/
15+
tags:
16+
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/
17+
18+
jobs:
19+
command-test:
20+
docker:
21+
- image: cimg/node:current
22+
steps:
23+
- checkout
24+
- react-native/yarn_install
25+
26+
workflows:
27+
test-deploy:
28+
jobs:
29+
- command-test:
30+
filters: *filters
31+
32+
- orb-tools/pack:
33+
filters: *release-filters
34+
35+
- orb-tools/publish:
36+
orb_name: react-native-community/react-native
37+
vcs_type: << pipeline.project.type >>
38+
pub_type: production
39+
requires:
40+
- orb-tools/pack
41+
- command-test
42+
context: orb-publishing
43+
filters: *release-filters

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,3 @@ $RECYCLE.BIN/
126126
*.lnk
127127

128128
# End of https://www.gitignore.io/api/macos,windows,linux,node
129-
130-
/packed-orb.yml

.releaserc

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@
99
"npmPublish": false
1010
}
1111
],
12-
[
13-
"semantic-release-circleci-orb",
14-
{
15-
"commandName": "/home/circleci/circleci",
16-
"orbName": "react-native-community/react-native",
17-
"orbPath": "packed-orb.yml"
18-
}
19-
],
2012
"@semantic-release/github",
2113
[
2214
"@semantic-release/git",
@@ -26,4 +18,4 @@
2618
}
2719
]
2820
]
29-
}
21+
}

.yamllint

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extends: relaxed
2+
3+
rules:
4+
line-length:
5+
max: 200
6+
allow-non-breakable-inline-mappings: true
7+

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
"private": true,
55
"description": "A CircleCI Orb which can be used to simplify building and testing React Native apps.",
66
"scripts": {
7-
"pack": "./scripts/pack.sh",
87
"semantic-release": "semantic-release"
98
},
109
"devDependencies": {
1110
"@semantic-release/changelog": "^5.0.1",
1211
"@semantic-release/git": "^9.0.0",
13-
"semantic-release": "^17.4.2",
14-
"semantic-release-circleci-orb": "^1.1.1"
12+
"semantic-release": "^17.4.2"
1513
},
1614
"repository": {
1715
"type": "git",

scripts/pack.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/examples/android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ usage:
7272
# Note: This is a job which is defined above and not part of the Orb
7373
- fastlane_release:
7474
requires:
75-
- rn/android_test
75+
- rn/android_test

src/examples/full.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ usage:
1010
# Custom jobs which are not part of the Orb
1111
jobs:
1212
checkout_code:
13-
executor:
13+
executor:
1414
name: rn/linux_js
1515
node_version: '16'
1616
steps:

src/examples/ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ usage:
8282
# Note: This is a job which is defined above and not part of the Orb
8383
- fastlane_release:
8484
requires:
85-
- rn/ios_build_and_test
85+
- rn/ios_build_and_test

0 commit comments

Comments
 (0)