From a93355d240fc43b94aa6ec6bd5b937977c05f645 Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Wed, 14 Aug 2024 10:40:58 +0200 Subject: [PATCH 01/10] test --- .github/workflows/busola-web-build.yml | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/busola-web-build.yml diff --git a/.github/workflows/busola-web-build.yml b/.github/workflows/busola-web-build.yml new file mode 100644 index 0000000000..f56bee2432 --- /dev/null +++ b/.github/workflows/busola-web-build.yml @@ -0,0 +1,45 @@ +name: Busola Web Build + +on: + push: + branches: + - main + paths: + - ".github/workflows/busola-web-build.yml" + - "backend/**" + - "public/**" + - "src/**" + - "tests/**" + - "package.json" + - "Makefile" + - "Dockerfile" + pull_request_target: + types: [opened, edited, synchronize, reopened, ready_for_review] + paths: + - ".github/workflows/busola-web-build.yml" + - "backend/**" + - "public/**" + - "src/**" + - "tests/**" + - "package.json" + - "Makefile" + - "Dockerfile" + +permissions: + id-token: write # This is required for requesting the JWT token + contents: read # This is required for actions/checkout + +jobs: + build-web-image: + uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main + with: + name: busola + dockerfile: Dockerfile + context: . + export-tags: true + test-web-image: + runs-on: ubuntu-latest + needs: build-web-image + steps: + - name: Test image + run: echo "Testing images ${{ needs.build-web-image.outputs.images }}" From c6ceca7003afdfd370f8c69aa6de1198679889a3 Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Wed, 14 Aug 2024 10:46:25 +0200 Subject: [PATCH 02/10] change tag --- Dockerfile | 4 ++-- Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d1451c1db4..00ba7e3cd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # ---- Base Alpine with Node ---- FROM alpine:3.20.2 AS builder -ARG TAG_default_tag +ARG default_tag RUN apk add --update nodejs npm @@ -17,7 +17,7 @@ ENV CI true COPY . /app -RUN sed -i "s/version: dev/version: ${TAG_default_tag}/" public/version.yaml && make resolve validate +RUN sed -i "s/version: dev/version: ${default_tag}/" public/version.yaml && make resolve validate RUN npm run build:docker diff --git a/Makefile b/Makefile index 5d240bf528..bb245f942f 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ release: build-image push-image release-local: build-image-local push-image-local build-image: - docker build --build-arg=TAG_default_tag=$(TAG) -t $(IMG_NAME) -f Dockerfile . + docker build -t $(IMG_NAME) -f Dockerfile . build-image-local: docker build -t $(LOCAL_IMG_NAME) -f Dockerfile.local . From f7763b231e4fef98d8db31a4df6c341aaf270451 Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Wed, 14 Aug 2024 11:03:45 +0200 Subject: [PATCH 03/10] fix name --- .github/workflows/busola-web-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/busola-web-build.yml b/.github/workflows/busola-web-build.yml index f56bee2432..4fc8145588 100644 --- a/.github/workflows/busola-web-build.yml +++ b/.github/workflows/busola-web-build.yml @@ -33,7 +33,7 @@ jobs: build-web-image: uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main with: - name: busola + name: busola-web dockerfile: Dockerfile context: . export-tags: true From 0bd2d73bad8ea3db12da935dd7a5d265a613665b Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Wed, 14 Aug 2024 11:31:51 +0200 Subject: [PATCH 04/10] test --- .github/workflows/busola-web-build.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/busola-web-build.yml b/.github/workflows/busola-web-build.yml index 4fc8145588..f3af0088a9 100644 --- a/.github/workflows/busola-web-build.yml +++ b/.github/workflows/busola-web-build.yml @@ -29,17 +29,4 @@ permissions: id-token: write # This is required for requesting the JWT token contents: read # This is required for actions/checkout -jobs: - build-web-image: - uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main - with: - name: busola-web - dockerfile: Dockerfile - context: . - export-tags: true - test-web-image: - runs-on: ubuntu-latest - needs: build-web-image - steps: - - name: Test image - run: echo "Testing images ${{ needs.build-web-image.outputs.images }}" +#test \ No newline at end of file From 9509303fa8e03627a11196b3148fd4e50bf7179d Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Wed, 14 Aug 2024 11:38:50 +0200 Subject: [PATCH 05/10] test --- .github/workflows/busola-web-build.yml | 35 ++++++++++++-------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/workflows/busola-web-build.yml b/.github/workflows/busola-web-build.yml index f3af0088a9..4487cdfd9c 100644 --- a/.github/workflows/busola-web-build.yml +++ b/.github/workflows/busola-web-build.yml @@ -4,29 +4,26 @@ on: push: branches: - main - paths: - - ".github/workflows/busola-web-build.yml" - - "backend/**" - - "public/**" - - "src/**" - - "tests/**" - - "package.json" - - "Makefile" - - "Dockerfile" + pull_request_target: types: [opened, edited, synchronize, reopened, ready_for_review] - paths: - - ".github/workflows/busola-web-build.yml" - - "backend/**" - - "public/**" - - "src/**" - - "tests/**" - - "package.json" - - "Makefile" - - "Dockerfile" permissions: id-token: write # This is required for requesting the JWT token contents: read # This is required for actions/checkout -#test \ No newline at end of file +jobs: + build-web-image: + uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main + with: + name: busola + dockerfile: Dockerfile + context: . + export-tags: true + test-web-image: + runs-on: ubuntu-latest + needs: build-web-image + steps: + - name: Test image + run: echo "Testing images ${{ needs.build-web-image.outputs.images }}" + \ No newline at end of file From be9afa5a936178cb739a5333f625ed5a99d86893 Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Wed, 14 Aug 2024 11:59:25 +0200 Subject: [PATCH 06/10] restore web-build code --- .github/workflows/busola-web-build.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/busola-web-build.yml b/.github/workflows/busola-web-build.yml index 4487cdfd9c..4fc8145588 100644 --- a/.github/workflows/busola-web-build.yml +++ b/.github/workflows/busola-web-build.yml @@ -4,9 +4,26 @@ on: push: branches: - main - + paths: + - ".github/workflows/busola-web-build.yml" + - "backend/**" + - "public/**" + - "src/**" + - "tests/**" + - "package.json" + - "Makefile" + - "Dockerfile" pull_request_target: types: [opened, edited, synchronize, reopened, ready_for_review] + paths: + - ".github/workflows/busola-web-build.yml" + - "backend/**" + - "public/**" + - "src/**" + - "tests/**" + - "package.json" + - "Makefile" + - "Dockerfile" permissions: id-token: write # This is required for requesting the JWT token @@ -16,7 +33,7 @@ jobs: build-web-image: uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main with: - name: busola + name: busola-web dockerfile: Dockerfile context: . export-tags: true @@ -26,4 +43,3 @@ jobs: steps: - name: Test image run: echo "Testing images ${{ needs.build-web-image.outputs.images }}" - \ No newline at end of file From 0039941fa5ca5ac88683e60ea9a75d4e057a6e16 Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Wed, 14 Aug 2024 12:02:52 +0200 Subject: [PATCH 07/10] test --- .github/workflows/busola-web-build.yml | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/.github/workflows/busola-web-build.yml b/.github/workflows/busola-web-build.yml index 4fc8145588..aa83e1c3d8 100644 --- a/.github/workflows/busola-web-build.yml +++ b/.github/workflows/busola-web-build.yml @@ -1,29 +1,8 @@ name: Busola Web Build on: - push: - branches: - - main - paths: - - ".github/workflows/busola-web-build.yml" - - "backend/**" - - "public/**" - - "src/**" - - "tests/**" - - "package.json" - - "Makefile" - - "Dockerfile" - pull_request_target: + pull_request: types: [opened, edited, synchronize, reopened, ready_for_review] - paths: - - ".github/workflows/busola-web-build.yml" - - "backend/**" - - "public/**" - - "src/**" - - "tests/**" - - "package.json" - - "Makefile" - - "Dockerfile" permissions: id-token: write # This is required for requesting the JWT token From 7c0a8b216362839cec36b2c359b739c190d56fd3 Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Wed, 14 Aug 2024 12:18:55 +0200 Subject: [PATCH 08/10] bring back paths --- .github/workflows/busola-web-build.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/busola-web-build.yml b/.github/workflows/busola-web-build.yml index aa83e1c3d8..4fc8145588 100644 --- a/.github/workflows/busola-web-build.yml +++ b/.github/workflows/busola-web-build.yml @@ -1,8 +1,29 @@ name: Busola Web Build on: - pull_request: + push: + branches: + - main + paths: + - ".github/workflows/busola-web-build.yml" + - "backend/**" + - "public/**" + - "src/**" + - "tests/**" + - "package.json" + - "Makefile" + - "Dockerfile" + pull_request_target: types: [opened, edited, synchronize, reopened, ready_for_review] + paths: + - ".github/workflows/busola-web-build.yml" + - "backend/**" + - "public/**" + - "src/**" + - "tests/**" + - "package.json" + - "Makefile" + - "Dockerfile" permissions: id-token: write # This is required for requesting the JWT token From f46d28bb0fb2feba91365413530e8b7eaac2b2fe Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Fri, 16 Aug 2024 09:27:25 +0200 Subject: [PATCH 09/10] remove test jobs and add backend build --- .github/workflows/busola-backend-build.yml | 40 ++++++++++++++++++++++ .github/workflows/busola-local-build.yml | 6 ---- .github/workflows/busola-web-build.yml | 7 +--- 3 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/busola-backend-build.yml diff --git a/.github/workflows/busola-backend-build.yml b/.github/workflows/busola-backend-build.yml new file mode 100644 index 0000000000..f48fccae69 --- /dev/null +++ b/.github/workflows/busola-backend-build.yml @@ -0,0 +1,40 @@ +name: Busola Backend Build + +on: + push: + branches: + - main + paths: + - ".github/workflows/busola-backend-build.yml" + - "backend/**" + - "public/**" + - "src/**" + - "tests/**" + - "package.json" + - "Makefile" + - "Dockerfile" + pull_request_target: + types: [opened, edited, synchronize, reopened, ready_for_review] + paths: + - ".github/workflows/busola-backend-build.yml" + - "backend/**" + - "public/**" + - "src/**" + - "tests/**" + - "package.json" + - "Makefile" + - "Dockerfile" + +permissions: + id-token: write # This is required for requesting the JWT token + contents: read # This is required for actions/checkout + +jobs: + build-backend-image: + uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main + with: + name: busola-backend + dockerfile: Dockerfile + context: backend + export-tags: true + diff --git a/.github/workflows/busola-local-build.yml b/.github/workflows/busola-local-build.yml index 664b622d21..38614b062e 100644 --- a/.github/workflows/busola-local-build.yml +++ b/.github/workflows/busola-local-build.yml @@ -37,9 +37,3 @@ jobs: dockerfile: Dockerfile.local context: . export-tags: true - test-local-image: - runs-on: ubuntu-latest - needs: build-local-image - steps: - - name: Test image - run: echo "Testing images ${{ needs.build-local-image.outputs.images }}" diff --git a/.github/workflows/busola-web-build.yml b/.github/workflows/busola-web-build.yml index 4fc8145588..1426f06c5d 100644 --- a/.github/workflows/busola-web-build.yml +++ b/.github/workflows/busola-web-build.yml @@ -37,9 +37,4 @@ jobs: dockerfile: Dockerfile context: . export-tags: true - test-web-image: - runs-on: ubuntu-latest - needs: build-web-image - steps: - - name: Test image - run: echo "Testing images ${{ needs.build-web-image.outputs.images }}" + From afa89822091e5f74d6eb6c3f0c6fd0e07f62330c Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Fri, 16 Aug 2024 09:46:29 +0200 Subject: [PATCH 10/10] fix paths --- .github/workflows/busola-backend-build.yml | 10 ---------- .github/workflows/busola-web-build.yml | 4 ---- 2 files changed, 14 deletions(-) diff --git a/.github/workflows/busola-backend-build.yml b/.github/workflows/busola-backend-build.yml index f48fccae69..e422c264a8 100644 --- a/.github/workflows/busola-backend-build.yml +++ b/.github/workflows/busola-backend-build.yml @@ -7,23 +7,13 @@ on: paths: - ".github/workflows/busola-backend-build.yml" - "backend/**" - - "public/**" - - "src/**" - - "tests/**" - "package.json" - - "Makefile" - - "Dockerfile" pull_request_target: types: [opened, edited, synchronize, reopened, ready_for_review] paths: - ".github/workflows/busola-backend-build.yml" - "backend/**" - - "public/**" - - "src/**" - - "tests/**" - "package.json" - - "Makefile" - - "Dockerfile" permissions: id-token: write # This is required for requesting the JWT token diff --git a/.github/workflows/busola-web-build.yml b/.github/workflows/busola-web-build.yml index 1426f06c5d..6b0af58b84 100644 --- a/.github/workflows/busola-web-build.yml +++ b/.github/workflows/busola-web-build.yml @@ -6,10 +6,8 @@ on: - main paths: - ".github/workflows/busola-web-build.yml" - - "backend/**" - "public/**" - "src/**" - - "tests/**" - "package.json" - "Makefile" - "Dockerfile" @@ -17,10 +15,8 @@ on: types: [opened, edited, synchronize, reopened, ready_for_review] paths: - ".github/workflows/busola-web-build.yml" - - "backend/**" - "public/**" - "src/**" - - "tests/**" - "package.json" - "Makefile" - "Dockerfile"