From 57dc44771ae2f7d15889e036f7b9a000c24398ec Mon Sep 17 00:00:00 2001 From: Marek Michali Date: Wed, 28 Aug 2024 12:45:22 +0200 Subject: [PATCH 1/7] Update golang version in schema-migrator --- components/schema-migrator/Dockerfile | 2 +- components/schema-migrator/go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/schema-migrator/Dockerfile b/components/schema-migrator/Dockerfile index 2906fc7d72..70de71f546 100644 --- a/components/schema-migrator/Dockerfile +++ b/components/schema-migrator/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.2-alpine3.15 AS build +FROM golang:1.22.5-alpine3.20 AS build COPY cleaner /program/cleaner COPY go.mod /program/go.mod diff --git a/components/schema-migrator/go.mod b/components/schema-migrator/go.mod index 42fcf18c4a..ab1a51b546 100644 --- a/components/schema-migrator/go.mod +++ b/components/schema-migrator/go.mod @@ -1,6 +1,6 @@ module github.com/kyma-project/control-plane/components/schema-migrator -go 1.19 +go 1.22.5 require ( github.com/golang-migrate/migrate/v4 v4.15.2 From 45cff82c3599dc8a462acac758e8d52d8071ada6 Mon Sep 17 00:00:00 2001 From: Marek Michali Date: Wed, 28 Aug 2024 13:21:24 +0200 Subject: [PATCH 2/7] Test --- .github/workflows/test.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000000..e8e8dfa6af --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,26 @@ +name: Schema Migrator test + +on: + pull_request: + types: [opened, synchronize, reopened] + paths: + - ".github/workflows/schema-migrator.yaml" + - "components/schema-migrator/**" + - "scripts/**" + +permissions: + id-token: write # This is required for requesting the JWT token + contents: read # This is required for actions/checkout + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up go environment + uses: actions/setup-go@v5 + with: + go-version-file: components/schema-migrator/go.mod + - name: Run tests + run: make -C components/schema-migrator release From 8163c8a815771ba91d75d2b041b3dcb99ab67eae Mon Sep 17 00:00:00 2001 From: Marek Michali Date: Wed, 28 Aug 2024 13:30:22 +0200 Subject: [PATCH 3/7] Test --- components/schema-migrator/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/schema-migrator/Dockerfile b/components/schema-migrator/Dockerfile index 70de71f546..5cc4601709 100644 --- a/components/schema-migrator/Dockerfile +++ b/components/schema-migrator/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.5-alpine3.20 AS build +FROM golang:1.22.6-alpine3.20 AS build COPY cleaner /program/cleaner COPY go.mod /program/go.mod From 19949f0bd85b71fb430cbd06d633bddacc9b62c7 Mon Sep 17 00:00:00 2001 From: Marek Michali Date: Wed, 28 Aug 2024 13:35:09 +0200 Subject: [PATCH 4/7] Test --- components/schema-migrator/Dockerfile | 2 +- components/schema-migrator/go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/schema-migrator/Dockerfile b/components/schema-migrator/Dockerfile index 5cc4601709..3cbc327ccd 100644 --- a/components/schema-migrator/Dockerfile +++ b/components/schema-migrator/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.6-alpine3.20 AS build +FROM golang:1.21 AS build COPY cleaner /program/cleaner COPY go.mod /program/go.mod diff --git a/components/schema-migrator/go.mod b/components/schema-migrator/go.mod index ab1a51b546..a86983d218 100644 --- a/components/schema-migrator/go.mod +++ b/components/schema-migrator/go.mod @@ -1,6 +1,6 @@ module github.com/kyma-project/control-plane/components/schema-migrator -go 1.22.5 +go 1.21 require ( github.com/golang-migrate/migrate/v4 v4.15.2 From 073b15f9cd9a3a0b55e298ac9797a8373ef26c54 Mon Sep 17 00:00:00 2001 From: Marek Michali Date: Thu, 29 Aug 2024 08:02:29 +0200 Subject: [PATCH 5/7] Test --- components/schema-migrator/validate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/schema-migrator/validate.sh b/components/schema-migrator/validate.sh index e5b4deefad..928b1c7bb1 100755 --- a/components/schema-migrator/validate.sh +++ b/components/schema-migrator/validate.sh @@ -34,7 +34,7 @@ trap cleanup EXIT echo -e "${GREEN}Create network${NC}" docker network create --driver bridge ${NETWORK} -GO111MODULE=on go mod vendor -v +#GO111MODULE=on go mod vendor -v docker build -t ${IMG_NAME} ./ echo -e "${GREEN}Start Postgres in detached mode${NC}" From 8cb26cb1571c59ba2c0343055ffd701b423a1572 Mon Sep 17 00:00:00 2001 From: Marek Michali Date: Thu, 29 Aug 2024 10:25:11 +0200 Subject: [PATCH 6/7] Test --- .github/workflows/test.yaml | 1 + components/schema-migrator/validate.sh | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e8e8dfa6af..18d0abbe15 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,5 +22,6 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: components/schema-migrator/go.mod + cache-dependency-path: components/schema-migrator/go.sum - name: Run tests run: make -C components/schema-migrator release diff --git a/components/schema-migrator/validate.sh b/components/schema-migrator/validate.sh index 928b1c7bb1..d876d745b7 100755 --- a/components/schema-migrator/validate.sh +++ b/components/schema-migrator/validate.sh @@ -34,7 +34,6 @@ trap cleanup EXIT echo -e "${GREEN}Create network${NC}" docker network create --driver bridge ${NETWORK} -#GO111MODULE=on go mod vendor -v docker build -t ${IMG_NAME} ./ echo -e "${GREEN}Start Postgres in detached mode${NC}" From b0aadb18323205f7a89e7a28c315d77064fa86a9 Mon Sep 17 00:00:00 2001 From: Marek Michali Date: Thu, 29 Aug 2024 10:37:55 +0200 Subject: [PATCH 7/7] Cleanup --- .github/workflows/test.yaml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index 18d0abbe15..0000000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: Schema Migrator test - -on: - pull_request: - types: [opened, synchronize, reopened] - paths: - - ".github/workflows/schema-migrator.yaml" - - "components/schema-migrator/**" - - "scripts/**" - -permissions: - id-token: write # This is required for requesting the JWT token - contents: read # This is required for actions/checkout - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Set up go environment - uses: actions/setup-go@v5 - with: - go-version-file: components/schema-migrator/go.mod - cache-dependency-path: components/schema-migrator/go.sum - - name: Run tests - run: make -C components/schema-migrator release