Skip to content

Commit 2869642

Browse files
authored
Merge branch 'microsoft:main' into main
2 parents 5f905ef + 06926fb commit 2869642

Some content is hidden

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

60 files changed

+206
-3531
lines changed

.ado/android-pr.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ variables:
1818
jobs:
1919
- job: AndroidRNPR
2020
displayName: Android React Native PR
21-
pool:
22-
vmImage: $(VmImageUbuntu)
21+
pool: $(PoolUbuntu)
2322
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
2423
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
2524
steps:
@@ -58,7 +57,7 @@ jobs:
5857
- task: CmdLine@2
5958
displayName: 'Verify Dependencies can be enumerated'
6059
inputs:
61-
script: sudo apt-get install python3-pip && sudo apt-get install python3-setuptools && pip3 install BeautifulSoup4 && pip3 install wheel && pip3 install wget && python3 android-patches/patching-tool/scripts/downloadDependencies.py $(Build.SourcesDirectory) && tree $(Build.SourcesDirectory)/android
60+
script: sudo apt-get install python3-pip && sudo apt-get install python3-setuptools && pip3 install BeautifulSoup4 && pip3 install wheel && pip3 install wget && python3 .ado/downloadAndroidDependencies.py $(Build.SourcesDirectory) && tree $(Build.SourcesDirectory)/android
6261

6362

6463
# Very similar to the default pack task .. but appends 'ndk21' to the nuget pack version
@@ -80,7 +79,7 @@ jobs:
8079
BUILD_SOURCESDIRECTORY: $(Build.SourcesDirectory)
8180
BUILD_SOURCEBRANCH: $(Build.SourceBranch)
8281
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
83-
githubApiToken: $(githubApiToken)
82+
githubApiToken: $(githubAuthToken)
8483

8584
# In RN64 "clean" task tries to run the build again. It is reproing in 0.64-stable branch but fixed in 0.65-stable.
8685
# I can't zero on the exact cause .. but turns out the issue is with rntester clean task.

.ado/publish.yml

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# It is expected that a `latestStableBranch` variable is set in the pipeline's settings:
2-
# https://dev.azure.com/ms/react-native/_apps/hub/ms.vss-build-web.ci-designer-hub?pipelineId=221
2+
# https://dev.azure.com/office/ISS/_apps/hub/ms.vss-build-web.ci-designer-hub?pipelineId=18541
33

44
# This file defines the build steps to publish a release
55
name: $(Date:yyyyMMdd).$(Rev:.r)
@@ -18,14 +18,23 @@ pr: none
1818

1919
variables:
2020
- template: variables/vars.yml
21+
- group: React-native-macos Secrets
22+
- group: InfoSec-SecurityResults
23+
- name: tags
24+
value: production,externalfacing
2125

2226
jobs:
2327
- job: RNGithubNpmJSPublish
2428
displayName: React-Native GitHub Publish to npmjs.org
2529
pool:
2630
vmImage: $(VmImageApple)
31+
variables:
32+
- name: BUILDSECMON_OPT_IN
33+
value: true
2734
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
2835
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
36+
dependsOn:
37+
- Compliance
2938
steps:
3039
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
3140
clean: true # whether to fetch clean each time
@@ -111,17 +120,18 @@ jobs:
111120
BUILD_STAGINGDIRECTORY: $(Build.StagingDirectory)
112121
BUILD_SOURCEBRANCH: $(Build.SourceBranch)
113122
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
114-
githubApiToken: $(githubApiToken)
123+
githubApiToken: $(githubAuthToken)
115124
condition: and(succeeded(), ne(variables['Build.SourceBranchName'], 'main'))
116125

117126

118127
- job: RNMacOSInitNpmJSPublish
119128
displayName: react-native-macos-init Publish to npmjs.org
120-
pool:
121-
vmImage: $(VmImageUbuntu)
129+
pool: Azure-Pipelines-EO-Ubuntu20.04-Office
122130
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
123131
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
124132
condition: eq(variables['Build.SourceBranchName'], 'main')
133+
dependsOn:
134+
- Compliance
125135
steps:
126136
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
127137
clean: true # whether to fetch clean each time
@@ -146,6 +156,11 @@ jobs:
146156
cd packages/react-native-macos-init
147157
yarn build
148158
159+
- task: CmdLine@2
160+
displayName: Code tested in other pipeline [test]
161+
inputs:
162+
script: echo "This code is tested as part of an integration test. See the 'Verify react-native-macos-init' task."
163+
149164
- task: CmdLine@2
150165
displayName: "Publish react-native-macos-init to npmjs.org"
151166
inputs:
@@ -166,10 +181,11 @@ jobs:
166181

167182
- job: RNGithubOfficePublish
168183
displayName: React-Native GitHub Publish to Office
169-
pool:
170-
vmImage: $(VmImageUbuntu)
184+
pool: Azure-Pipelines-EO-Ubuntu20.04-Office
171185
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
172186
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
187+
dependsOn:
188+
- Compliance
173189
steps:
174190
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
175191
clean: true # whether to fetch clean each time
@@ -202,7 +218,7 @@ jobs:
202218
- task: CmdLine@2
203219
displayName: 'Verify Dependencies can be enumerated'
204220
inputs:
205-
script: sudo apt-get install python3-pip && sudo apt-get install python3-setuptools && pip3 install BeautifulSoup4 && pip3 install wheel && pip3 install wget && python3 android-patches/patching-tool/scripts/downloadDependencies.py $(Build.SourcesDirectory) && tree $(Build.SourcesDirectory)/android
221+
script: sudo apt-get install python3-pip && sudo apt-get install python3-setuptools && pip3 install BeautifulSoup4 && pip3 install wheel && pip3 install wget && python3 .ado/downloadAndroidDependencies.py $(Build.SourcesDirectory) && tree $(Build.SourcesDirectory)/android
206222

207223

208224
# Very similar to the default pack task .. but appends 'ndk21b' to the nuget pack version
@@ -220,7 +236,7 @@ jobs:
220236
BUILD_SOURCESDIRECTORY: $(Build.SourcesDirectory)
221237
BUILD_SOURCEBRANCH: $(Build.SourceBranch)
222238
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
223-
githubApiToken: $(githubApiToken)
239+
githubApiToken: $(githubAuthToken)
224240

225241
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
226242
displayName: 📒 Generate Manifest
@@ -232,3 +248,15 @@ jobs:
232248
inputs:
233249
PathtoPublish: '$(Build.StagingDirectory)/final'
234250
ArtifactName: 'ReactNative-Final'
251+
252+
- job: Compliance
253+
displayName: React-Native GitHub Compliance pipeline
254+
pool: OE-OfficePublic
255+
timeoutInMinutes: 15 # how long to run the job before automatically cancelling
256+
steps:
257+
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
258+
clean: true # whether to fetch clean each time
259+
fetchDepth: 10 # the depth of commits to ask Git to fetch
260+
lfs: false # whether to download Git-LFS files
261+
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
262+
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch

.ado/templates/apple-droid-node-patching.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ steps:
55
- task: CmdLine@2
66
displayName: Apply Android specific patches for Office consumption
77
inputs:
8-
script: node $(System.DefaultWorkingDirectory)/android-patches/patching-tool/bundle/bundle.js patch $(System.DefaultWorkingDirectory) Build OfficeRNHost V8 Focus MAC ImageColor JniUtils RootViewAttach --patch-store $(System.DefaultWorkingDirectory)/android-patches/patches --log-folder $(System.DefaultWorkingDirectory)/android-patches/logs --confirm ${{ parameters.apply_office_patches }}
8+
script: npm_config_yes=true npx @rnx-kit/draft-patch-rnmacos patch $(System.DefaultWorkingDirectory) Build OfficeRNHost V8 Focus MAC ImageColor JniUtils RootViewAttach --patch-store $(System.DefaultWorkingDirectory)/android-patches/patches --log-folder $(System.DefaultWorkingDirectory)/android-patches/logs --confirm ${{ parameters.apply_office_patches }}

.ado/templates/apple-job-javascript.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ steps:
1616
displayName: 'yarn install'
1717

1818
- task: CmdLine@2
19-
displayName: yarn test-ci
19+
displayName: yarn test-ci [test]
2020
inputs:
2121
script: 'yarn test-ci'
2222

.ado/templates/react-native-macos-init.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ steps:
9999
workingDirectory: $(Agent.BuildDirectory)/testcli
100100

101101
- task: CmdLine@2
102-
displayName: Run macos
102+
displayName: Run macos [test]
103103
inputs:
104104
script: npx react-native run-macos
105105
workingDirectory: $(Agent.BuildDirectory)/testcli

.ado/variables/vars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
variables:
22
VmImageApple: macOS-11
3-
VmImageUbuntu: ubuntu-20.04
3+
PoolUbuntu: cxe-ubuntu-20-04-small
44
slice_name: 'Xcode_13_1'
55
xcode_version: '/Applications/Xcode_13.1.app'

.circleci/config.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,9 @@ jobs:
336336
- run:
337337
name: "Run Tests: JavaScript Tests"
338338
command: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
339-
- run_e2e:
340-
platform: js
339+
# TODO(macOS GH#949): Disable this failing test
340+
# - run_e2e:
341+
# platform: js
341342

342343
# Optionally, run disabled tests
343344
- when:
@@ -823,11 +824,12 @@ workflows:
823824
# run_detox_tests: true
824825
# requires:
825826
# - setup_ios
826-
- test_js:
827-
name: test_js_prev_lts
828-
executor: nodeprevlts
829-
requires:
830-
- setup_js
827+
# TODO(macOS GH#949): Disable this failing test
828+
# - test_js:
829+
# name: test_js_prev_lts
830+
# executor: nodeprevlts
831+
# requires:
832+
# - setup_js
831833
- test_docker:
832834
filters:
833835
branches:

.config/CredScanSuppressions.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"tool": "Credential Scanner",
3+
"suppressions": [
4+
{
5+
"file": "keystores/debug.keystore",
6+
"_justification": "Debug key needed for android. Does not contain a particular secret"
7+
},
8+
{
9+
"file": "template/android/app/debug.keystore",
10+
"_justification": "Debug key needed for android. Does not contain a particular secret"
11+
},
12+
{
13+
"file": "packages/rn-tester/android/app/gradle.properties",
14+
"_justification": "Debug key needed for android. Does not contain a particular secret"
15+
},
16+
{
17+
"file": "packages/rn-tester/android/app/my-release-key.keystore",
18+
"_justification": "Debug key needed for android. Does not contain a particular secret"
19+
}
20+
]
21+
}

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ main, *-stable ]
16+
branches: [ main ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
1919
branches: [ main ]

0 commit comments

Comments
 (0)