From 2a3500864aab4d0b3ddb28add58e041e675ed161 Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 5 Nov 2024 07:16:59 +0000 Subject: [PATCH 1/6] pipeline --- .github/workflows/sdk-pr.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sdk-pr.yaml b/.github/workflows/sdk-pr.yaml index ebc2cb9..5b5c0b3 100644 --- a/.github/workflows/sdk-pr.yaml +++ b/.github/workflows/sdk-pr.yaml @@ -15,6 +15,8 @@ jobs: name: [Go] Update SDK Repo runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v3 - name: Install SSH Key uses: shimataro/ssh-key-action@v2 with: @@ -30,6 +32,7 @@ jobs: with: repository: "stackitcloud/stackit-sdk-generator" ref: "main" + path: 'generator-repo' - name: Build uses: ./.github/actions/build with: @@ -50,10 +53,13 @@ jobs: GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }} run: | scripts/sdk-create-pr.sh "oas-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" + main-python: name: [Python] Update SDK Repo runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v3 - name: Install SSH Key uses: shimataro/ssh-key-action@v2 with: @@ -69,6 +75,7 @@ jobs: with: repository: "stackitcloud/stackit-sdk-generator" ref: "main" + path: 'generator-repo' - name: Build uses: ./.github/actions/build with: @@ -77,7 +84,8 @@ jobs: run: make download-oas - name: Generate SDK run: make generate-sdk LANGUAGE=python - - uses: actions/checkout@v3 + - name: Checkout Python SDK Core + uses: actions/checkout@v3 with: repository: "stackitcloud/stackit-sdk-python-core" ref: "main" @@ -99,4 +107,4 @@ jobs: GH_REPO: "stackitcloud/stackit-sdk-python" GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }} run: | - scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" "git@github.com:stackitcloud/stackit-sdk-python.git" "python" + scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" "git@github.com:stackitcloud/stackit-sdk-python.git" "python" \ No newline at end of file From f3a6a335c7a76c9a4c0d318375dff5d8bff5e291 Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 5 Nov 2024 07:21:35 +0000 Subject: [PATCH 2/6] pipeline --- .github/workflows/sdk-pr.yaml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/sdk-pr.yaml b/.github/workflows/sdk-pr.yaml index 5b5c0b3..36bd749 100644 --- a/.github/workflows/sdk-pr.yaml +++ b/.github/workflows/sdk-pr.yaml @@ -12,11 +12,9 @@ env: jobs: main-go: - name: [Go] Update SDK Repo + name: "[Go] Update SDK Repo" runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - name: Install SSH Key uses: shimataro/ssh-key-action@v2 with: @@ -32,7 +30,6 @@ jobs: with: repository: "stackitcloud/stackit-sdk-generator" ref: "main" - path: 'generator-repo' - name: Build uses: ./.github/actions/build with: @@ -53,13 +50,11 @@ jobs: GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }} run: | scripts/sdk-create-pr.sh "oas-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" - + main-python: - name: [Python] Update SDK Repo + name: "[Python] Update SDK Repo" runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - name: Install SSH Key uses: shimataro/ssh-key-action@v2 with: @@ -75,7 +70,6 @@ jobs: with: repository: "stackitcloud/stackit-sdk-generator" ref: "main" - path: 'generator-repo' - name: Build uses: ./.github/actions/build with: @@ -84,8 +78,7 @@ jobs: run: make download-oas - name: Generate SDK run: make generate-sdk LANGUAGE=python - - name: Checkout Python SDK Core - uses: actions/checkout@v3 + - uses: actions/checkout@v3 with: repository: "stackitcloud/stackit-sdk-python-core" ref: "main" @@ -107,4 +100,4 @@ jobs: GH_REPO: "stackitcloud/stackit-sdk-python" GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }} run: | - scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" "git@github.com:stackitcloud/stackit-sdk-python.git" "python" \ No newline at end of file + scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" "git@github.com:stackitcloud/stackit-sdk-python.git" "python" From 2f1e577b3b6d782ba50ceeec3cb40b4b63092f70 Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 5 Nov 2024 10:56:14 +0000 Subject: [PATCH 3/6] fix installation of python sdk dependencies --- .github/workflows/sdk-pr.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sdk-pr.yaml b/.github/workflows/sdk-pr.yaml index 36bd749..c204a61 100644 --- a/.github/workflows/sdk-pr.yaml +++ b/.github/workflows/sdk-pr.yaml @@ -85,7 +85,10 @@ jobs: path: 'python-core' - name: Install Python SDK Core working-directory: 'python-core' - run: make install + run: | + pip install poetry + poetry config virtualenvs.create false + make install - name: Install Python SDK working-directory: ./sdk-repo-updated run: make install-dev From 33048e6014b45347432b2e4f469ec16111e9bb7e Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 5 Nov 2024 15:57:38 +0000 Subject: [PATCH 4/6] another fix --- .github/workflows/sdk-pr.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/sdk-pr.yaml b/.github/workflows/sdk-pr.yaml index c204a61..82e3eb4 100644 --- a/.github/workflows/sdk-pr.yaml +++ b/.github/workflows/sdk-pr.yaml @@ -82,16 +82,13 @@ jobs: with: repository: "stackitcloud/stackit-sdk-python-core" ref: "main" - path: 'python-core' - - name: Install Python SDK Core - working-directory: 'python-core' + path: 'python-core' + - name: Install Python SDK + working-directory: ./sdk-repo-updated run: | pip install poetry poetry config virtualenvs.create false - make install - - name: Install Python SDK - working-directory: ./sdk-repo-updated - run: make install-dev + make install-dev - name: Lint Python working-directory: ./sdk-repo-updated run: make lint From 016e12f2c7dbef577407359211149f90e13e2578 Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 5 Nov 2024 15:58:58 +0000 Subject: [PATCH 5/6] fix --- .github/workflows/sdk-pr.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/sdk-pr.yaml b/.github/workflows/sdk-pr.yaml index e215ca9..c6eac9b 100644 --- a/.github/workflows/sdk-pr.yaml +++ b/.github/workflows/sdk-pr.yaml @@ -82,9 +82,6 @@ jobs: with: repository: "stackitcloud/stackit-sdk-python-core" ref: "main" -<<<<<<< HEAD - path: 'python-core' -======= path: 'python-core' - name: Install Python SDK Core working-directory: 'python-core' @@ -92,7 +89,6 @@ jobs: pip install poetry poetry config virtualenvs.create false make install ->>>>>>> origin/main - name: Install Python SDK working-directory: ./sdk-repo-updated run: | From a6a052cb0e88c1cb08895e68bcdd49f87d0792c8 Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 5 Nov 2024 16:23:25 +0000 Subject: [PATCH 6/6] merge problem --- .github/workflows/sdk-pr.yaml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/sdk-pr.yaml b/.github/workflows/sdk-pr.yaml index c6eac9b..0f8f0fe 100644 --- a/.github/workflows/sdk-pr.yaml +++ b/.github/workflows/sdk-pr.yaml @@ -78,17 +78,6 @@ jobs: run: make download-oas - name: Generate SDK run: make generate-sdk LANGUAGE=python - - uses: actions/checkout@v3 - with: - repository: "stackitcloud/stackit-sdk-python-core" - ref: "main" - path: 'python-core' - - name: Install Python SDK Core - working-directory: 'python-core' - run: | - pip install poetry - poetry config virtualenvs.create false - make install - name: Install Python SDK working-directory: ./sdk-repo-updated run: |