From 5f9ea7739347439b3bbaf97efc51ebc980d53ea8 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 2 Nov 2023 22:25:19 +0100 Subject: [PATCH 01/10] chore(maintenance): pin node 18 in Gitpod --- .gitpod.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index 0591321da9..4a93b6b44a 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,3 +1,4 @@ +image: gitpod/workspace-node-18 tasks: - init: | # Install Nodejs version specified in .nvmrc @@ -15,4 +16,4 @@ vscode: - dbaeumer.vscode-eslint - esbenp.prettier-vscode - firsttris.vscode-jest-runner - - amazonwebservices.aws-toolkit-vscode \ No newline at end of file + - amazonwebservices.aws-toolkit-vscode From 841614053b00504328712a5570e38dd642d7a186 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 2 Nov 2023 22:35:33 +0100 Subject: [PATCH 02/10] chore: fix nvm & make sam install quiet --- .gitpod.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 4a93b6b44a..a3a4ea69d5 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -2,11 +2,14 @@ image: gitpod/workspace-node-18 tasks: - init: | # Install Nodejs version specified in .nvmrc + bash -c ". ~/nvm/nvm.sh \ + && nvm install \ + && nvm alias default" nvm install nvm use # Install AWS SAM CLI - wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip - unzip aws-sam-cli-linux-x86_64.zip -d sam-installation + wget -q https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip + unzip -q aws-sam-cli-linux-x86_64.zip -d sam-installation sudo ./sam-installation/install rm -rf sam-installation aws-sam-cli-linux-* # Install repo dependencies @@ -16,4 +19,3 @@ vscode: - dbaeumer.vscode-eslint - esbenp.prettier-vscode - firsttris.vscode-jest-runner - - amazonwebservices.aws-toolkit-vscode From 3d7951e80654692cc0e88afe5341beaad386f6fc Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 2 Nov 2023 22:41:21 +0100 Subject: [PATCH 03/10] chore: fix nvm command --- .gitpod.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index a3a4ea69d5..196e7d8da0 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,12 +1,9 @@ -image: gitpod/workspace-node-18 tasks: - init: | # Install Nodejs version specified in .nvmrc - bash -c ". ~/nvm/nvm.sh \ + bash -c ". ~/.nvm/nvm.sh \ && nvm install \ && nvm alias default" - nvm install - nvm use # Install AWS SAM CLI wget -q https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip unzip -q aws-sam-cli-linux-x86_64.zip -d sam-installation From f05ebb93ec4143236abb0fe80b74496ea3c35f00 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 2 Nov 2023 23:03:10 +0100 Subject: [PATCH 04/10] chore: switch to fem --- .gitpod.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 196e7d8da0..91f0a46e9b 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,9 +1,9 @@ tasks: - init: | # Install Nodejs version specified in .nvmrc - bash -c ". ~/.nvm/nvm.sh \ - && nvm install \ - && nvm alias default" + fnm install + fnm default + fnm use # Install AWS SAM CLI wget -q https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip unzip -q aws-sam-cli-linux-x86_64.zip -d sam-installation From d5d4e1014eebbada50de53b87db9de890f19e64f Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 2 Nov 2023 23:04:28 +0100 Subject: [PATCH 05/10] chore: add Dockerfile with pinned version --- .gitpod.Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .gitpod.Dockerfile diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000000..52a2733582 --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,7 @@ +# See gitpod image here: https://hub.docker.com/layers/gitpod/workspace-base/latest +FROM gitpod/workspace-base@sha256:d69d08a0e1fa62b6d8db9e7ffe63dc21a58f0242946d945d776a819aec652130 + +USER gitpod + +# Install fnm to manage Node.js versions +RUN curl -fsSL https://fnm.vercel.app/install | bash -s From 07f741b34cda6390d4e312479223283050c9c159 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 2 Nov 2023 23:06:45 +0100 Subject: [PATCH 06/10] chore: change to custom docker file --- .gitpod.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitpod.yml b/.gitpod.yml index 91f0a46e9b..f0783d0acf 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,3 +1,5 @@ +image: + file: .gitpod.Dockerfile tasks: - init: | # Install Nodejs version specified in .nvmrc From 9cd6ad0b658ed155b106ae5e134a3567421a47af Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 2 Nov 2023 23:25:03 +0100 Subject: [PATCH 07/10] chore: remove redundant command --- .gitpod.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index f0783d0acf..61e42041cb 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -4,7 +4,6 @@ tasks: - init: | # Install Nodejs version specified in .nvmrc fnm install - fnm default fnm use # Install AWS SAM CLI wget -q https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip From 11e2ec31718b779193b7e675a73dc59e2fcfb3b4 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 2 Nov 2023 23:30:25 +0100 Subject: [PATCH 08/10] chore: move SAM install to docker file --- .gitpod.Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 52a2733582..ccc594bd0f 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -5,3 +5,9 @@ USER gitpod # Install fnm to manage Node.js versions RUN curl -fsSL https://fnm.vercel.app/install | bash -s + +# Install AWS SAM CLI +wget -q https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip +unzip -q aws-sam-cli-linux-x86_64.zip -d sam-installation +sudo ./sam-installation/install +rm -rf sam-installation aws-sam-cli-linux-* From a4927bc1561170cd3ee2d11ac0290dcb33e7439b Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 2 Nov 2023 23:30:48 +0100 Subject: [PATCH 09/10] chore: remove SAM instructions from init phase --- .gitpod.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 61e42041cb..8cf80f54b6 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -5,11 +5,6 @@ tasks: # Install Nodejs version specified in .nvmrc fnm install fnm use - # Install AWS SAM CLI - wget -q https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip - unzip -q aws-sam-cli-linux-x86_64.zip -d sam-installation - sudo ./sam-installation/install - rm -rf sam-installation aws-sam-cli-linux-* # Install repo dependencies npm run setup-local vscode: From 987fc36124679f1ad153432872cc61ac12c08896 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 2 Nov 2023 23:34:01 +0100 Subject: [PATCH 10/10] chore: fix install command --- .gitpod.Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index ccc594bd0f..3eee81f26c 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -7,7 +7,7 @@ USER gitpod RUN curl -fsSL https://fnm.vercel.app/install | bash -s # Install AWS SAM CLI -wget -q https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip -unzip -q aws-sam-cli-linux-x86_64.zip -d sam-installation -sudo ./sam-installation/install -rm -rf sam-installation aws-sam-cli-linux-* +RUN curl -LO https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip \ + && unzip -q aws-sam-cli-linux-x86_64.zip -d sam-installation \ + && sudo ./sam-installation/install \ + && rm -rf sam-installation aws-sam-cli-linux-*