Skip to content

Commit

Permalink
chore(codebuild): deprecate images that are no longer actively mainta…
Browse files Browse the repository at this point in the history
…ined (aws#28533)

As per these documents, the following build image is not actively maintained, so I added @deprecated tag in this PR.

- `standard`
  - `STANDARD_1_0`
  - `STANDARD_2_0`
  - `STANDARD_3_0`
  - `STANDARD_4_0`
- `amazonlinux2-x86_64-standard`
  - `AMAZON_LINUX_2`
  - `AMAZON_LINUX_2_2`
  - `AMAZON_LINUX_2_3`
- `amazonlinux2-aarch64-standard`
  - `AMAZON_LINUX_2_STANDARD_1_0`

https://github.com/aws/aws-codebuild-docker-images?tab=readme-ov-file#image-maintenance
https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

relates: aws#23096 (comment), aws#16707

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
sakurai-ryo authored and paulhcsun committed Jan 5, 2024
1 parent bdc1c26 commit 1758030
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ interface LinuxArmBuildImageProps {
* @see https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
*/
export class LinuxArmBuildImage implements IBuildImage {
/** Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0". */
/**
* Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0".
* @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0 instead.
* */
public static readonly AMAZON_LINUX_2_STANDARD_1_0 = LinuxArmBuildImage.fromCodeBuildImageId('aws/codebuild/amazonlinux2-aarch64-standard:1.0');
/** Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0". */
public static readonly AMAZON_LINUX_2_STANDARD_2_0 = LinuxArmBuildImage.fromCodeBuildImageId('aws/codebuild/amazonlinux2-aarch64-standard:2.0');
Expand Down
79 changes: 45 additions & 34 deletions packages/aws-cdk-lib/aws-codebuild/lib/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1756,10 +1756,16 @@ import { LinuxArmBuildImage } from './linux-arm-build-image';
* @see https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
*/
export class LinuxBuildImage implements IBuildImage {
/** @deprecated Use LinuxBuildImage.STANDARD_7_0 instead. */
public static readonly STANDARD_1_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:1.0');
/** @deprecated Use LinuxBuildImage.STANDARD_7_0 instead. */
public static readonly STANDARD_2_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:2.0');
/** @deprecated Use LinuxBuildImage.STANDARD_7_0 instead. */
public static readonly STANDARD_3_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:3.0');
/** The `aws/codebuild/standard:4.0` build image. */
/**
* The `aws/codebuild/standard:4.0` build image.
* @deprecated Use LinuxBuildImage.STANDARD_7_0 instead.
* */
public static readonly STANDARD_4_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:4.0');
/** The `aws/codebuild/standard:5.0` build image. */
public static readonly STANDARD_5_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:5.0');
Expand All @@ -1768,84 +1774,89 @@ export class LinuxBuildImage implements IBuildImage {
/** The `aws/codebuild/standard:7.0` build image. */
public static readonly STANDARD_7_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:7.0');

/** @deprecated Use LinuxBuildImage.AMAZON_LINUX_2_5 instead. */
public static readonly AMAZON_LINUX_2 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:1.0');
/** @deprecated Use LinuxBuildImage.AMAZON_LINUX_2_5 instead. */
public static readonly AMAZON_LINUX_2_2 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:2.0');
/** The Amazon Linux 2 x86_64 standard image, version `3.0`. */
/**
* The Amazon Linux 2 x86_64 standard image, version `3.0`.
* @deprecated Use LinuxBuildImage.AMAZON_LINUX_2_5 instead.
* */
public static readonly AMAZON_LINUX_2_3 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:3.0');
/** The Amazon Linux 2 x86_64 standard image, version `4.0`. */
public static readonly AMAZON_LINUX_2_4 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:4.0');
/** The Amazon Linux 2 x86_64 standard image, version `5.0`. */
public static readonly AMAZON_LINUX_2_5 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:5.0');

/** @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0 instead. */
/** @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0 instead. */
public static readonly AMAZON_LINUX_2_ARM = LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0;
/**
* Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0".
* @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_2_0 instead.
* @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0 instead.
* */
public static readonly AMAZON_LINUX_2_ARM_2 = LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_2_0;
/** @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0 instead. */
public static readonly AMAZON_LINUX_2_ARM_3 = LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0;

/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_BASE = LinuxBuildImage.codeBuildImage('aws/codebuild/ubuntu-base:14.04');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_ANDROID_JAVA8_24_4_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/android-java-8:24.4.1');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_ANDROID_JAVA8_26_1_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/android-java-8:26.1.1');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_DOCKER_17_09_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/docker:17.09.0');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_DOCKER_18_09_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/docker:18.09.0');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_GOLANG_1_10 = LinuxBuildImage.codeBuildImage('aws/codebuild/golang:1.10');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_GOLANG_1_11 = LinuxBuildImage.codeBuildImage('aws/codebuild/golang:1.11');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_OPEN_JDK_8 = LinuxBuildImage.codeBuildImage('aws/codebuild/java:openjdk-8');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_OPEN_JDK_9 = LinuxBuildImage.codeBuildImage('aws/codebuild/java:openjdk-9');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_OPEN_JDK_11 = LinuxBuildImage.codeBuildImage('aws/codebuild/java:openjdk-11');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_NODEJS_10_14_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/nodejs:10.14.1');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_NODEJS_10_1_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/nodejs:10.1.0');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_NODEJS_8_11_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/nodejs:8.11.0');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_NODEJS_6_3_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/nodejs:6.3.1');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_PHP_5_6 = LinuxBuildImage.codeBuildImage('aws/codebuild/php:5.6');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_PHP_7_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/php:7.0');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_PHP_7_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/php:7.1');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_PYTHON_3_7_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/python:3.7.1');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_PYTHON_3_6_5 = LinuxBuildImage.codeBuildImage('aws/codebuild/python:3.6.5');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_PYTHON_3_5_2 = LinuxBuildImage.codeBuildImage('aws/codebuild/python:3.5.2');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_PYTHON_3_4_5 = LinuxBuildImage.codeBuildImage('aws/codebuild/python:3.4.5');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_PYTHON_3_3_6 = LinuxBuildImage.codeBuildImage('aws/codebuild/python:3.3.6');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_PYTHON_2_7_12 = LinuxBuildImage.codeBuildImage('aws/codebuild/python:2.7.12');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_RUBY_2_5_3 = LinuxBuildImage.codeBuildImage('aws/codebuild/ruby:2.5.3');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_RUBY_2_5_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/ruby:2.5.1');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_RUBY_2_3_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/ruby:2.3.1');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_RUBY_2_2_5 = LinuxBuildImage.codeBuildImage('aws/codebuild/ruby:2.2.5');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_DOTNET_CORE_1_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/dot-net:core-1');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_DOTNET_CORE_2_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/dot-net:core-2.0');
/** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */
/** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */
public static readonly UBUNTU_14_04_DOTNET_CORE_2_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/dot-net:core-2.1');

/**
Expand Down

0 comments on commit 1758030

Please sign in to comment.