Просмотр исходного кода

Revert "upgrade aws codebuild image versions and omit lfs installation"

This reverts commit 7b635cfbf0024b65728366cc4baf5452e4023951.
Yuki Takei 2 лет назад
Родитель
Сommit
9eb8987c8d

+ 1 - 1
.github/workflows/reusable-app-build-image.yml

@@ -48,7 +48,7 @@ jobs:
         projectName: growi-official-image-builder
       env:
         CODEBUILD__sourceVersion: ${{ inputs.source-version }}
-        CODEBUILD__imageOverride: ${{ (matrix.platform == 'amd64' && 'aws/codebuild/amazonlinux2-x86_64-standard:5.0') || 'aws/codebuild/amazonlinux2-aarch64-standard:3.0' }}
+        CODEBUILD__imageOverride: ${{ (matrix.platform == 'amd64' && 'aws/codebuild/amazonlinux2-x86_64-standard:4.0') || 'aws/codebuild/amazonlinux2-aarch64-standard:2.0' }}
         CODEBUILD__environmentTypeOverride: ${{ (matrix.platform == 'amd64' && 'LINUX_CONTAINER') || 'ARM_CONTAINER' }}
         CODEBUILD__environmentVariablesOverride: '[
           { "name": "IMAGE_TAG", "type": "PLAINTEXT", "value": "docker.io/${{ inputs.image-name }}:${{ inputs.tag-temporary }}-${{ matrix.platform }}" },

+ 5 - 0
apps/app/docker/codebuild/buildspec.yml

@@ -12,6 +12,11 @@ env:
 phases:
   pre_build:
     commands:
+      # install Git LFS
+      - curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash
+      - yum install -y git-lfs
+      # fetch LFS files
+      - git-lfs pull
       # login to docker.io
       - echo ${DOCKER_REGISTRY_PASSWORD} | docker login --username wsmoogle --password-stdin
       # login to ghcr.io

+ 1 - 1
apps/app/docker/codebuild/codebuild.tf

@@ -14,7 +14,7 @@ module "codebuild" {
   buildspec           = "apps/app/docker/codebuild/buildspec.yml"
 
   # https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
-  build_image         = "aws/codebuild/amazonlinux2-x86_64-standard:5.0"
+  build_image         = "aws/codebuild/amazonlinux2-x86_64-standard:4.0"
   build_compute_type  = "BUILD_GENERAL1_LARGE"
 
   privileged_mode     = true