From 1268b8f9eb6bb6e609b3f0961b22f723db46d9d6 Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 13:47:20 +0100 Subject: [PATCH 01/23] feat: test pipeline --- .trigger | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .trigger diff --git a/.trigger b/.trigger new file mode 100644 index 00000000..e69de29b From 147c7f7435d7aa0eedca5f3ef77dfbc09b9de68d Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 13:53:47 +0100 Subject: [PATCH 02/23] feat: test pipeline From 94ae287c167c5e88ad8146983ede30c64533a70a Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 14:03:07 +0100 Subject: [PATCH 03/23] feat: test pipeline --- ci/codebuild/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 ci/codebuild/test.yml diff --git a/ci/codebuild/test.yml b/ci/codebuild/test.yml new file mode 100644 index 00000000..d250077a --- /dev/null +++ b/ci/codebuild/test.yml @@ -0,0 +1,7 @@ +version: 0.2 +phases: + build: + commands: + - echo Build started on `date` + - echo Build... + - echo Build completed on `date` \ No newline at end of file From 820aa8fc85f0b3aa384ca5c425c43717b473a3ff Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 14:20:14 +0100 Subject: [PATCH 04/23] feat: test pipeline --- ci/codebuild/test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ci/codebuild/test.yml b/ci/codebuild/test.yml index d250077a..35c51756 100644 --- a/ci/codebuild/test.yml +++ b/ci/codebuild/test.yml @@ -3,5 +3,8 @@ phases: build: commands: - echo Build started on `date` - - echo Build... - - echo Build completed on `date` \ No newline at end of file + - echo Tag name is $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_REPO_NAME:${CODEBUILD_WEBHOOK_TRIGGER//\//-} + post_build: + commands: + - echo Build completed on `date` + - echo Pushing the Docker image \ No newline at end of file From 369309a88894180dbda92ef1cd555655396e18bf Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 14:25:39 +0100 Subject: [PATCH 05/23] feat: test pipeline From cb9338dae9b5209388e49b568c81e8fe2551b09c Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 14:34:43 +0100 Subject: [PATCH 06/23] feat: test pipeline --- ci/codebuild/Dockerfile | 2 ++ ci/codebuild/sample_artifact | 1 + ci/codebuild/test.yml | 11 +++++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 ci/codebuild/Dockerfile create mode 100644 ci/codebuild/sample_artifact diff --git a/ci/codebuild/Dockerfile b/ci/codebuild/Dockerfile new file mode 100644 index 00000000..4ef576fa --- /dev/null +++ b/ci/codebuild/Dockerfile @@ -0,0 +1,2 @@ +FROM scratch +ADD sample_artifact . \ No newline at end of file diff --git a/ci/codebuild/sample_artifact b/ci/codebuild/sample_artifact new file mode 100644 index 00000000..a9a39d3c --- /dev/null +++ b/ci/codebuild/sample_artifact @@ -0,0 +1 @@ +this is the built artifact \ No newline at end of file diff --git a/ci/codebuild/test.yml b/ci/codebuild/test.yml index 35c51756..3e8bccc4 100644 --- a/ci/codebuild/test.yml +++ b/ci/codebuild/test.yml @@ -1,10 +1,17 @@ version: 0.2 + +env: + variables: + DOCKER_IMAGE_NAME: "$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_REPO_NAME:${CODEBUILD_WEBHOOK_TRIGGER//\//-}" + phases: build: commands: - echo Build started on `date` - - echo Tag name is $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_REPO_NAME:${CODEBUILD_WEBHOOK_TRIGGER//\//-} + - echo Image name is $DOCKER_IMAGE_NAME + - docker build -t $DOCKER_IMAGE_NAME . post_build: commands: - echo Build completed on `date` - - echo Pushing the Docker image \ No newline at end of file + - echo Pushing the Docker image + - docker push $DOCKER_IMAGE_NAME \ No newline at end of file From edabad3a8bd303cc708a516583beb079703183ff Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 14:38:13 +0100 Subject: [PATCH 07/23] feat: test pipeline --- ci/codebuild/test.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ci/codebuild/test.yml b/ci/codebuild/test.yml index 3e8bccc4..e34d2e26 100644 --- a/ci/codebuild/test.yml +++ b/ci/codebuild/test.yml @@ -1,13 +1,10 @@ version: 0.2 -env: - variables: - DOCKER_IMAGE_NAME: "$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_REPO_NAME:${CODEBUILD_WEBHOOK_TRIGGER//\//-}" - phases: build: commands: - echo Build started on `date` + - export DOCKER_IMAGE_NAME="$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_REPO_NAME:${CODEBUILD_WEBHOOK_TRIGGER//\//-}" - echo Image name is $DOCKER_IMAGE_NAME - docker build -t $DOCKER_IMAGE_NAME . post_build: From 673994192f593d04b286a9cdf30d688806b37e5b Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 14:39:47 +0100 Subject: [PATCH 08/23] feat: test pipeline --- ci/codebuild/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/codebuild/test.yml b/ci/codebuild/test.yml index e34d2e26..4c9fc04c 100644 --- a/ci/codebuild/test.yml +++ b/ci/codebuild/test.yml @@ -6,6 +6,7 @@ phases: - echo Build started on `date` - export DOCKER_IMAGE_NAME="$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_REPO_NAME:${CODEBUILD_WEBHOOK_TRIGGER//\//-}" - echo Image name is $DOCKER_IMAGE_NAME + - cd $CODEBUILD_SRC_DIR - docker build -t $DOCKER_IMAGE_NAME . post_build: commands: From 39cf41450236924e70e64ec83b337c5c6cf56228 Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 14:41:14 +0100 Subject: [PATCH 09/23] feat: test pipeline --- ci/codebuild/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/codebuild/test.yml b/ci/codebuild/test.yml index 4c9fc04c..589f25f4 100644 --- a/ci/codebuild/test.yml +++ b/ci/codebuild/test.yml @@ -6,7 +6,7 @@ phases: - echo Build started on `date` - export DOCKER_IMAGE_NAME="$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_REPO_NAME:${CODEBUILD_WEBHOOK_TRIGGER//\//-}" - echo Image name is $DOCKER_IMAGE_NAME - - cd $CODEBUILD_SRC_DIR + - cd $CODEBUILD_SRC_DIR/ci/codebuild - docker build -t $DOCKER_IMAGE_NAME . post_build: commands: From 6b16cc61e418ca1b554b076483840ae775eb2e21 Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 14:46:01 +0100 Subject: [PATCH 10/23] feat: test pipeline --- ci/codebuild/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/codebuild/test.yml b/ci/codebuild/test.yml index 589f25f4..7f4b8710 100644 --- a/ci/codebuild/test.yml +++ b/ci/codebuild/test.yml @@ -1,6 +1,10 @@ version: 0.2 phases: + prebuild: + commands: + - echo Logging in to Amazon ECR... + - aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com build: commands: - echo Build started on `date` @@ -12,4 +16,5 @@ phases: commands: - echo Build completed on `date` - echo Pushing the Docker image + - $(aws ecr get-login --no-include-email --region $AWS_REGION) - docker push $DOCKER_IMAGE_NAME \ No newline at end of file From 3b16234fdc9f57ad6c8d1ce9284ccde4bfa3dd20 Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 14:47:04 +0100 Subject: [PATCH 11/23] feat: test pipeline --- ci/codebuild/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/codebuild/test.yml b/ci/codebuild/test.yml index 7f4b8710..c46c2295 100644 --- a/ci/codebuild/test.yml +++ b/ci/codebuild/test.yml @@ -1,7 +1,7 @@ version: 0.2 phases: - prebuild: + pre_build: commands: - echo Logging in to Amazon ECR... - aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com From b542117408c5a2e8ef1d2ec91df2cfcf60820ac8 Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 14:57:58 +0100 Subject: [PATCH 12/23] feat: test pipeline From 0cfcfab0dc8b359df23fca723a3fd54bfe7594a2 Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 14:59:00 +0100 Subject: [PATCH 13/23] feat: test pipeline --- ci/codebuild/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/codebuild/test.yml b/ci/codebuild/test.yml index c46c2295..22a3231b 100644 --- a/ci/codebuild/test.yml +++ b/ci/codebuild/test.yml @@ -16,5 +16,4 @@ phases: commands: - echo Build completed on `date` - echo Pushing the Docker image - - $(aws ecr get-login --no-include-email --region $AWS_REGION) - docker push $DOCKER_IMAGE_NAME \ No newline at end of file From 6fce0cb095fb238b08a1db60532dfccc08f23bf3 Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 15:01:03 +0100 Subject: [PATCH 14/23] feat: test pipeline From 82047e583baf437dddf01666bf934295460d748f Mon Sep 17 00:00:00 2001 From: Maxime David Date: Mon, 19 Aug 2024 15:03:03 +0100 Subject: [PATCH 15/23] feat: test pipeline From 889f2f4c788e5d3eb0d8e09f1475f4ca8aca64b5 Mon Sep 17 00:00:00 2001 From: Maxime David Date: Tue, 20 Aug 2024 12:01:00 +0100 Subject: [PATCH 16/23] feat: test pipeline From eb1ab536762d0c2ff4763951a4c07f737c07a66f Mon Sep 17 00:00:00 2001 From: Maxime David Date: Tue, 20 Aug 2024 14:37:13 +0100 Subject: [PATCH 17/23] feat: test pipeline From 1ae2a8ec9a68df67f879f0026d94ecace74aad6b Mon Sep 17 00:00:00 2001 From: Maxime David Date: Fri, 23 Aug 2024 08:43:11 +0000 Subject: [PATCH 18/23] feat: test pipeline From 21364e9e6e2f824dc9fe6892e469147d9564afdd Mon Sep 17 00:00:00 2001 From: Maxime David Date: Fri, 23 Aug 2024 09:02:10 +0000 Subject: [PATCH 19/23] feat: test pipeline --- ci/codebuild/test.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/ci/codebuild/test.yml b/ci/codebuild/test.yml index 22a3231b..a7db889c 100644 --- a/ci/codebuild/test.yml +++ b/ci/codebuild/test.yml @@ -8,6 +8,33 @@ phases: build: commands: - echo Build started on `date` + - echo "CODEBUILD_BATCH_BUILD_IDENTIFIER" + - echo $CODEBUILD_BATCH_BUILD_IDENTIFIER + - echo "CODEBUILD_INITIATOR" + - echo $CODEBUILD_INITIATOR + - echo "CODEBUILD_RESOLVED_SOURCE_VERSION" + - echo $CODEBUILD_RESOLVED_SOURCE_VERSION + - echo "CODEBUILD_SOURCE_REPO_URL" + - echo $CODEBUILD_SOURCE_REPO_URL + - echo "CODEBUILD_SOURCE_VERSION" + - echo $CODEBUILD_SOURCE_VERSION + - echo "CODEBUILD_SRC_DIR" + - echo $CODEBUILD_SRC_DIR + - echo "CODEBUILD_WEBHOOK_ACTOR_ACCOUNT_ID" + - echo $CODEBUILD_WEBHOOK_ACTOR_ACCOUNT_ID + - echo "CODEBUILD_WEBHOOK_BASE_REF" + - echo $CODEBUILD_WEBHOOK_BASE_REF + - echo "CODEBUILD_WEBHOOK_EVENT" + - echo $CODEBUILD_WEBHOOK_EVENT + - echo "CODEBUILD_WEBHOOK_MERGE_COMMIT" + - echo $CODEBUILD_WEBHOOK_MERGE_COMMIT + - echo "CODEBUILD_WEBHOOK_PREV_COMMIT" + - echo $CODEBUILD_WEBHOOK_PREV_COMMIT + - echo "CODEBUILD_WEBHOOK_HEAD_REF" + - echo $CODEBUILD_WEBHOOK_HEAD_REF + - echo "CODEBUILD_WEBHOOK_TRIGGER" + - echo $CODEBUILD_WEBHOOK_TRIGGER + - env - export DOCKER_IMAGE_NAME="$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_REPO_NAME:${CODEBUILD_WEBHOOK_TRIGGER//\//-}" - echo Image name is $DOCKER_IMAGE_NAME - cd $CODEBUILD_SRC_DIR/ci/codebuild @@ -16,4 +43,4 @@ phases: commands: - echo Build completed on `date` - echo Pushing the Docker image - - docker push $DOCKER_IMAGE_NAME \ No newline at end of file + - docker push $DOCKER_IMAGE_NAME From 928b71e2963bcb8b4d74bc017904dd39b4cc9b40 Mon Sep 17 00:00:00 2001 From: Maxime David Date: Fri, 23 Aug 2024 09:39:20 +0000 Subject: [PATCH 20/23] feat: test pipeline From 0506ffbadd73f5fbc678f3e758c865d3b563babb Mon Sep 17 00:00:00 2001 From: Maxime David Date: Fri, 23 Aug 2024 09:42:15 +0000 Subject: [PATCH 21/23] feat: test pipeline From d1b43cb3955e8b15b1fc73820f318ebd73b52933 Mon Sep 17 00:00:00 2001 From: Maxime David Date: Fri, 23 Aug 2024 09:42:20 +0000 Subject: [PATCH 22/23] feat: test pipeline From 51f2c3f3e56badbf03e26675515ebe941eeeac4d Mon Sep 17 00:00:00 2001 From: Maxime David Date: Fri, 23 Aug 2024 09:45:49 +0000 Subject: [PATCH 23/23] feat: test pipeline --- ci/codebuild/test.yml | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/ci/codebuild/test.yml b/ci/codebuild/test.yml index a7db889c..ac856ac7 100644 --- a/ci/codebuild/test.yml +++ b/ci/codebuild/test.yml @@ -8,33 +8,6 @@ phases: build: commands: - echo Build started on `date` - - echo "CODEBUILD_BATCH_BUILD_IDENTIFIER" - - echo $CODEBUILD_BATCH_BUILD_IDENTIFIER - - echo "CODEBUILD_INITIATOR" - - echo $CODEBUILD_INITIATOR - - echo "CODEBUILD_RESOLVED_SOURCE_VERSION" - - echo $CODEBUILD_RESOLVED_SOURCE_VERSION - - echo "CODEBUILD_SOURCE_REPO_URL" - - echo $CODEBUILD_SOURCE_REPO_URL - - echo "CODEBUILD_SOURCE_VERSION" - - echo $CODEBUILD_SOURCE_VERSION - - echo "CODEBUILD_SRC_DIR" - - echo $CODEBUILD_SRC_DIR - - echo "CODEBUILD_WEBHOOK_ACTOR_ACCOUNT_ID" - - echo $CODEBUILD_WEBHOOK_ACTOR_ACCOUNT_ID - - echo "CODEBUILD_WEBHOOK_BASE_REF" - - echo $CODEBUILD_WEBHOOK_BASE_REF - - echo "CODEBUILD_WEBHOOK_EVENT" - - echo $CODEBUILD_WEBHOOK_EVENT - - echo "CODEBUILD_WEBHOOK_MERGE_COMMIT" - - echo $CODEBUILD_WEBHOOK_MERGE_COMMIT - - echo "CODEBUILD_WEBHOOK_PREV_COMMIT" - - echo $CODEBUILD_WEBHOOK_PREV_COMMIT - - echo "CODEBUILD_WEBHOOK_HEAD_REF" - - echo $CODEBUILD_WEBHOOK_HEAD_REF - - echo "CODEBUILD_WEBHOOK_TRIGGER" - - echo $CODEBUILD_WEBHOOK_TRIGGER - - env - export DOCKER_IMAGE_NAME="$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_REPO_NAME:${CODEBUILD_WEBHOOK_TRIGGER//\//-}" - echo Image name is $DOCKER_IMAGE_NAME - cd $CODEBUILD_SRC_DIR/ci/codebuild