Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
44a3438
chore: cache sample
awsluja Mar 16, 2023
8e4712e
chore: update sample cache
awsluja Mar 16, 2023
a6901af
chore: test
awsluja Mar 16, 2023
a077dae
chore: test artifacts
awsluja Mar 16, 2023
42b3dc7
chore: rename file
awsluja Mar 16, 2023
c0b222d
ci: testing s3 bucket
Mar 17, 2023
8c7842c
chore: fix build issue
Mar 17, 2023
432ec03
ci: implement caching solution
Mar 17, 2023
9f90025
ci: test
Mar 17, 2023
dba365c
ci: fix config
Mar 17, 2023
692ce51
ci: try another way to run buildlinux
Mar 17, 2023
0f33686
ci: fix path
Mar 17, 2023
aeb738c
ci: fix source
Mar 17, 2023
35a1bbe
ci: fix sh file header
Mar 17, 2023
8d9e144
ci: switch source to dot
Mar 17, 2023
ec65b42
ci: remove use of local
Mar 17, 2023
1b9d58f
ci: update s3 pathing
Mar 17, 2023
e475ee7
ci: remove function
Mar 17, 2023
986406b
ci: try again
Mar 17, 2023
cbf6afa
ci: specify bash
Mar 17, 2023
d2761c0
ci: bash test
Mar 17, 2023
bffdbfa
ci: remove parenthesis
Mar 17, 2023
f3f7981
ci: updated the cache to load
Mar 17, 2023
f34788b
ci: fix
Mar 17, 2023
0ce3ce5
ci: mute cache
Mar 17, 2023
68a8019
ci: fix
Mar 17, 2023
1b2703c
ci: update cache
Mar 20, 2023
450f132
ci: cleanup
Mar 20, 2023
5165c16
ci: add cache file method, graph updates
Mar 20, 2023
2a47d62
ci: graph updates
Mar 20, 2023
4e3ea7b
ci: rune2e sample
Mar 20, 2023
707d782
ci: yml fix
Mar 20, 2023
c45c509
ci: fix
Mar 20, 2023
4afa772
ci: fix
Mar 20, 2023
5ce53e0
ci: fix
Mar 20, 2023
4e63f65
ci: add validate
Mar 20, 2023
f81bd31
ci: fix
Mar 20, 2023
45a8eb5
ci: fix file names
Mar 20, 2023
503aeb9
ci: fix publish
Mar 21, 2023
9e2e16b
ci: test
Mar 21, 2023
5c91613
ci: fix pwd
Mar 21, 2023
a8c7b3d
ci: fix
Mar 21, 2023
a90d802
ci: fix
Mar 21, 2023
52c0be1
ci: test branch name
awsluja Mar 22, 2023
8402e59
ci: test branch
awsluja Mar 22, 2023
191870e
ci: test branch env var
awsluja Mar 22, 2023
4bdcfbf
ci: test with updated vars
awsluja Mar 22, 2023
f0ec504
ci: test env var
awsluja Mar 22, 2023
4dae2dc
ci: test env var
awsluja Mar 22, 2023
1dfa6ff
ci: re-enable and test
awsluja Mar 22, 2023
cd2a0c9
ci: try something else for publish
awsluja Mar 22, 2023
295a585
ci: test
awsluja Mar 22, 2023
b054d30
ci: try without caching verdaccio
awsluja Mar 22, 2023
28c8373
ci: try new path to verdaccio cache
awsluja Mar 22, 2023
9c36273
ci: disable sourcing invalid bash_env
awsluja Mar 22, 2023
3ef460c
ci: move env vars into correct file
awsluja Mar 22, 2023
147589d
Merge branch 'cb' into aluja/cb
aws-eddy Mar 22, 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
5 changes: 3 additions & 2 deletions .circleci/local_publish_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ [email protected]

function startLocalRegistry {
# Start local registry
tmp_registry_log=$(mktemp)
tmp_registry_log="$(mktemp)"
echo "Registry output file: $tmp_registry_log"
(cd && nohup npx ${VERDACCIO_PACKAGE:-$default_verdaccio_package} -c $1 &>$tmp_registry_log &)
# Wait for Verdaccio to boot
grep -q 'http address' <(tail -f $tmp_registry_log)
sleep 60
# grep -q 'http address' <(tail -f $tmp_registry_log)
}

function uploadPkgCli {
Expand Down
7 changes: 4 additions & 3 deletions .circleci/publish-codebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ elif [[ "$CIRCLE_BRANCH" =~ ^run-e2e-with-rc\/.* ]] || [[ "$CIRCLE_BRANCH" =~ ^r
force_publish_local_args="--force-publish '@aws-amplify/cli-internal'"
fi
# create release commit and release tags
git checkout codebuild-poc && npx lerna version --preid=rc.$CODEBUILD_RESOLVED_SOURCE_VERSION --exact --conventional-prerelease --conventional-commits --yes --no-push --include-merged-tags --message "chore(release): Publish rc [ci skip]" $(echo $force_publish_local_args) --no-commit-hooks
git checkout "${CODEBUILD_WEBHOOK_TRIGGER#branch/*}" && npx lerna version --preid=rc.$CODEBUILD_RESOLVED_SOURCE_VERSION --exact --conventional-prerelease --conventional-commits --yes --no-push --include-merged-tags --message "chore(release): Publish rc [ci skip]" $(echo $force_publish_local_args) --no-commit-hooks


# if publishing locally to verdaccio
if [[ "$LOCAL_PUBLISH_TO_LATEST" == "true" ]]; then
Expand All @@ -110,10 +111,10 @@ elif [[ "$CIRCLE_BRANCH" =~ ^run-e2e-with-rc\/.* ]] || [[ "$CIRCLE_BRANCH" =~ ^r
lernaPublishExitOnFailure from-package --git-head $CODEBUILD_RESOLVED_SOURCE_VERSION --yes --no-push --dist-tag rc

# push release commit
git push origin "$CIRCLE_BRANCH"
git push origin "${CODEBUILD_WEBHOOK_TRIGGER#branch/*}"

# push release tags
git tag --points-at HEAD | xargs git push origin
else
echo "branch name" "$CIRCLE_BRANCH" "did not match any branch publish rules. Skipping publish"
echo "branch name" "${CODEBUILD_WEBHOOK_TRIGGER#branch/*}" "did not match any branch publish rules. Skipping publish"
fi
2 changes: 1 addition & 1 deletion codebuild_specs/publish_to_local_registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ env:
phases:
build:
commands:
- source ./shared-scripts.sh && source ./.circleci/local_publish_helpers.sh && _publishToLocalRegistry
- source ./shared-scripts.sh && _publishToLocalRegistry

artifacts:
files:
Expand Down
7 changes: 7 additions & 0 deletions codebuild_specs/run_e2e_tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
version: 0.2
env:
shell: bash
variables:
CLI_REGION: us-east-1
TEST_SUITE: src/__tests__/auth_2b.test.ts
AMPLIFY_DIR: $CODEBUILD_SRC_DIR/out
AMPLIFY_PATH: $CODEBUILD_SRC_DIR/out/amplify-pkg-linux-x64
phases:
build:
commands:
- echo $AMPLIFY_DIR
- echo $AMPLIFY_PATH
- source ./shared-scripts.sh && _runE2ETestsLinux
25 changes: 17 additions & 8 deletions shared-scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ function _publishToLocalRegistry {
loadCache repo $CODEBUILD_SRC_DIR
loadCache .cache $HOME/.cache

startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml"
setNpmRegistryUrlToLocal
source ./.circleci/local_publish_helpers.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml"
source ./.circleci/local_publish_helpers.sh && setNpmRegistryUrlToLocal
export LOCAL_PUBLISH_TO_LATEST=true
./.circleci/publish-codebuild.sh
unsetNpmRegistryUrl
Expand All @@ -182,8 +182,15 @@ function _publishToLocalRegistry {
echo Save new amplify Github tag
node scripts/echo-current-cli-version.js > .amplify-pkg-version

echo LS HOME
ls $CODEBUILD_SRC_DIR/..

echo LS REPO
ls $CODEBUILD_SRC_DIR

# copy [verdaccio-cache, changelog, pkgtag to s3]
storeCache $HOME/verdaccio-cache verdaccio-cache
storeCache $CODEBUILD_SRC_DIR/../verdaccio-cache verdaccio-cache

storeCacheFile $CODEBUILD_SRC_DIR/UNIFIED_CHANGELOG.md UNIFIED_CHANGELOG.md
storeCacheFile $CODEBUILD_SRC_DIR/.amplify-pkg-version .amplify-pkg-version
}
Expand All @@ -199,7 +206,8 @@ function _buildBinaries {
# download [repo, yarn, verdaccio from s3]
loadCache repo $CODEBUILD_SRC_DIR
loadCache .cache $HOME/.cache
loadCache verdaccio-cache $HOME/verdaccio-cache
loadCache verdaccio-cache $CODEBUILD_SRC_DIR/../verdaccio-cache

loadCacheFile .amplify-pkg-version $CODEBUILD_SRC_DIR/.amplify-pkg-version
loadCacheFile UNIFIED_CHANGELOG.md $CODEBUILD_SRC_DIR/UNIFIED_CHANGELOG.md

Expand All @@ -222,14 +230,15 @@ function _runE2ETestsLinux {

loadCache repo $CODEBUILD_SRC_DIR
loadCache .cache $HOME/.cache
loadCache verdaccio-cache $HOME/verdaccio-cache
loadCache verdaccio-cache $CODEBUILD_SRC_DIR/../verdaccio-cache

loadCache repo-out $CODEBUILD_SRC_DIR/out
loadCacheFile .amplify-pkg-version $CODEBUILD_SRC_DIR/.amplify-pkg-version
loadCacheFile UNIFIED_CHANGELOG.md $CODEBUILD_SRC_DIR/UNIFIED_CHANGELOG.md

source .circleci/local_publish_helpers.sh
source $BASH_ENV
startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml"
source .circleci/local_publish_helpers.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml"
# source $BASH_ENV

setNpmRegistryUrlToLocal
changeNpmGlobalPath
amplify version
Expand Down