-
-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Add Azure DevOps build pipeline #7096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
058df41
Add azure-pipelines.yml to make DevOps happy
ianschmitz 1a8d59f
Merge remote-tracking branch 'upstream/master'
ianschmitz c4d4606
Merge remote-tracking branch 'upstream/master'
ianschmitz 58d5eac
Merge remote-tracking branch 'upstream/master'
ianschmitz 65f9435
Merge remote-tracking branch 'upstream/master'
ianschmitz 409b9b5
Merge remote-tracking branch 'upstream/master'
ianschmitz b9848f2
Merge remote-tracking branch 'upstream/master'
ianschmitz a55dc7a
Merge remote-tracking branch 'upstream/master'
ianschmitz d93d16d
Initial Azure Pipelines CI
willsmythe c878843
Remove unncessary Yarn cache
willsmythe 195267b
clean up comment; fix typo
willsmythe 89c796e
Rename azure pipelines YAML files
willsmythe 9d54940
Add VERDACCIO_PACKAGE override variable to avoid hard-coded URL in ta…
willsmythe 53a0f2f
Fix EOL in verdaccio.yaml
willsmythe ea6d262
Fix random 'unexpected end of file' problem; reduce calls to registry…
willsmythe a20ab53
Only run Behavior tests on mac; only run Old Node tests on Linux
willsmythe 7481a92
update configurations
willsmythe 67673a7
Play with Lerna 3.0 publish args; enable verbose logging
willsmythe a3b6629
Remove --loglevel from lerna publish; used for debugging
willsmythe 582ccf1
Merge pull request #2 from willsmythe/master
ianschmitz cb2dd99
Update e2e publish scripts
ianschmitz f2e485d
Cleanup DevOps (#3)
ianschmitz d7c761a
Simplify mjs test suite
ianschmitz 9191433
Remove unneeded deps from mjs suite
ianschmitz 3b1b29b
PR feedback
ianschmitz 0f3ade2
Swap Travis for Azure DevOps badge
ianschmitz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# | ||
# Azure Pipelines job for building and testing create-react-app on Linux, Windows, and macOS. | ||
# | ||
|
||
parameters: | ||
name: '' | ||
testScript: '' | ||
configurations: | ||
LinuxNode8: { vmImage: 'ubuntu-16.04', nodeVersion: 8.x } | ||
LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x } | ||
WindowsNode8: { vmImage: 'vs2017-win2016', nodeVersion: 8.x } | ||
WindowsNode10: { vmImage: 'vs2017-win2016', nodeVersion: 10.x } | ||
|
||
jobs: | ||
- job: ${{ parameters.name }} | ||
strategy: | ||
matrix: | ||
${{ insert }}: ${{ parameters.configurations }} | ||
pool: | ||
vmImage: $(vmImage) | ||
steps: | ||
- script: | | ||
git config --global core.autocrlf false | ||
git config --global user.name "Create React App" | ||
git config --global user.email "[email protected]" | ||
displayName: 'Initialize Git config' | ||
|
||
- checkout: self | ||
path: create-react-app | ||
|
||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: $(nodeVersion) | ||
displayName: 'Install Node.js' | ||
|
||
- script: yarn --frozen-lockfile | ||
displayName: 'Run yarn' | ||
|
||
- bash: ${{ parameters.testScript }} | ||
displayName: 'Run tests' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# | ||
# Azure Pipelines configuration for building and testing create-react-app on Linux, Windows, and macOS. | ||
# | ||
|
||
trigger: | ||
- master | ||
|
||
variables: | ||
CI: true | ||
# Overrides the Yarn and NPM cache directories so they are on the same drive as the source. This helps improve build performance on Windows hosted agents. | ||
YARN_CACHE_FOLDER: $(Build.SourcesDirectory)/../yarn-cache | ||
NPM_CONFIG_CACHE: $(Build.SourcesDirectory)/../npm-cache | ||
# Sets TEMP to be on the same drive as the cloned source on Windows. This avoids test scripts that "cd" into a directory under TEMP from failing because this directory is on a different drive from the current directory. | ||
VSTS_OVERWRITE_TEMP: True | ||
# Override Verdaccio package to use. This is temoporary and is needed to avoid socket timeouts on hosted Windows agent (on Azure). This also changes Verdaccio to return a 503 (service unavailable) instead of a 404 (not found) when the connection to the uplink timesout. | ||
VERDACCIO_PACKAGE: https://github.com/willsmythe/verdaccio/releases/download/create-react-app/verdaccio-4.0.0-alpha.8.tgz | ||
|
||
# ****************************************************************************** | ||
# Simple test suite | ||
# ****************************************************************************** | ||
jobs: | ||
- template: azure-pipelines-test-job.yml | ||
parameters: | ||
name: Simple | ||
testScript: tasks/e2e-simple.sh | ||
|
||
# ****************************************************************************** | ||
# Installs test suite | ||
# ****************************************************************************** | ||
- template: azure-pipelines-test-job.yml | ||
parameters: | ||
name: Installs | ||
testScript: tasks/e2e-installs.sh | ||
|
||
# ****************************************************************************** | ||
# Kitchensink test suite | ||
# ****************************************************************************** | ||
- template: azure-pipelines-test-job.yml | ||
parameters: | ||
name: Kitchensink | ||
testScript: tasks/e2e-kitchensink.sh | ||
|
||
# ****************************************************************************** | ||
# Kitchensink Eject test suite | ||
# ****************************************************************************** | ||
- template: azure-pipelines-test-job.yml | ||
parameters: | ||
name: KitchensinkEject | ||
testScript: tasks/e2e-kitchensink-eject.sh | ||
|
||
# ****************************************************************************** | ||
# Behavior test suite | ||
# ****************************************************************************** | ||
- template: azure-pipelines-test-job.yml | ||
parameters: | ||
name: Behavior | ||
testScript: tasks/e2e-behavior.sh | ||
configurations: | ||
LinuxNode8: { vmImage: 'ubuntu-16.04', nodeVersion: 8.x } | ||
LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x } | ||
WindowsNode8: { vmImage: 'vs2017-win2016', nodeVersion: 8.x } | ||
WindowsNode10: { vmImage: 'vs2017-win2016', nodeVersion: 10.x } | ||
MacNode8: { vmImage: 'macOS-10.13', nodeVersion: 8.x } | ||
MacNode10: { vmImage: 'macOS-10.13', nodeVersion: 10.x } | ||
|
||
# ****************************************************************************** | ||
# Old Node test suite | ||
# ****************************************************************************** | ||
- job: OldNode | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: 6.x | ||
displayName: 'Install Node.js 6.x' | ||
- bash: tasks/e2e-old-node.sh | ||
displayName: 'Run tests' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,18 +15,16 @@ cd "$(dirname "$0")" | |
# CLI, app, and test module temporary locations | ||
# http://unix.stackexchange.com/a/84980 | ||
temp_app_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_app_path'` | ||
temp_module_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_module_path'` | ||
custom_registry_url=http://localhost:4873 | ||
original_npm_registry_url=`npm get registry` | ||
original_yarn_registry_url=`yarn config get registry` | ||
|
||
# Load functions for working with local NPM registry (Verdaccio) | ||
source local-registry.sh | ||
|
||
function cleanup { | ||
echo 'Cleaning up.' | ||
ps -ef | grep 'verdaccio' | grep -v grep | awk '{print $2}' | xargs kill -9 | ||
echo 'Cleaning up.' | ||
ps -ef | grep 'react-scripts' | grep -v grep | awk '{print $2}' | xargs kill -9 | ||
cd "$root_path" | ||
npm set registry "$original_npm_registry_url" | ||
yarn config set registry "$original_yarn_registry_url" | ||
# Restore the original NPM and Yarn registry URLs and stop Verdaccio | ||
stopLocalRegistry | ||
} | ||
|
||
# Error messages are redirected to stderr | ||
|
@@ -75,22 +73,11 @@ yarn | |
# First, publish the monorepo. | ||
# ****************************************************************************** | ||
|
||
# Start local registry | ||
tmp_registry_log=`mktemp` | ||
(cd && nohup npx [email protected] -c "$root_path"/tasks/verdaccio.yaml &>$tmp_registry_log &) | ||
# Wait for `verdaccio` to boot | ||
grep -q 'http address' <(tail -f $tmp_registry_log) | ||
|
||
# Set registry to local registry | ||
npm set registry "$custom_registry_url" | ||
yarn config set registry "$custom_registry_url" | ||
|
||
# Login so we can publish packages | ||
(cd && npx [email protected] -u user -p password -e [email protected] -r "$custom_registry_url") | ||
# Start the local NPM registry | ||
startLocalRegistry "$root_path"/tasks/verdaccio.yaml | ||
|
||
# Publish the monorepo | ||
git clean -df | ||
./tasks/publish.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest | ||
publishToLocalRegistry | ||
|
||
# ****************************************************************************** | ||
# Now that we have published them, run all tests as if they were released. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,17 +15,16 @@ cd "$(dirname "$0")" | |
# CLI and app temporary locations | ||
# http://unix.stackexchange.com/a/84980 | ||
temp_app_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_app_path'` | ||
custom_registry_url=http://localhost:4873 | ||
original_npm_registry_url=`npm get registry` | ||
original_yarn_registry_url=`yarn config get registry` | ||
|
||
# Load functions for working with local NPM registry (Verdaccio) | ||
source local-registry.sh | ||
|
||
function cleanup { | ||
echo 'Cleaning up.' | ||
ps -ef | grep 'verdaccio' | grep -v grep | awk '{print $2}' | xargs kill -9 | ||
cd "$root_path" | ||
rm -rf "$temp_app_path" | ||
npm set registry "$original_npm_registry_url" | ||
yarn config set registry "$original_yarn_registry_url" | ||
# Restore the original NPM and Yarn registry URLs and stop Verdaccio | ||
stopLocalRegistry | ||
} | ||
|
||
# Error messages are redirected to stderr | ||
|
@@ -96,22 +95,11 @@ yarn | |
# First, publish the monorepo. | ||
# ****************************************************************************** | ||
|
||
# Start local registry | ||
tmp_registry_log=`mktemp` | ||
(cd && nohup npx [email protected] -c "$root_path"/tasks/verdaccio.yaml &>$tmp_registry_log &) | ||
# Wait for `verdaccio` to boot | ||
grep -q 'http address' <(tail -f $tmp_registry_log) | ||
|
||
# Set registry to local registry | ||
npm set registry "$custom_registry_url" | ||
yarn config set registry "$custom_registry_url" | ||
|
||
# Login so we can publish packages | ||
(cd && npx [email protected] -u user -p password -e [email protected] -r "$custom_registry_url") | ||
# Start the local NPM registry | ||
startLocalRegistry "$root_path"/tasks/verdaccio.yaml | ||
|
||
# Publish the monorepo | ||
git clean -df | ||
./tasks/publish.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest | ||
publishToLocalRegistry | ||
|
||
echo "Create React App Version: " | ||
npx create-react-app --version | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,20 +16,19 @@ cd "$(dirname "$0")" | |
# http://unix.stackexchange.com/a/84980 | ||
temp_app_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_app_path'` | ||
temp_module_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_module_path'` | ||
custom_registry_url=http://localhost:4873 | ||
original_npm_registry_url=`npm get registry` | ||
original_yarn_registry_url=`yarn config get registry` | ||
|
||
# Load functions for working with local NPM registry (Verdaccio) | ||
source local-registry.sh | ||
|
||
function cleanup { | ||
echo 'Cleaning up.' | ||
unset BROWSERSLIST | ||
ps -ef | grep 'verdaccio' | grep -v grep | awk '{print $2}' | xargs kill -9 | ||
ps -ef | grep 'react-scripts' | grep -v grep | awk '{print $2}' | xargs kill -9 | ||
cd "$root_path" | ||
# TODO: fix "Device or resource busy" and remove ``|| $CI` | ||
rm -rf "$temp_app_path" "$temp_module_path" || $CI | ||
npm set registry "$original_npm_registry_url" | ||
yarn config set registry "$original_yarn_registry_url" | ||
# Restore the original NPM and Yarn registry URLs and stop Verdaccio | ||
stopLocalRegistry | ||
} | ||
|
||
# Error messages are redirected to stderr | ||
|
@@ -78,22 +77,11 @@ yarn | |
# First, publish the monorepo. | ||
# ****************************************************************************** | ||
|
||
# Start local registry | ||
tmp_registry_log=`mktemp` | ||
(cd && nohup npx [email protected] -c "$root_path"/tasks/verdaccio.yaml &>$tmp_registry_log &) | ||
# Wait for `verdaccio` to boot | ||
grep -q 'http address' <(tail -f $tmp_registry_log) | ||
|
||
# Set registry to local registry | ||
npm set registry "$custom_registry_url" | ||
yarn config set registry "$custom_registry_url" | ||
|
||
# Login so we can publish packages | ||
(cd && npx [email protected] -u user -p password -e [email protected] -r "$custom_registry_url") | ||
# Start the local NPM registry | ||
startLocalRegistry "$root_path"/tasks/verdaccio.yaml | ||
|
||
# Publish the monorepo | ||
git clean -df | ||
./tasks/publish.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest | ||
publishToLocalRegistry | ||
|
||
# ****************************************************************************** | ||
# Now that we have published them, create a clean app folder and install them. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,20 +16,19 @@ cd "$(dirname "$0")" | |
# http://unix.stackexchange.com/a/84980 | ||
temp_app_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_app_path'` | ||
temp_module_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_module_path'` | ||
custom_registry_url=http://localhost:4873 | ||
original_npm_registry_url=`npm get registry` | ||
original_yarn_registry_url=`yarn config get registry` | ||
|
||
# Load functions for working with local NPM registry (Verdaccio) | ||
source local-registry.sh | ||
|
||
function cleanup { | ||
echo 'Cleaning up.' | ||
unset BROWSERSLIST | ||
ps -ef | grep 'verdaccio' | grep -v grep | awk '{print $2}' | xargs kill -9 | ||
ps -ef | grep 'react-scripts' | grep -v grep | awk '{print $2}' | xargs kill -9 | ||
cd "$root_path" | ||
# TODO: fix "Device or resource busy" and remove ``|| $CI` | ||
rm -rf "$temp_app_path" "$temp_module_path" || $CI | ||
npm set registry "$original_npm_registry_url" | ||
yarn config set registry "$original_yarn_registry_url" | ||
# Restore the original NPM and Yarn registry URLs and stop Verdaccio | ||
stopLocalRegistry | ||
} | ||
|
||
# Error messages are redirected to stderr | ||
|
@@ -78,22 +77,11 @@ yarn | |
# First, publish the monorepo. | ||
# ****************************************************************************** | ||
|
||
# Start local registry | ||
tmp_registry_log=`mktemp` | ||
(cd && nohup npx [email protected] -c "$root_path"/tasks/verdaccio.yaml &>$tmp_registry_log &) | ||
# Wait for `verdaccio` to boot | ||
grep -q 'http address' <(tail -f $tmp_registry_log) | ||
|
||
# Set registry to local registry | ||
npm set registry "$custom_registry_url" | ||
yarn config set registry "$custom_registry_url" | ||
|
||
# Login so we can publish packages | ||
(cd && npx [email protected] -u user -p password -e [email protected] -r "$custom_registry_url") | ||
# Start the local NPM registry | ||
startLocalRegistry "$root_path"/tasks/verdaccio.yaml | ||
|
||
# Publish the monorepo | ||
git clean -df | ||
./tasks/publish.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest | ||
publishToLocalRegistry | ||
|
||
# ****************************************************************************** | ||
# Now that we have published them, create a clean app folder and install them. | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.