Skip to content
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

Revert "fix(amplify-frontend-ios): encapsulate path option values with quotes" #13105

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4558111
chore: generate cb tests (#13042)
sobolk Aug 1, 2023
40d24f5
fix(amplify-console-hosting): add missing proxy support (#12510)
jhockett Aug 1, 2023
df42899
test: exclude custom tests on windows, bump memory on windows (#13044)
sobolk Aug 1, 2023
9793be6
chore: move authentication before branch creation in cloud-e2e script…
jhockett Aug 1, 2023
390bf8a
test: fix searchable migration test on code build (#13046)
sobolk Aug 2, 2023
f185a72
fix: amplify app version regex (#13050)
sobolk Aug 2, 2023
b6ea551
fix: update GraphQLTransform input types (#13060)
alharris-at Aug 2, 2023
0366b5c
chore: try this (#13059)
sobolk Aug 3, 2023
d29a075
fix: do not store windows specific package manager extension (#13047)
jhockett Aug 3, 2023
6d5675b
chore: remove unused imports (#13067)
sobolk Aug 3, 2023
7374f2f
fix: dev build (#13069)
sobolk Aug 3, 2023
727a1d3
chore: manual pr build script (#13070)
sobolk Aug 3, 2023
71257ec
ci: rc, release, tagged rc, hotfix workflows (#12918)
awsluja Aug 3, 2023
50b878a
ci: disable release workflows (#13068)
awsluja Aug 3, 2023
62bd0e9
chore: simplify manual pr script (#13072)
sobolk Aug 4, 2023
015bc38
test: remove extra hash (#13071)
sobolk Aug 4, 2023
bf63580
test: lint export rule (#13074)
sobolk Aug 4, 2023
392f0e2
test: enforce no-unused-vars rule (#13076)
sobolk Aug 4, 2023
4fa0ccb
ci: add lint in cb (#13077)
sobolk Aug 5, 2023
2941584
fix: remove error incorrectly swallowed (fixes #13030) (#13041)
jhockett Aug 8, 2023
1c83134
test(cli-core): added tests for utils from cli-core package (#13080)
mzarnawski Aug 8, 2023
e809550
chore: bump data deps (#13075)
dpilch Aug 8, 2023
5013f9a
Revert "test: remove extra hash (#13071)" (#13084)
awsluja Aug 9, 2023
9ee2d04
"chore: merge release commit from main to dev"
Amplifiyer Aug 9, 2023
fd4c473
Merge pull request #13096 from aws-amplify/dev-main-merge-de71c6a620
Amplifiyer Aug 9, 2023
1568581
feat: generate components using graphql
awinberg-aws Jun 30, 2023
1d07ad8
Merge pull request #12973 from aws-amplify/feat/codegen-service-graphql
Amplifiyer Aug 10, 2023
3cb0691
chore(amplify-e2e-tests): update Readme and sample env (#13098)
0618 Aug 10, 2023
76941b9
Revert "fix(amplify-frontend-ios): pass paths to command options as s…
jhockett Aug 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .circleci/cb-publish-step-1-set-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash -e

git config --global user.name aws-amplify-bot
git config --global user.email [email protected]

if [[ "$BRANCH_NAME" =~ ^tagged-release ]]; then
if [[ "$BRANCH_NAME" =~ ^tagged-release-without-e2e-tests\/.* ]]; then
# Remove tagged-release-without-e2e-tests/
export NPM_TAG="${BRANCH_NAME/tagged-release-without-e2e-tests\//}"
elif [[ "$BRANCH_NAME" =~ ^tagged-release\/.* ]]; then
# Remove tagged-release/
export NPM_TAG="${BRANCH_NAME/tagged-release\//}"
fi
if [ -z "$NPM_TAG" ]; then
echo "Tag name is missing. Name your branch with either tagged-release/<tag-name> or tagged-release-without-e2e-tests/<tag-name>"
exit 1
fi

npx lerna version --exact --preid=$NPM_TAG --conventional-commits --conventional-prerelease --yes --no-push --include-merged-tags --message "chore(release): Publish tagged release $NPM_TAG [ci skip]" --no-commit-hooks --force-publish '@aws-amplify/cli-internal'

# @latest release
elif [[ "$BRANCH_NAME" == "release" ]]; then
# create release commit and release tags
npx lerna version --exact --conventional-commits --conventional-graduate --yes --no-push --include-merged-tags --message "chore(release): Publish latest [ci skip]" --no-commit-hooks --force-publish '@aws-amplify/cli-internal'

# release candidate or local publish for testing / building binary
else
# create release commit and release tags
npx lerna version --preid=rc.$(git rev-parse --short HEAD) --exact --conventional-prerelease --conventional-commits --yes --no-push --include-merged-tags --message "chore(release): Publish rc [ci skip]" --no-commit-hooks --force-publish '@aws-amplify/cli-internal'
fi
25 changes: 25 additions & 0 deletions .circleci/cb-publish-step-2-verdaccio.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash -e

# lerna has a bug (https://github.com/lerna/lerna/issues/1066) where failed publishes do not set the exit code properly
# this causes the script to keep running even after failed publishes
# this function forces failed publishes to exit on failure
function lernaPublishExitOnFailure {
# exit on failure
set -e
# run lerna publish with the args that were passed to this function
# duplicate stdout to a temp file
# grep the temp file for the lerna err token and return exit 1 if found (-v option inverts grep exit code)
npx lerna publish "$@" | tee /tmp/publish-results && grep -qvz "lerna ERR!" < /tmp/publish-results
}

npmRegistryUrl=$(npm get registry)
if [[ "$npmRegistryUrl" =~ ^http://localhost ]]; then
# registy URL update changes .yarnrc.yml file
git update-index --assume-unchanged .yarnrc.yml

echo "Publishing to local registry under latest tag"
lernaPublishExitOnFailure from-git --yes --no-push
else
echo "NPM registry url is not pointing to localhost, $npmRegistryUrl"
exit 1
fi
70 changes: 70 additions & 0 deletions .circleci/cb-publish-step-3-npm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/bin/bash -e

# lerna has a bug (https://github.com/lerna/lerna/issues/1066) where failed publishes do not set the exit code properly
# this causes the script to keep running even after failed publishes
# this function forces failed publishes to exit on failure
function lernaPublishExitOnFailure {
# exit on failure
set -e
# run lerna publish with the args that were passed to this function
# duplicate stdout to a temp file
# grep the temp file for the lerna err token and return exit 1 if found (-v option inverts grep exit code)
npx lerna publish "$@" | tee /tmp/publish-results && grep -qvz "lerna ERR!" < /tmp/publish-results
}

# verifies that binaries are uploaded and available before publishing to NPM
function verifyPkgIsAvailable {
# exit on failure
set -e

# read version of @aws-amplify/cli
desiredPkgVersion=$(npx lerna list --scope @aws-amplify/cli --json | jq -r '.[0].version')

# check binaries
# send HEAD requests to check for binary presence
# curl --fail exits with non-zero code and makes this script fail
curl -I --fail https://$PKG_CLI_CLOUDFRONT_URL/$desiredPkgVersion/amplify-pkg-linux-x64.tgz
curl -I --fail https://$PKG_CLI_CLOUDFRONT_URL/$desiredPkgVersion/amplify-pkg-linux-arm64.tgz
curl -I --fail https://$PKG_CLI_CLOUDFRONT_URL/$desiredPkgVersion/amplify-pkg-macos-x64.tgz
curl -I --fail https://$PKG_CLI_CLOUDFRONT_URL/$desiredPkgVersion/amplify-pkg-win-x64.tgz
}

if [[ "$BRANCH_NAME" =~ ^tagged-release ]]; then
if [[ "$BRANCH_NAME" =~ ^tagged-release-without-e2e-tests\/.* ]]; then
# Remove tagged-release-without-e2e-tests/
export NPM_TAG="${BRANCH_NAME/tagged-release-without-e2e-tests\//}"
elif [[ "$BRANCH_NAME" =~ ^tagged-release\/.* ]]; then
# Remove tagged-release/
export NPM_TAG="${BRANCH_NAME/tagged-release\//}"
fi
if [ -z "$NPM_TAG" ]; then
echo "Tag name is missing. Name your branch with either tagged-release/<tag-name> or tagged-release-without-e2e-tests/<tag-name>"
exit 1
fi

# verify that binary has been uploaded
verifyPkgIsAvailable

echo "Publishing to NPM under $NPM_TAG tag"
lernaPublishExitOnFailure from-git --yes --no-push --dist-tag=$NPM_TAG

# @latest release
elif [[ "$BRANCH_NAME" == "release" ]]; then
# verify that binary has been uploaded
verifyPkgIsAvailable

# publish versions that were just computed
lernaPublishExitOnFailure from-git --yes --no-push

# release candidate or local publish for testing / building binary
elif [[ "$BRANCH_NAME" =~ ^run-e2e-with-rc\/.* ]] || [[ "$BRANCH_NAME" =~ ^release_rc\/.* ]]; then

# verify that binary has been uploaded
verifyPkgIsAvailable

# publish versions that were just computed
lernaPublishExitOnFailure from-git --yes --no-push --dist-tag rc
else
echo "branch name" "$BRANCH_NAME" "did not match any branch publish rules."
exit 1
fi
35 changes: 35 additions & 0 deletions .circleci/cb-publish-step-4-push-to-git.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash -e

git config --global user.name aws-amplify-bot
git config --global user.email [email protected]

if [[ "$BRANCH_NAME" =~ ^tagged-release ]] || [[ "$BRANCH_NAME" =~ ^run-e2e-with-rc\/.* ]] || [[ "$BRANCH_NAME" =~ ^release_rc\/.* ]]; then
# push release commit
git push origin "$BRANCH_NAME"

# push release tags
git tag --points-at HEAD | xargs git push origin

# @latest release
elif [[ "$BRANCH_NAME" == "release" ]]; then
# push release commit
git push origin "$BRANCH_NAME"

# push release tags
git tag --points-at HEAD | xargs git push origin

# fast forward main to release
git fetch origin main
git checkout main
git merge release --ff-only
git push origin main

# fast forward hotfix to release
git fetch origin hotfix
git checkout hotfix
git merge release --ff-only
git push origin hotfix
else
echo "branch name" "$BRANCH_NAME" "did not match any branch publish rules."
exit 1
fi
8 changes: 7 additions & 1 deletion .circleci/codebuild-checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ if [[ "$CODEBUILD_SOURCE_VERSION" != "" ]]; then
fi

# Codebuild doesn't checkout the branch by default
if [[ "$CODEBUILD_WEBHOOK_TRIGGER" =~ ^pr/ || "$CODEBUILD_SOURCE_VERSION" =~ ^pr/ || "$CODEBUILD_SOURCE_VERSION_REF" =~ refs/pull/[0-9]+/head$ ]]; then
if [[ "$AMPLIFY_CI_MANUAL_PR_BUILD" == "true" || "$CODEBUILD_WEBHOOK_TRIGGER" =~ ^pr/ || "$CODEBUILD_SOURCE_VERSION" =~ ^pr/ || "$CODEBUILD_SOURCE_VERSION_REF" =~ refs/pull/[0-9]+/head$ ]]; then
# If we're in PR workflow create temporary local branch.
# We detect if we're in PR by looking for pr/<number> pattern in code build env variables
# or by checking if commit is matching refs/pull/<number>/head.
echo "Creating temporary local branch for PR build"
TEMP_BRANCH_NAME=$(cat /proc/sys/kernel/random/uuid)
git checkout -b $TEMP_BRANCH_NAME
elif [[ "$CODEBUILD_WEBHOOK_TRIGGER" == "branch/dev" ]]; then
# We're in E2E workflow triggered after pushing to dev.
echo "Checking out dev"
git checkout dev
elif [[ "$BRANCH_NAME" == "" ]]; then
echo "BRANCH_NAME must be defined for non-PR builds"
exit 1
Expand All @@ -29,5 +33,7 @@ else
git checkout $BRANCH_NAME
fi

git show --summary

echo "Fetching tags"
git fetch --all --tags
4 changes: 3 additions & 1 deletion .circleci/config.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,9 @@ commands:
source $BASH_ENV
- run:
name: Confirm Amplify CLI is installed and available in PATH
command: amplify version
command: |
which amplify
amplify version

rename_binary_for_windows:
description: 'Rename binary for windows'
Expand Down
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,12 @@ workflows:
setup:
when: << pipeline.parameters.setup >>
jobs:
- setup
- setup:
filters:
branches:
only:
- /run-e2e\/.*/
- /pull\/.*
nightly_console_integration_tests:
when: << pipeline.parameters.nightly_console_integration_tests >>
jobs:
Expand Down
Loading