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

Feat(amplify migration): script to perform Netlify to Amplify Migration #55

Merged
merged 40 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
97c5e86
chore(package json): add deps
kishore03109 Mar 9, 2023
c1ed647
feat(amplify utils): create utility functions for amplify
kishore03109 Mar 9, 2023
4068182
feat(main migration script): create main script
kishore03109 Mar 9, 2023
50e3011
feat(env-example): add envs
kishore03109 Mar 9, 2023
b6b77d5
docs(readme): update instructions on amplify migration
kishore03109 Mar 9, 2023
70ab387
chore(bash scripts): clean up redundant file
kishore03109 Mar 9, 2023
d7f4199
fix(navigationyml): change URLs in navigation yaml
kishore03109 Mar 9, 2023
bbf7ad1
style(package json): change verb
kishore03109 Mar 10, 2023
dd34da2
chore(dep): add ts-node/eslint dependency
kishore03109 Mar 10, 2023
5b599bb
style(amplify script): destructuring JSDOM
kishore03109 Mar 10, 2023
17c94d5
style(populating of repos to be changed ): reading of csv files
kishore03109 Mar 10, 2023
c4f4d5c
style(vairable naming): change to camelcase
kishore03109 Mar 10, 2023
1cca9a3
style(specifying repo path): using ~ vs HOME env var
kishore03109 Mar 10, 2023
1ef20ef
refactor(glob usage): glob supports await directly
kishore03109 Mar 10, 2023
29fd23b
style(migration script): comment space
kishore03109 Mar 10, 2023
0a96a49
feat(strong typing): add stronger typing after using await glob
kishore03109 Mar 10, 2023
03d9dc7
refactor(code style ): renaming for clarity
kishore03109 Mar 10, 2023
9f5311a
chore(redundant comment ): remove redundant comment
kishore03109 Mar 10, 2023
843230d
style(func name): rename for clarity
kishore03109 Mar 10, 2023
23610b8
chore(comment): delete comment
kishore03109 Mar 10, 2023
37d738d
chore(comment): add space
kishore03109 Mar 10, 2023
ef53d8c
chore(comments): change comments for clarity
kishore03109 Mar 10, 2023
0a662dd
refactor(var rename): var rename for clarity
kishore03109 Mar 10, 2023
2e5906d
refactor(oldPermalink var name): change name for clarity
kishore03109 Mar 10, 2023
7c9bfd9
chore(rename variables ): for clarity
kishore03109 Mar 10, 2023
9d09a84
chore(comment): comment for clarity
kishore03109 Mar 10, 2023
51ec00a
chore(userid via cli): provide useris via cli
kishore03109 Mar 10, 2023
83b071a
chore(env vars): include dotenv deps
kishore03109 Mar 10, 2023
9d802ca
feat(empty repos): defensively check for empty repos
kishore03109 Mar 10, 2023
cfdf399
chore(octokit api version): remove verbose api version
kishore03109 Mar 10, 2023
c02205d
feat(error logging for repo): easier cleanup
kishore03109 Mar 13, 2023
4e3ef1d
style(permalink regex): shift permalink regex out
kishore03109 Mar 13, 2023
aa9302f
feat(remove quotation marks): remove quotation marks for permalinks
kishore03109 Mar 13, 2023
0a77f84
chore(doc): add link to notion documentation
kishore03109 Mar 13, 2023
220bf63
fix(typing ): stronger typing
kishore03109 Mar 13, 2023
53a505c
style(comment): typo in comments
kishore03109 Mar 13, 2023
72769cc
refactor(for loops ): change to map
kishore03109 Mar 13, 2023
363d9ab
build(ts config): add deps and tsconfig
kishore03109 Mar 14, 2023
66708a6
style(cli arg): add csv file path as a cli arg, update readme
kishore03109 Mar 15, 2023
ec50ab7
fix(node_modules): removing previous glob modules
kishore03109 Mar 15, 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
7 changes: 5 additions & 2 deletions .env-example
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
export PERSONAL_ACCESS_TOKEN=""
export GITHUB_ACCESS_TOKEN=""
export USERNAME=""
export GITHUB_ORG_NAME="isomerpages"
export BRANCH_REF="staging"
export RESOURCE_RENAME_BRANCH_REF="resource-file-migration"
export RESOURCE_RENAME_BRANCH_REF="resource-file-migration"

export AWS_ACCESS_KEY_ID="key_id"
export AWS_SECRET_ACCESS_KEY="secret_key"
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Isomer Conversion Tools

## V2 migration

### How to use

1. Source your environment variables. The variables you will require are:
- `PERSONAL_ACCESS_TOKEN` (Github personal access token)

- `GITHUB_ACCESS_TOKEN` (Github personal access token)
- `USERNAME` (Github username)
- `GITHUB_ORG_NAME` (isomerpages)
- `BRANCH_REF` (usually staging)
Expand All @@ -15,3 +19,17 @@ Ideally, this should be done by the designated team account, not with your perso
node migrationScript.js <repo name>
```

## Netlify to Amplify Migration

### How to use

1. Populate environment variables for the following

- `AWS_ACCESS_KEY_ID`
- `AWS_SECRET_ACCESS_KEY`

1. Navigate to src/amplify-migration/amplifyMigrationScript.ts
2. Change the variable `listOfRepos` to the desired repos to be changed
3. Run `npm run amplifyMigration` in the command line
4. Navigate to `src/amplify-migration/sqlcommands.txt`
5. Copy over the appended commands in the file and run them on production DB
2 changes: 1 addition & 1 deletion bash_scripts/jekyll4/migration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if ! brew ls --versions jq; then
echo brew install jq
fi
# check for staging and prod website in repo description
description=$(curl -X GET -u $PERSONAL_ACCESS_TOKEN:x-oauth-basic https://api.github.com/repos/isomerpages/$1 | jq -r '. | .description')
description=$(curl -X GET -u $GITHUB_ACCESS_TOKEN:x-oauth-basic https://api.github.com/repos/isomerpages/$1 | jq -r '. | .description')
if [[ ! -z "$description" ]]; then
IFS='; ' read -r -a array <<< "$description"
for element in "${array[@]}"
Expand Down
55 changes: 0 additions & 55 deletions bash_scripts/trailing_slash/add-trailing-slash.sh

This file was deleted.

Loading