From a3dedd4a1fb29933a3e8aa1fd359c38a7dad6a50 Mon Sep 17 00:00:00 2001 From: Kent Huang Date: Thu, 23 Mar 2023 18:05:22 +0800 Subject: [PATCH 1/5] [Feature] sc-30601 Add new Github action by PipeRider Compare Action Signed-off-by: Kent Huang --- .../workflows/piperider-compare-action.yml | 43 +++++++++++++++++++ .piperider/compare/default.yml | 15 +++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/piperider-compare-action.yml create mode 100644 .piperider/compare/default.yml diff --git a/.github/workflows/piperider-compare-action.yml b/.github/workflows/piperider-compare-action.yml new file mode 100644 index 0000000..ff8201e --- /dev/null +++ b/.github/workflows/piperider-compare-action.yml @@ -0,0 +1,43 @@ +name: PipeRider Compare Action + +on: + pull_request: + branches: + - main + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: main + + - name: Set up Python 3.9 + uses: actions/setup-python@v4 + with: + python-version: 3.9 + + - name: Set up dbt + PipeRider + run: | + pip install -r requirements.txt + + - name: Clone git repo ${{ vars.GIT_REPO_URL }} + run: | + url=${{ vars.GIT_REPO_URL }} + git clone $url git_repo + + - name: Read git repo commits + run: | + python3 read_git_repo.py + + - name: PipeRider Compare Action - Upload and Share to PipeRider Cloud Staging + uses: InfuseAI/piperider-compare-action@v1.0.0-beta.1 + env: + PIPERIDER_API_SERVICE: https://staging.cloud.piperider.io + with: + cloud_project: ${{ vars.PIPERIDER_CLOUD_PROJECT }} + cloud_token: ${{ secrets.PIPERIDER_CLOUD_TOKEN }} + upload: true + share: true + recipe: default \ No newline at end of file diff --git a/.piperider/compare/default.yml b/.piperider/compare/default.yml new file mode 100644 index 0000000..c798e04 --- /dev/null +++ b/.piperider/compare/default.yml @@ -0,0 +1,15 @@ +base: + branch: main + dbt: + commands: + - dbt deps + - dbt build + piperider: + command: piperider run +target: + dbt: + commands: + - dbt deps + - dbt build + piperider: + command: piperider run From 2af5708b7a32b351a3a990abbf4394cfdc1ca655 Mon Sep 17 00:00:00 2001 From: Kent Huang Date: Thu, 23 Mar 2023 18:56:58 +0800 Subject: [PATCH 2/5] [Fix] update action workflow script Signed-off-by: Kent Huang --- .github/workflows/piperider-compare-action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/piperider-compare-action.yml b/.github/workflows/piperider-compare-action.yml index ff8201e..124f88b 100644 --- a/.github/workflows/piperider-compare-action.yml +++ b/.github/workflows/piperider-compare-action.yml @@ -6,7 +6,7 @@ on: - main jobs: - run: + piperider-compare-action: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -37,7 +37,7 @@ jobs: PIPERIDER_API_SERVICE: https://staging.cloud.piperider.io with: cloud_project: ${{ vars.PIPERIDER_CLOUD_PROJECT }} - cloud_token: ${{ secrets.PIPERIDER_CLOUD_TOKEN }} + cloud_api_token: ${{ secrets.PIPERIDER_CLOUD_TOKEN }} upload: true share: true recipe: default \ No newline at end of file From be9ebe153543a232b9888ed468c852aa186f2cc0 Mon Sep 17 00:00:00 2001 From: Kent Huang Date: Thu, 23 Mar 2023 19:06:26 +0800 Subject: [PATCH 3/5] [Add] Debug message Signed-off-by: Kent Huang --- .github/workflows/piperider-compare-action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/piperider-compare-action.yml b/.github/workflows/piperider-compare-action.yml index 124f88b..86c28cb 100644 --- a/.github/workflows/piperider-compare-action.yml +++ b/.github/workflows/piperider-compare-action.yml @@ -31,6 +31,13 @@ jobs: run: | python3 read_git_repo.py + - name: Debug + run: | + cwd + ls -la + ls -la .piperider + ls -la .piperider/compare + - name: PipeRider Compare Action - Upload and Share to PipeRider Cloud Staging uses: InfuseAI/piperider-compare-action@v1.0.0-beta.1 env: From 2a258dd92e35f851671ffa6adfb8f94c63e8665d Mon Sep 17 00:00:00 2001 From: Kent Huang Date: Thu, 23 Mar 2023 19:08:44 +0800 Subject: [PATCH 4/5] fix typo Signed-off-by: Kent Huang --- .github/workflows/piperider-compare-action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/piperider-compare-action.yml b/.github/workflows/piperider-compare-action.yml index 86c28cb..3ac6a99 100644 --- a/.github/workflows/piperider-compare-action.yml +++ b/.github/workflows/piperider-compare-action.yml @@ -33,7 +33,7 @@ jobs: - name: Debug run: | - cwd + pwd ls -la ls -la .piperider ls -la .piperider/compare From 88a030c5c6a48b2de884de85a284e437588a8d8f Mon Sep 17 00:00:00 2001 From: Kent Huang Date: Wed, 12 Apr 2023 15:56:45 +0800 Subject: [PATCH 5/5] Change piperider-compare-action version Change to use the public release of piperider-compare-action --- .github/workflows/piperider-compare-action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/piperider-compare-action.yml b/.github/workflows/piperider-compare-action.yml index 3ac6a99..bea955d 100644 --- a/.github/workflows/piperider-compare-action.yml +++ b/.github/workflows/piperider-compare-action.yml @@ -39,7 +39,7 @@ jobs: ls -la .piperider/compare - name: PipeRider Compare Action - Upload and Share to PipeRider Cloud Staging - uses: InfuseAI/piperider-compare-action@v1.0.0-beta.1 + uses: InfuseAI/piperider-compare-action@v1 env: PIPERIDER_API_SERVICE: https://staging.cloud.piperider.io with: @@ -47,4 +47,4 @@ jobs: cloud_api_token: ${{ secrets.PIPERIDER_CLOUD_TOKEN }} upload: true share: true - recipe: default \ No newline at end of file + recipe: default