Recent update to Code Deploy now breaking build (we made no changes)

0

So we are provisioning a new server for a new project to production, and two days ago we got everything working in production. We have not configured any scripts that cover actual code execution while building our project, but we did add our build script that covers getting a few environment installations in place (update the server, and install a package called yarn)

We have not made any adjustments to the build server yet, because we are not ready for it, but today when rolling out a new update our build server suddenly is crashing on a BASIC task of apt-get update -y

this makes absolutely NO sense from a developer stance, something has had to be done on the AWS side to cause this crash.

I have attached the full logs and our super basic buildspec.yml file of our build

Image
aws/codebuild/standard:4.0

Environment type
Linux

Compute
3 GB memory, 2 vCPUs

Privileged
False

Service role
(not relevant)

Timeout
1 hour 0 minutes

質問済み 3年前785ビュー
2回答
0

After further studying of how apt-get update is crashing on the AWS provided container for Nodejs, I saw that a key is expired for yarn

I contacted the package maintainer and he responded with the following:

Try refreshing your GPG key:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

so for anyone using the Nodejs container image, please make that your first script before running apt-get update

回答済み 3年前
0

I found this solution did not work. The use of 'sudo' in that context produced the error "sudo not found". Without the 'sudo' it worked.
My BuildProject is created via CloudFormation with the following Environment parameters:
"Environment": {
"ComputeType": "BUILD_GENERAL1_SMALL",
"Image": "aws/codebuild/standard:2.0",
"ImagePullCredentialsType": "CODEBUILD",
"Type": "LINUX_CONTAINER"
}

To use the solution posted here I needed to remove the 'sudo' and run the command like this:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -

Coach Spoon

回答済み 3年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ