From b52d8a0f1e563bb3dfa3598f6bb380934886823e Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 15:35:04 +0200 Subject: [PATCH 01/53] Add container messages --- .github/workflows/test-containers.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index a8b50ace..d2448076 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -1,6 +1,6 @@ name: Test containers -on: [push] +on: [push, pull_request] jobs: container-images: @@ -31,3 +31,13 @@ jobs: snapshot: false tags: "${{ steps.extract_branch.outputs.branch }}" buildoptions: "--pull" + + comments: + if: ${{ github.event_name == 'pull_request' }} + runs-on: ubuntu-latest + steps: + - name: Comment PR + uses: allthatjazzleo/actions-pull-request-add-comment@master + with: + message: "echo ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui dynamic message" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 35a372690db57ec0aaa1362bc5753c45c4abad02 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 15:40:45 +0200 Subject: [PATCH 02/53] change message --- .github/workflows/test-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index d2448076..6a2d14f4 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -39,5 +39,5 @@ jobs: - name: Comment PR uses: allthatjazzleo/actions-pull-request-add-comment@master with: - message: "echo ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui dynamic message" + message: "Example of message !" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 781b629e11fa336302973d40e341a241e0b08ce6 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 15:44:02 +0200 Subject: [PATCH 03/53] message --- .github/workflows/test-containers.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index 6a2d14f4..9b7c7142 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -36,8 +36,12 @@ jobs: if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - - name: Comment PR - uses: allthatjazzleo/actions-pull-request-add-comment@master + - uses: actions/github-script@v4 with: - message: "Example of message !" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '👋 Thanks for reporting!' + }) From 3b46812d07fc8df04604ce71364e89026c42bab4 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 15:57:41 +0200 Subject: [PATCH 04/53] add pull_request_target --- .github/workflows/test-containers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index 9b7c7142..9658d628 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -1,6 +1,6 @@ name: Test containers -on: [push, pull_request] +on: [push, pull_request_target] jobs: container-images: @@ -33,7 +33,7 @@ jobs: buildoptions: "--pull" comments: - if: ${{ github.event_name == 'pull_request' }} + if: ${{ github.event_name == 'pull_request_target' }} runs-on: ubuntu-latest steps: - uses: actions/github-script@v4 From a453e927edcc7fdd7f7295eba985cb1f053f4415 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 16:09:33 +0200 Subject: [PATCH 05/53] Secrets --- .github/workflows/test-containers.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index 9658d628..590397e2 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -45,3 +45,4 @@ jobs: repo: context.repo.repo, body: '👋 Thanks for reporting!' }) + repo-token: ${{ secrets.GITHUB_TOKEN }} From 9326d1899aacb1b8eaa5bda4f01559f725fc6b69 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 16:15:13 +0200 Subject: [PATCH 06/53] pull_request --- .github/workflows/test-containers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index 590397e2..75d79f2c 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -1,6 +1,6 @@ name: Test containers -on: [push, pull_request_target] +on: [push, pull_request] jobs: container-images: @@ -33,7 +33,7 @@ jobs: buildoptions: "--pull" comments: - if: ${{ github.event_name == 'pull_request_target' }} + if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/github-script@v4 From fea702429dc0ef97bca1323309ad7f79fc17f524 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 16:16:21 +0200 Subject: [PATCH 07/53] github-token --- .github/workflows/test-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index 75d79f2c..2c23d7c0 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -45,4 +45,4 @@ jobs: repo: context.repo.repo, body: '👋 Thanks for reporting!' }) - repo-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} From 7fff2f6bee054c2276f88206de137bd92ba88346 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 16:24:49 +0200 Subject: [PATCH 08/53] Comment --- .github/workflows/test-containers.yml | 59 +++++++++++++-------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index 2c23d7c0..f63c8881 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -1,39 +1,38 @@ name: Test containers -on: [push, pull_request] +on: [pull_request_target] jobs: - container-images: - if: ${{ github.event_name != 'pull_request' && github.repository_owner != 'konveyor' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: 12.x - - name: Build - run: | - yarn install - yarn build - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Push to GitHub Packages - uses: elgohr/Publish-Docker-Github-Action@3.02 - with: - registry: docker.pkg.github.com - name: ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - dockerfile: Dockerfile - snapshot: false - tags: "${{ steps.extract_branch.outputs.branch }}" - buildoptions: "--pull" + # container-images: + # if: ${{ github.event_name != 'pull_request' && github.repository_owner != 'konveyor' }} + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 + # - name: Use Node.js + # uses: actions/setup-node@v1 + # with: + # node-version: 12.x + # - name: Build + # run: | + # yarn install + # yarn build + # - name: Extract branch name + # shell: bash + # run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + # id: extract_branch + # - name: Push to GitHub Packages + # uses: elgohr/Publish-Docker-Github-Action@3.02 + # with: + # registry: docker.pkg.github.com + # name: ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} + # dockerfile: Dockerfile + # snapshot: false + # tags: "${{ steps.extract_branch.outputs.branch }}" + # buildoptions: "--pull" comments: - if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/github-script@v4 From d056eac1ad7fd30e2997222e0375c7b01ce8071c Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 16:59:54 +0200 Subject: [PATCH 09/53] 2 steps --- .github/workflows/test-containers-comment.yml | 47 +++++++++++++++++++ .github/workflows/test-containers.yml | 44 ++++++----------- 2 files changed, 61 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/test-containers-comment.yml diff --git a/.github/workflows/test-containers-comment.yml b/.github/workflows/test-containers-comment.yml new file mode 100644 index 00000000..b38f7fc3 --- /dev/null +++ b/.github/workflows/test-containers-comment.yml @@ -0,0 +1,47 @@ +name: Comments + +on: + workflow_run: + workflows: ["Build PR"] + types: + - completed + +jobs: + upload: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} + steps: + - name: "Download artifact" + uses: actions/github-script@v3.1.0 + with: + script: | + var artifacts = await github.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: ${{github.event.workflow_run.id }}, + }); + var matchArtifact = artifacts.data.artifacts.filter((artifact) => { + return artifact.name == "pr" + })[0]; + var download = await github.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: matchArtifact.id, + archive_format: 'zip', + }); + var fs = require('fs'); + fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data)); + - run: unzip pr.zip + - uses: actions/github-script@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + var fs = require('fs'); + var issue_number = Number(fs.readFileSync('./NR')); + + github.issues.createComment({ + issue_number: issue_number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '👋 Thanks for reporting!' + }) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index f63c8881..fc9f6272 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -1,36 +1,20 @@ -name: Test containers +name: Build PR -on: [pull_request_target] +on: [pull_request] jobs: - # container-images: - # if: ${{ github.event_name != 'pull_request' && github.repository_owner != 'konveyor' }} - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - # - name: Use Node.js - # uses: actions/setup-node@v1 - # with: - # node-version: 12.x - # - name: Build - # run: | - # yarn install - # yarn build - # - name: Extract branch name - # shell: bash - # run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - # id: extract_branch - # - name: Push to GitHub Packages - # uses: elgohr/Publish-Docker-Github-Action@3.02 - # with: - # registry: docker.pkg.github.com - # name: ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui - # username: ${{ github.actor }} - # password: ${{ secrets.GITHUB_TOKEN }} - # dockerfile: Dockerfile - # snapshot: false - # tags: "${{ steps.extract_branch.outputs.branch }}" - # buildoptions: "--pull" + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Save PR number + run: | + mkdir -p ./pr + echo ${{ github.event.number }} > ./pr/NR + - uses: actions/upload-artifact@v2 + with: + name: pr + path: pr/ comments: runs-on: ubuntu-latest From b7440e797a31ee7a06626f222c31e32d9741864c Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 17:04:29 +0200 Subject: [PATCH 10/53] paste --- .github/workflows/test-containers-comment.yml | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-containers-comment.yml b/.github/workflows/test-containers-comment.yml index b38f7fc3..8c57eee9 100644 --- a/.github/workflows/test-containers-comment.yml +++ b/.github/workflows/test-containers-comment.yml @@ -16,32 +16,33 @@ jobs: with: script: | var artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, + owner: context.repo.owner, + repo: context.repo.repo, + run_id: ${{github.event.workflow_run.id }}, }); var matchArtifact = artifacts.data.artifacts.filter((artifact) => { return artifact.name == "pr" })[0]; var download = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: matchArtifact.id, + archive_format: 'zip', }); var fs = require('fs'); fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data)); - run: unzip pr.zip - - uses: actions/github-script@v4 + + - name: "Comment on PR" + uses: actions/github-script@v3 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | var fs = require('fs'); var issue_number = Number(fs.readFileSync('./NR')); - - github.issues.createComment({ - issue_number: issue_number, + await github.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, - body: '👋 Thanks for reporting!' - }) + issue_number: issue_number, + body: 'Everything is OK. Thank you for the PR!' + }); From 0cb7514d429e904d61aa6716450de9a7e5d5fff6 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 17:28:20 +0200 Subject: [PATCH 11/53] message --- .github/workflows/test-containers-comment.yml | 48 ------------------- .github/workflows/test-containers.yml | 34 ++++--------- 2 files changed, 9 insertions(+), 73 deletions(-) delete mode 100644 .github/workflows/test-containers-comment.yml diff --git a/.github/workflows/test-containers-comment.yml b/.github/workflows/test-containers-comment.yml deleted file mode 100644 index 8c57eee9..00000000 --- a/.github/workflows/test-containers-comment.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Comments - -on: - workflow_run: - workflows: ["Build PR"] - types: - - completed - -jobs: - upload: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} - steps: - - name: "Download artifact" - uses: actions/github-script@v3.1.0 - with: - script: | - var artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, - }); - var matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "pr" - })[0]; - var download = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - var fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data)); - - run: unzip pr.zip - - - name: "Comment on PR" - uses: actions/github-script@v3 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - var fs = require('fs'); - var issue_number = Number(fs.readFileSync('./NR')); - await github.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue_number, - body: 'Everything is OK. Thank you for the PR!' - }); diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index fc9f6272..b35241a3 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -1,31 +1,15 @@ -name: Build PR +name: Welcome comment -on: [pull_request] +on: + pull_request_target: + types: [opened, labeled] jobs: - build: + Welcome: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Save PR number - run: | - mkdir -p ./pr - echo ${{ github.event.number }} > ./pr/NR - - uses: actions/upload-artifact@v2 + - uses: actions/first-interaction@v1.0.0 with: - name: pr - path: pr/ - - comments: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v4 - with: - script: | - github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: '👋 Thanks for reporting!' - }) - github-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} + pr-message: |- + congrats From c811136d1ed0c978b4ed4195d0ab83f5c49950a4 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 17:30:52 +0200 Subject: [PATCH 12/53] Test containers --- .github/workflows/test-containers.yml | 36 +++++++-------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index a8b50ace..b35241a3 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -1,33 +1,15 @@ -name: Test containers +name: Welcome comment -on: [push] +on: + pull_request_target: + types: [opened, labeled] jobs: - container-images: - if: ${{ github.event_name != 'pull_request' && github.repository_owner != 'konveyor' }} + Welcome: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v1 + - uses: actions/first-interaction@v1.0.0 with: - node-version: 12.x - - name: Build - run: | - yarn install - yarn build - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Push to GitHub Packages - uses: elgohr/Publish-Docker-Github-Action@3.02 - with: - registry: docker.pkg.github.com - name: ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - dockerfile: Dockerfile - snapshot: false - tags: "${{ steps.extract_branch.outputs.branch }}" - buildoptions: "--pull" + repo-token: ${{ secrets.GITHUB_TOKEN }} + pr-message: |- + congrats From 2e4903a4e3045fd59957b7f2f687fb5712344f7f Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 17:49:04 +0200 Subject: [PATCH 13/53] change message --- .github/workflows/test-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index b35241a3..eb27cbc9 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -12,4 +12,4 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} pr-message: |- - congrats + congrats ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui nada From bdd549a6759944944af600509602140c518d88cb Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 17:56:55 +0200 Subject: [PATCH 14/53] script --- .github/workflows/test-containers.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index eb27cbc9..9cac7a5a 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -13,3 +13,13 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} pr-message: |- congrats ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui nada + - uses: actions/github-script@v4 + with: + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '👋 Thanks for reporting!' + }) + repo-token: ${{ secrets.GITHUB_TOKEN }} From 33d8d36b261af7180d878fcbd65cd1f56d864240 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 18:01:23 +0200 Subject: [PATCH 15/53] change body --- .github/workflows/test-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index 9cac7a5a..845a0c05 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -20,6 +20,6 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: '👋 Thanks for reporting!' + body: '👋 Thanks for reporting! ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui' }) repo-token: ${{ secrets.GITHUB_TOKEN }} From 377de0173a950d495d4c0e1460e78560aa2ccd01 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 18:25:53 +0200 Subject: [PATCH 16/53] change body --- .../workflows/pr-build-container-images.yml | 20 +++++++++++++++ .github/workflows/test-containers.yml | 25 ------------------- 2 files changed, 20 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/pr-build-container-images.yml delete mode 100644 .github/workflows/test-containers.yml diff --git a/.github/workflows/pr-build-container-images.yml b/.github/workflows/pr-build-container-images.yml new file mode 100644 index 00000000..245073e2 --- /dev/null +++ b/.github/workflows/pr-build-container-images.yml @@ -0,0 +1,20 @@ +name: PR build container images + +on: + pull_request_target: + types: [opened] + +jobs: + message: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v4 + with: + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/actions/workflows/pr-build-container-images.yml and once the build finishes you should be able to use the container image docker.pkg.github.com/${{github.repository_owner}}/${{github.event.repository.name}}/tackle-ui \n To see the full set of container images generate visit https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/packages' + }) + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml deleted file mode 100644 index 845a0c05..00000000 --- a/.github/workflows/test-containers.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Welcome comment - -on: - pull_request_target: - types: [opened, labeled] - -jobs: - Welcome: - runs-on: ubuntu-latest - steps: - - uses: actions/first-interaction@v1.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - pr-message: |- - congrats ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui nada - - uses: actions/github-script@v4 - with: - script: | - github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: '👋 Thanks for reporting! ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui' - }) - repo-token: ${{ secrets.GITHUB_TOKEN }} From 9141ebc6cfe000e0d1d223a0655b221a7940281f Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 18:30:20 +0200 Subject: [PATCH 17/53] format --- .github/workflows/pr-build-container-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build-container-images.yml b/.github/workflows/pr-build-container-images.yml index 245073e2..a55a8904 100644 --- a/.github/workflows/pr-build-container-images.yml +++ b/.github/workflows/pr-build-container-images.yml @@ -15,6 +15,6 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/actions/workflows/pr-build-container-images.yml and once the build finishes you should be able to use the container image docker.pkg.github.com/${{github.repository_owner}}/${{github.event.repository.name}}/tackle-ui \n To see the full set of container images generate visit https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/packages' + body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/actions/workflows/pr-build-container-images.yml and once the build finishes you should be able to use the container image ```docker pull docker.pkg.github.com/${{github.repository_owner}}/${{github.event.repository.name}}/tackle-ui``` \n To see the full set of container images generate visit https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/packages' }) repo-token: ${{ secrets.GITHUB_TOKEN }} From 9873d6d4e71f25bc1505074e95263c4e31ff2278 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 18:38:55 +0200 Subject: [PATCH 18/53] Format --- .github/workflows/pr-build-container-images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-build-container-images.yml b/.github/workflows/pr-build-container-images.yml index a55a8904..2ec160e8 100644 --- a/.github/workflows/pr-build-container-images.yml +++ b/.github/workflows/pr-build-container-images.yml @@ -15,6 +15,6 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/actions/workflows/pr-build-container-images.yml and once the build finishes you should be able to use the container image ```docker pull docker.pkg.github.com/${{github.repository_owner}}/${{github.event.repository.name}}/tackle-ui``` \n To see the full set of container images generate visit https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/packages' + body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/actions/workflows/pr-build-container-images.yml and once the build finishes you should be able to use the container image ```\n docker pull docker.pkg.github.com/${{github.repository_owner}}/${{github.event.repository.name}}/tackle-ui \n``` \n To see the full set of container images generate visit https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/packages' }) - repo-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} From 27b1e83ffa621aebd31cedee661e4b6af63512a8 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 18:43:42 +0200 Subject: [PATCH 19/53] change message --- .github/workflows/pr-build-container-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build-container-images.yml b/.github/workflows/pr-build-container-images.yml index 2ec160e8..f6be9b5e 100644 --- a/.github/workflows/pr-build-container-images.yml +++ b/.github/workflows/pr-build-container-images.yml @@ -15,6 +15,6 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/actions/workflows/pr-build-container-images.yml and once the build finishes you should be able to use the container image ```\n docker pull docker.pkg.github.com/${{github.repository_owner}}/${{github.event.repository.name}}/tackle-ui \n``` \n To see the full set of container images generate visit https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/packages' + body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/actions/workflows/pr-build-container-images.yml and once the build finishes you should be able to use the container image `docker pull docker.pkg.github.com/${{github.repository_owner}}/${{github.event.repository.name}}/tackle-ui` \n To see the full set of container images generate visit https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/packages' }) github-token: ${{ secrets.GITHUB_TOKEN }} From 96e79070d63cba4694b776f173807777c6a7ab17 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 19:01:58 +0200 Subject: [PATCH 20/53] github.event.pull_request.head.repo.full_name --- .github/workflows/pr-build-container-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build-container-images.yml b/.github/workflows/pr-build-container-images.yml index f6be9b5e..99fdfe06 100644 --- a/.github/workflows/pr-build-container-images.yml +++ b/.github/workflows/pr-build-container-images.yml @@ -15,6 +15,6 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/actions/workflows/pr-build-container-images.yml and once the build finishes you should be able to use the container image `docker pull docker.pkg.github.com/${{github.repository_owner}}/${{github.event.repository.name}}/tackle-ui` \n To see the full set of container images generate visit https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/packages' + body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.event.pull_request.head.repo.full_name}}/actions/workflows/pr-build-container-images.yml and once the build finishes you should be able to use the container image `docker.pkg.github.com/${{github.repository_owner}}/${{github.event.repository.name}}/tackle-ui` \n To see the full set of container images generated visit https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/packages' }) github-token: ${{ secrets.GITHUB_TOKEN }} From d3106311d378e832d07d0d19c1ad131a8e5a30f1 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 19:09:22 +0200 Subject: [PATCH 21/53] twice --- .../pr-build-container-images-comment.yml | 20 ++++++++++ .../workflows/pr-build-container-images.yml | 39 ++++++++++++------- 2 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/pr-build-container-images-comment.yml diff --git a/.github/workflows/pr-build-container-images-comment.yml b/.github/workflows/pr-build-container-images-comment.yml new file mode 100644 index 00000000..15604a6f --- /dev/null +++ b/.github/workflows/pr-build-container-images-comment.yml @@ -0,0 +1,20 @@ +name: PR build container images comment + +on: + pull_request_target: + types: [opened] + +jobs: + message: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v4 + with: + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.event.pull_request.head.repo.full_name}}/actions/workflows/pr-build-container-images.yml and once the build finishes you should be able to use the container image `docker.pkg.github.com/${{github.event.pull_request.head.repo.full_name}}/tackle-ui` \n To see the full set of container images generated visit https://github.com/${{github.event.pull_request.head.repo.full_name}}/packages' + }) + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-build-container-images.yml b/.github/workflows/pr-build-container-images.yml index 99fdfe06..7179de84 100644 --- a/.github/workflows/pr-build-container-images.yml +++ b/.github/workflows/pr-build-container-images.yml @@ -1,20 +1,33 @@ name: PR build container images -on: - pull_request_target: - types: [opened] +on: [push] jobs: - message: + container-images: + if: ${{ github.event_name != 'pull_request' && github.repository_owner != 'konveyor' }} runs-on: ubuntu-latest steps: - - uses: actions/github-script@v4 + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 with: - script: | - github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.event.pull_request.head.repo.full_name}}/actions/workflows/pr-build-container-images.yml and once the build finishes you should be able to use the container image `docker.pkg.github.com/${{github.repository_owner}}/${{github.event.repository.name}}/tackle-ui` \n To see the full set of container images generated visit https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/packages' - }) - github-token: ${{ secrets.GITHUB_TOKEN }} + node-version: 12.x + - name: Build + run: | + yarn install + yarn build + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch + - name: Push to GitHub Packages + uses: elgohr/Publish-Docker-Github-Action@3.02 + with: + registry: docker.pkg.github.com + name: ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + dockerfile: Dockerfile + snapshot: false + tags: "${{ steps.extract_branch.outputs.branch }}" + buildoptions: "--pull" From b679e657679f41b46f21995ee502dbcbd8abddf0 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 8 Jul 2021 19:15:14 +0200 Subject: [PATCH 22/53] branch --- .github/workflows/pr-build-container-images-comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build-container-images-comment.yml b/.github/workflows/pr-build-container-images-comment.yml index 15604a6f..9918fb97 100644 --- a/.github/workflows/pr-build-container-images-comment.yml +++ b/.github/workflows/pr-build-container-images-comment.yml @@ -15,6 +15,6 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.event.pull_request.head.repo.full_name}}/actions/workflows/pr-build-container-images.yml and once the build finishes you should be able to use the container image `docker.pkg.github.com/${{github.event.pull_request.head.repo.full_name}}/tackle-ui` \n To see the full set of container images generated visit https://github.com/${{github.event.pull_request.head.repo.full_name}}/packages' + body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.event.pull_request.head.repo.full_name}}/actions/workflows/pr-build-container-images.yml?query=branch%3A${{github.event.pull_request.head.ref}} and once the build finishes you should be able to use the container image `docker.pkg.github.com/${{github.event.pull_request.head.repo.full_name}}/tackle-ui:${{github.event.pull_request.head.ref}}` \n To see the full set of container images generated visit https://github.com/${{github.event.pull_request.head.repo.full_name}}/packages' }) github-token: ${{ secrets.GITHUB_TOKEN }} From 8008b83645a9e76b93fe602c30a82ffd37b1681b Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 9 Jul 2021 07:28:38 +0200 Subject: [PATCH 23/53] Change message content --- .github/workflows/pr-build-container-images-comment.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-build-container-images-comment.yml b/.github/workflows/pr-build-container-images-comment.yml index 9918fb97..11075e81 100644 --- a/.github/workflows/pr-build-container-images-comment.yml +++ b/.github/workflows/pr-build-container-images-comment.yml @@ -5,16 +5,16 @@ on: types: [opened] jobs: - message: + comment: runs-on: ubuntu-latest steps: - uses: actions/github-script@v4 with: + github-token: ${{ secrets.GITHUB_TOKEN }} script: | github.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: 'Thanks for your contribution! \n Every commit will generate a new build in https://github.com/${{github.event.pull_request.head.repo.full_name}}/actions/workflows/pr-build-container-images.yml?query=branch%3A${{github.event.pull_request.head.ref}} and once the build finishes you should be able to use the container image `docker.pkg.github.com/${{github.event.pull_request.head.repo.full_name}}/tackle-ui:${{github.event.pull_request.head.ref}}` \n To see the full set of container images generated visit https://github.com/${{github.event.pull_request.head.repo.full_name}}/packages' + body: 'Thanks for your contribution! \n Every commit will generate a new build at https://github.com/${{github.event.pull_request.head.repo.full_name}}/actions/workflows/pr-build-container-images.yml?query=branch%3A${{github.event.pull_request.head.ref}} and once the build finishes you should be able to use the container image `docker.pkg.github.com/${{github.event.pull_request.head.repo.full_name}}/${{github.event.repository.name}}:${{github.event.pull_request.head.ref}}` \n To see the full set of container images generated visit https://github.com/${{github.event.pull_request.head.repo.full_name}}/packages' }) - github-token: ${{ secrets.GITHUB_TOKEN }} From 3b0e9b3632ced65953aacc27bdb0f8f97e96cdc1 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 9 Jul 2021 07:40:35 +0200 Subject: [PATCH 24/53] Change test containers name --- .github/workflows/pr-build-container-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build-container-images.yml b/.github/workflows/pr-build-container-images.yml index 7179de84..6620bf90 100644 --- a/.github/workflows/pr-build-container-images.yml +++ b/.github/workflows/pr-build-container-images.yml @@ -24,7 +24,7 @@ jobs: uses: elgohr/Publish-Docker-Github-Action@3.02 with: registry: docker.pkg.github.com - name: ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui + name: ${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ github.event.repository.name }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} dockerfile: Dockerfile From 6d2863c277c13eab60f42765c7031607cfed3840 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 9 Jul 2021 07:59:46 +0200 Subject: [PATCH 25/53] change image name --- .github/workflows/pr-build-container-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build-container-images.yml b/.github/workflows/pr-build-container-images.yml index 6620bf90..7179de84 100644 --- a/.github/workflows/pr-build-container-images.yml +++ b/.github/workflows/pr-build-container-images.yml @@ -24,7 +24,7 @@ jobs: uses: elgohr/Publish-Docker-Github-Action@3.02 with: registry: docker.pkg.github.com - name: ${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ github.event.repository.name }} + name: ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} dockerfile: Dockerfile From d82c51fb555e8265d372a867e8b87eb1ba93701c Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 9 Jul 2021 12:10:36 +0200 Subject: [PATCH 26/53] Add integration tests --- .../pr-build-container-images-comment.yml | 20 ---- .../workflows/pr-build-container-images.yml | 33 ------ .github/workflows/pr-integration-tests.yml | 104 ++++++++++++++++++ 3 files changed, 104 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/pr-build-container-images-comment.yml delete mode 100644 .github/workflows/pr-build-container-images.yml create mode 100644 .github/workflows/pr-integration-tests.yml diff --git a/.github/workflows/pr-build-container-images-comment.yml b/.github/workflows/pr-build-container-images-comment.yml deleted file mode 100644 index 11075e81..00000000 --- a/.github/workflows/pr-build-container-images-comment.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: PR build container images comment - -on: - pull_request_target: - types: [opened] - -jobs: - comment: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v4 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Thanks for your contribution! \n Every commit will generate a new build at https://github.com/${{github.event.pull_request.head.repo.full_name}}/actions/workflows/pr-build-container-images.yml?query=branch%3A${{github.event.pull_request.head.ref}} and once the build finishes you should be able to use the container image `docker.pkg.github.com/${{github.event.pull_request.head.repo.full_name}}/${{github.event.repository.name}}:${{github.event.pull_request.head.ref}}` \n To see the full set of container images generated visit https://github.com/${{github.event.pull_request.head.repo.full_name}}/packages' - }) diff --git a/.github/workflows/pr-build-container-images.yml b/.github/workflows/pr-build-container-images.yml deleted file mode 100644 index 7179de84..00000000 --- a/.github/workflows/pr-build-container-images.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: PR build container images - -on: [push] - -jobs: - container-images: - if: ${{ github.event_name != 'pull_request' && github.repository_owner != 'konveyor' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: 12.x - - name: Build - run: | - yarn install - yarn build - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Push to GitHub Packages - uses: elgohr/Publish-Docker-Github-Action@3.02 - with: - registry: docker.pkg.github.com - name: ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - dockerfile: Dockerfile - snapshot: false - tags: "${{ steps.extract_branch.outputs.branch }}" - buildoptions: "--pull" diff --git a/.github/workflows/pr-integration-tests.yml b/.github/workflows/pr-integration-tests.yml new file mode 100644 index 00000000..74cecabb --- /dev/null +++ b/.github/workflows/pr-integration-tests.yml @@ -0,0 +1,104 @@ +name: CI + +on: + push: + paths-ignore: + - ".gitignore" + - "LICENSE" + - "*.md" + - ".github/ISSUE_TEMPLATE/**" + pull_request: + paths-ignore: + - ".gitignore" + - "LICENSE" + - "*.md" + - ".github/ISSUE_TEMPLATE/**" + +jobs: + ks8: + runs-on: ubuntu-latest + strategy: + matrix: + browser: [chrome] + steps: + - name: Checkout tackle-ui + uses: actions/checkout@v2 + with: + path: tackle-ui + - name: Checkout tackle-ui-tests + uses: actions/checkout@v2 + with: + repository: konveyor/tackle-ui-tests + path: tackle-ui-tests + - name: Setup Minikube + uses: manusa/actions-setup-minikube@v2.3.1 + with: + minikube version: v1.18.1 + kubernetes version: v1.20.2 + start args: "--addons=registry --addons=ingress" + - name: Validate Minikube + run: minikube status | grep Running + - name: Validate Cluster + run: kubectl get nodes + - name: Validate enabled addon in arg + run: minikube addons list -o json | jq '.registry.Status' | grep enabled + - name: Kubectl create namespace + run: kubectl create ns tackle + + - name: Deploy tackle + run: sleep 60s && kubectl create -f tackle/kubernetes/kubernetes-tackle.yaml -n tackle + + - name: Verify keycloak + run: kubectl wait deployment/keycloak --for condition=available --timeout=-1s -n tackle + - name: Verify tackle-controls + run: kubectl wait deployment/tackle-controls --for condition=available --timeout=-1s -n tackle + - name: Verify tackle-application-inventory + run: kubectl wait deployment/tackle-application-inventory --for condition=available --timeout=-1s -n tackle + - name: Verify tackle-pathfinder + run: kubectl wait deployment/tackle-pathfinder --for condition=available --timeout=-1s -n tackle + - name: Verify tackle-ui + run: kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle + + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: Build JS + run: | + yarn install + yarn build + - name: Build container image + run: | + eval $(minikube docker-env) + docker build -t tackle-ui:current-pr . + - name: Set custom tackle-ui + run: | + kubectl patch deployment tackle-ui --patch '{"spec":{"template":{"spec":{"containers":[{"name":"tackle-ui","imagePullPolicy":"Never"}]}}}}' -n tackle + kubectl set image deployment/tackle-ui tackle-ui=tackle-ui:current-pr -n tackle + kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle + + - name: Wait for Ingress + run: | + bash -c 'external_ip=""; + while [ -z $external_ip ]; + do echo "Waiting for end point..."; + external_ip=$(kubectl get ingress tackle --template="{{range .status.loadBalancer.ingress}}{{.ip}}{{end}}" -n tackle);[ -z "$external_ip" ] && + sleep 10; + done; + echo "End point ready:" && + echo $external_ip; + export endpoint=$external_ip; + echo "CYPRESS_tackleUrl=https://$external_ip" >>$GITHUB_ENV' + + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + working-directory: tackle-ui-tests + record: false + start: npx echo "Starting Minikube Cypress tests" + config: pageLoadTimeout=100000 + browser: ${{ matrix.browser }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CYPRESS_user: admin + CYPRESS_pass: admin From e81a6cf16e6cec56fbcf200ff63acc7f9bc89fcd Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 9 Jul 2021 12:12:40 +0200 Subject: [PATCH 27/53] Change name --- .github/workflows/pr-integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-integration-tests.yml b/.github/workflows/pr-integration-tests.yml index 74cecabb..a82f6481 100644 --- a/.github/workflows/pr-integration-tests.yml +++ b/.github/workflows/pr-integration-tests.yml @@ -1,4 +1,4 @@ -name: CI +name: Integration tests on: push: From 77dd074d2fd4c7c00bc11af35fa9d91c597702a6 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 9 Jul 2021 12:14:26 +0200 Subject: [PATCH 28/53] Change test name --- .../{pr-integration-tests.yml => pr-regresion-tests.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{pr-integration-tests.yml => pr-regresion-tests.yml} (99%) diff --git a/.github/workflows/pr-integration-tests.yml b/.github/workflows/pr-regresion-tests.yml similarity index 99% rename from .github/workflows/pr-integration-tests.yml rename to .github/workflows/pr-regresion-tests.yml index a82f6481..31ae61a6 100644 --- a/.github/workflows/pr-integration-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -1,4 +1,4 @@ -name: Integration tests +name: Regresion tests on: push: From a4b8ccf07997930c5ca1017310f471287bfac438 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 9 Jul 2021 12:17:55 +0200 Subject: [PATCH 29/53] Fix location --- .github/workflows/pr-regresion-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index 31ae61a6..e20f060b 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -46,7 +46,7 @@ jobs: run: kubectl create ns tackle - name: Deploy tackle - run: sleep 60s && kubectl create -f tackle/kubernetes/kubernetes-tackle.yaml -n tackle + run: sleep 60s && kubectl create -f tackle-ui/kubernetes/kubernetes-tackle.yaml -n tackle - name: Verify keycloak run: kubectl wait deployment/keycloak --for condition=available --timeout=-1s -n tackle From 4dc2ec7a481ab46c38b4beb23a904ab50bfc5ebd Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 9 Jul 2021 12:22:19 +0200 Subject: [PATCH 30/53] clone tackle project --- .github/workflows/pr-regresion-tests.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index e20f060b..119c73dd 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -24,12 +24,17 @@ jobs: - name: Checkout tackle-ui uses: actions/checkout@v2 with: - path: tackle-ui + path: tackle-ui - name: Checkout tackle-ui-tests uses: actions/checkout@v2 with: repository: konveyor/tackle-ui-tests path: tackle-ui-tests + - name: Checkout tackle + uses: actions/checkout@v2 + with: + repository: konveyor/tackle + path: tackle - name: Setup Minikube uses: manusa/actions-setup-minikube@v2.3.1 with: @@ -46,7 +51,7 @@ jobs: run: kubectl create ns tackle - name: Deploy tackle - run: sleep 60s && kubectl create -f tackle-ui/kubernetes/kubernetes-tackle.yaml -n tackle + run: sleep 60s && kubectl create -f tackle/kubernetes/kubernetes-tackle.yaml -n tackle - name: Verify keycloak run: kubectl wait deployment/keycloak --for condition=available --timeout=-1s -n tackle From 2ebcfad33c8dfe77dbbe4f75fc039fdfd1240887 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 9 Jul 2021 12:31:10 +0200 Subject: [PATCH 31/53] Build directory --- .github/workflows/pr-regresion-tests.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index 119c73dd..de9499dd 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -24,17 +24,17 @@ jobs: - name: Checkout tackle-ui uses: actions/checkout@v2 with: - path: tackle-ui + path: tackle-ui + - name: Checkout tackle + uses: actions/checkout@v2 + with: + repository: konveyor/tackle + path: tackle - name: Checkout tackle-ui-tests uses: actions/checkout@v2 with: repository: konveyor/tackle-ui-tests path: tackle-ui-tests - - name: Checkout tackle - uses: actions/checkout@v2 - with: - repository: konveyor/tackle - path: tackle - name: Setup Minikube uses: manusa/actions-setup-minikube@v2.3.1 with: @@ -70,12 +70,12 @@ jobs: node-version: 12.x - name: Build JS run: | - yarn install - yarn build + yarn --cwd tackle-ui install + yarn --cwd tackle-ui build - name: Build container image run: | eval $(minikube docker-env) - docker build -t tackle-ui:current-pr . + docker build -t tackle-ui:current-pr tackle-ui - name: Set custom tackle-ui run: | kubectl patch deployment tackle-ui --patch '{"spec":{"template":{"spec":{"containers":[{"name":"tackle-ui","imagePullPolicy":"Never"}]}}}}' -n tackle From 79d08c5d2aada7db74919ed939d9c6df8ea4d123 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 9 Jul 2021 13:03:10 +0200 Subject: [PATCH 32/53] Change build image registry --- .github/workflows/pr-regresion-tests.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index de9499dd..41c7a124 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -73,13 +73,11 @@ jobs: yarn --cwd tackle-ui install yarn --cwd tackle-ui build - name: Build container image - run: | - eval $(minikube docker-env) - docker build -t tackle-ui:current-pr tackle-ui + run: docker build -t tackle/tackle-ui:current-pr tackle-ui - name: Set custom tackle-ui run: | kubectl patch deployment tackle-ui --patch '{"spec":{"template":{"spec":{"containers":[{"name":"tackle-ui","imagePullPolicy":"Never"}]}}}}' -n tackle - kubectl set image deployment/tackle-ui tackle-ui=tackle-ui:current-pr -n tackle + kubectl set image deployment/tackle-ui tackle-ui=tackle/tackle-ui:current-pr -n tackle kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle - name: Wait for Ingress From d0d95770bc49766a39b650e5d2632075f338fcff Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 9 Jul 2021 13:38:11 +0200 Subject: [PATCH 33/53] Force error to verify integration tests catches bug --- .../application-form/application-form.tsx | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/src/pages/application-inventory/application-list/components/application-form/application-form.tsx b/src/pages/application-inventory/application-list/components/application-form/application-form.tsx index 55196771..958e0087 100644 --- a/src/pages/application-inventory/application-list/components/application-form/application-form.tsx +++ b/src/pages/application-inventory/application-list/components/application-form/application-form.tsx @@ -5,10 +5,7 @@ import { useFormik, FormikProvider, FormikHelpers } from "formik"; import { object, string } from "yup"; import { - ActionGroup, Alert, - Button, - ButtonVariant, Form, FormGroup, TextArea, @@ -342,31 +339,6 @@ export const ApplicationForm: React.FC = ({ )} /> - - - - - ); From 31bcb6b98f4017d23651cc5d177fa2c8fadcf582 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 9 Jul 2021 14:04:59 +0200 Subject: [PATCH 34/53] Restore bug --- .github/workflows/pr-regresion-tests.yml | 23 +++++++-------- .../application-form/application-form.tsx | 28 +++++++++++++++++++ 2 files changed, 40 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index 41c7a124..f6f2fe36 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -25,11 +25,22 @@ jobs: uses: actions/checkout@v2 with: path: tackle-ui + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: Build JS + run: | + yarn --cwd tackle-ui install + yarn --cwd tackle-ui build + - name: Build container image + run: docker build -t tackle/tackle-ui:current-pr tackle-ui + - name: Checkout tackle uses: actions/checkout@v2 with: repository: konveyor/tackle - path: tackle + path: tackle - name: Checkout tackle-ui-tests uses: actions/checkout@v2 with: @@ -64,16 +75,6 @@ jobs: - name: Verify tackle-ui run: kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: 12.x - - name: Build JS - run: | - yarn --cwd tackle-ui install - yarn --cwd tackle-ui build - - name: Build container image - run: docker build -t tackle/tackle-ui:current-pr tackle-ui - name: Set custom tackle-ui run: | kubectl patch deployment tackle-ui --patch '{"spec":{"template":{"spec":{"containers":[{"name":"tackle-ui","imagePullPolicy":"Never"}]}}}}' -n tackle diff --git a/src/pages/application-inventory/application-list/components/application-form/application-form.tsx b/src/pages/application-inventory/application-list/components/application-form/application-form.tsx index 958e0087..55196771 100644 --- a/src/pages/application-inventory/application-list/components/application-form/application-form.tsx +++ b/src/pages/application-inventory/application-list/components/application-form/application-form.tsx @@ -5,7 +5,10 @@ import { useFormik, FormikProvider, FormikHelpers } from "formik"; import { object, string } from "yup"; import { + ActionGroup, Alert, + Button, + ButtonVariant, Form, FormGroup, TextArea, @@ -339,6 +342,31 @@ export const ApplicationForm: React.FC = ({ )} /> + + + + + ); From 920bae9ef217e4223df490a5877973b90aadfe9c Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Tue, 13 Jul 2021 10:43:56 +0200 Subject: [PATCH 35/53] Restore file --- .github/workflows/test-containers.yml | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/test-containers.yml diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml new file mode 100644 index 00000000..a8b50ace --- /dev/null +++ b/.github/workflows/test-containers.yml @@ -0,0 +1,33 @@ +name: Test containers + +on: [push] + +jobs: + container-images: + if: ${{ github.event_name != 'pull_request' && github.repository_owner != 'konveyor' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: Build + run: | + yarn install + yarn build + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch + - name: Push to GitHub Packages + uses: elgohr/Publish-Docker-Github-Action@3.02 + with: + registry: docker.pkg.github.com + name: ${{ github.repository_owner }}/${{ github.event.repository.name }}/tackle-ui + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + dockerfile: Dockerfile + snapshot: false + tags: "${{ steps.extract_branch.outputs.branch }}" + buildoptions: "--pull" From 3094f49aecb91dc9687629cfcdbacc40f53179b7 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 6 Aug 2021 16:30:30 +0200 Subject: [PATCH 36/53] force commit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 64f634c6..5906da9b 100644 --- a/README.md +++ b/README.md @@ -131,3 +131,4 @@ The image can be pushed running: ```shell podman push quay.io/$USERNAME/tackle-ui ``` + From dcfca9b562e3e0b48ba9fb6c93feb8c71cf02585 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 6 Aug 2021 16:48:26 +0200 Subject: [PATCH 37/53] Restore file --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 5906da9b..64f634c6 100644 --- a/README.md +++ b/README.md @@ -131,4 +131,3 @@ The image can be pushed running: ```shell podman push quay.io/$USERNAME/tackle-ui ``` - From 2fa68e3bce9e671f84e59eb3124bcea71d4b3b05 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 6 Aug 2021 17:50:14 +0200 Subject: [PATCH 38/53] Not set custom image --- .github/workflows/pr-regresion-tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index f6f2fe36..4a0771ed 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -75,11 +75,11 @@ jobs: - name: Verify tackle-ui run: kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle - - name: Set custom tackle-ui - run: | - kubectl patch deployment tackle-ui --patch '{"spec":{"template":{"spec":{"containers":[{"name":"tackle-ui","imagePullPolicy":"Never"}]}}}}' -n tackle - kubectl set image deployment/tackle-ui tackle-ui=tackle/tackle-ui:current-pr -n tackle - kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle + # - name: Set custom tackle-ui + # run: | + # kubectl patch deployment tackle-ui --patch '{"spec":{"template":{"spec":{"containers":[{"name":"tackle-ui","imagePullPolicy":"Never"}]}}}}' -n tackle + # kubectl set image deployment/tackle-ui tackle-ui=tackle/tackle-ui:current-pr -n tackle + # kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle - name: Wait for Ingress run: | From e9f1f575e5c4998192c7b29a0a287b583d9d44de Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Sun, 8 Aug 2021 08:56:20 +0200 Subject: [PATCH 39/53] Restore custom image and change user/password --- .github/workflows/pr-regresion-tests.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index 4a0771ed..54536f12 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -75,11 +75,11 @@ jobs: - name: Verify tackle-ui run: kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle - # - name: Set custom tackle-ui - # run: | - # kubectl patch deployment tackle-ui --patch '{"spec":{"template":{"spec":{"containers":[{"name":"tackle-ui","imagePullPolicy":"Never"}]}}}}' -n tackle - # kubectl set image deployment/tackle-ui tackle-ui=tackle/tackle-ui:current-pr -n tackle - # kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle + - name: Set custom tackle-ui + run: | + kubectl patch deployment tackle-ui --patch '{"spec":{"template":{"spec":{"containers":[{"name":"tackle-ui","imagePullPolicy":"Never"}]}}}}' -n tackle + kubectl set image deployment/tackle-ui tackle-ui=tackle/tackle-ui:current-pr -n tackle + kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle - name: Wait for Ingress run: | @@ -104,5 +104,5 @@ jobs: browser: ${{ matrix.browser }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CYPRESS_user: admin - CYPRESS_pass: admin + CYPRESS_user: tackle + CYPRESS_pass: password From d24c7785e4a891e2bdc110d6f4c1691f9bdfa269 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Mon, 9 Aug 2021 07:35:43 +0200 Subject: [PATCH 40/53] add retries --- .github/workflows/pr-regresion-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index 54536f12..2f81bb83 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -100,7 +100,7 @@ jobs: working-directory: tackle-ui-tests record: false start: npx echo "Starting Minikube Cypress tests" - config: pageLoadTimeout=100000 + config: pageLoadTimeout=100000,retries=2 browser: ${{ matrix.browser }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 5674626c8e62641dd30dec9d43fa3d69e40804ee Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Wed, 11 Aug 2021 17:53:32 +0200 Subject: [PATCH 41/53] force commit --- cypress.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress.json b/cypress.json index b2cdde57..611c51bc 100644 --- a/cypress.json +++ b/cypress.json @@ -15,4 +15,4 @@ "runMode": 2, "openMode": 0 } -} \ No newline at end of file +} From 4f52ce3da418523e3e1b27aa6069f68d75bc4c73 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Wed, 11 Aug 2021 17:54:18 +0200 Subject: [PATCH 42/53] restore changes --- cypress.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress.json b/cypress.json index 611c51bc..b2cdde57 100644 --- a/cypress.json +++ b/cypress.json @@ -15,4 +15,4 @@ "runMode": 2, "openMode": 0 } -} +} \ No newline at end of file From 025b70d911c2bb21154e92bfa9575e93a6772856 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 12 Aug 2021 17:30:51 +0200 Subject: [PATCH 43/53] force commit --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index c0ed2a82..b7964947 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,3 +17,4 @@ ENTRYPOINT ["/entrypoint.sh"] # Run script uses standard ways to run the application CMD /usr/libexec/s2i/run + From ed01f9140250b5c4ad2dff98658ca66aef6cf488 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 12 Aug 2021 17:31:10 +0200 Subject: [PATCH 44/53] Restore change --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b7964947..c0ed2a82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,4 +17,3 @@ ENTRYPOINT ["/entrypoint.sh"] # Run script uses standard ways to run the application CMD /usr/libexec/s2i/run - From 6ba9e0bc5a0807fd0fbeeb3b3afa923cc8b24822 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 3 Sep 2021 10:54:13 +0200 Subject: [PATCH 45/53] remove video recording and avoid firing dependabot PRs --- .github/workflows/pr-regresion-tests.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index 2f81bb83..0ec77ee9 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -2,6 +2,8 @@ name: Regresion tests on: push: + branches-ignore: + - "dependabot/**" paths-ignore: - ".gitignore" - "LICENSE" @@ -100,9 +102,14 @@ jobs: working-directory: tackle-ui-tests record: false start: npx echo "Starting Minikube Cypress tests" - config: pageLoadTimeout=100000,retries=2 + config: pageLoadTimeout=100000,retries=2,video=false browser: ${{ matrix.browser }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CYPRESS_user: tackle CYPRESS_pass: password + - uses: actions/upload-artifact@v1 + if: failure() + with: + name: integration-tests-screenshots + path: tackle-ui-tests/cypress/screenshots From 93c78ea29d7e237146bce040305710b3bc6e0027 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 30 Sep 2021 09:49:06 +0200 Subject: [PATCH 46/53] Add tiers --- .github/workflows/pr-regresion-tests.yml | 36 +++++++++++++++++++----- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index 0ec77ee9..2f95c664 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -17,11 +17,8 @@ on: - ".github/ISSUE_TEMPLATE/**" jobs: - ks8: + container-image: runs-on: ubuntu-latest - strategy: - matrix: - browser: [chrome] steps: - name: Checkout tackle-ui uses: actions/checkout@v2 @@ -37,6 +34,28 @@ jobs: yarn --cwd tackle-ui build - name: Build container image run: docker build -t tackle/tackle-ui:current-pr tackle-ui + - name: Save container image + run: docker save -o tackle-ui.tar tackle/tackle-ui:current-pr + - name: Upload container image + uses: actions/upload-artifact@v2 + with: + name: tackle-ui + path: tackle-ui.tar + + ks8: + runs-on: ubuntu-latest + needs: [native-image] + strategy: + matrix: + tier: ["@tier1", "@tier2", "@tier3"] + steps: + - name: Download container image + uses: actions/download-artifact@v2 + with: + name: tackle-ui + path: . + - name: Load container image + run: docker load -i tackle-ui.tar - name: Checkout tackle uses: actions/checkout@v2 @@ -68,8 +87,8 @@ jobs: - name: Verify keycloak run: kubectl wait deployment/keycloak --for condition=available --timeout=-1s -n tackle - - name: Verify tackle-controls - run: kubectl wait deployment/tackle-controls --for condition=available --timeout=-1s -n tackle + - name: Verify tackle-ui + run: kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle - name: Verify tackle-application-inventory run: kubectl wait deployment/tackle-application-inventory --for condition=available --timeout=-1s -n tackle - name: Verify tackle-pathfinder @@ -103,11 +122,14 @@ jobs: record: false start: npx echo "Starting Minikube Cypress tests" config: pageLoadTimeout=100000,retries=2,video=false - browser: ${{ matrix.browser }} + browser: chrome + spec: | + **/*.test.ts env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CYPRESS_user: tackle CYPRESS_pass: password + CYPRESS_grepTags: ${{ matrix.tier }} - uses: actions/upload-artifact@v1 if: failure() with: From c8a4547923dc955db88cc203c906ded88175e7f7 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 30 Sep 2021 10:02:05 +0200 Subject: [PATCH 47/53] fix dependencies --- .github/workflows/ci-actions.yml | 139 ----------------------- .github/workflows/pr-regresion-tests.yml | 2 +- 2 files changed, 1 insertion(+), 140 deletions(-) diff --git a/.github/workflows/ci-actions.yml b/.github/workflows/ci-actions.yml index 2b729ecb..feb30c00 100644 --- a/.github/workflows/ci-actions.yml +++ b/.github/workflows/ci-actions.yml @@ -189,142 +189,3 @@ jobs: snapshot: false tags: "main" buildoptions: "--pull" - - test-container-images: - needs: [container-images] - runs-on: ubuntu-latest - strategy: - matrix: - os: [ubuntu-latest] - browser: [chrome, firefox] - services: - keycloak: - image: quay.io/keycloak/keycloak:12.0.2 - ports: - - 8180:8080 - env: - KEYCLOAK_USER: admin - KEYCLOAK_PASSWORD: admin - options: >- - --health-cmd "curl --fail http://localhost:8080/auth || exit 1" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - controls-db: - image: postgres:13.1 - ports: - - 5433:5432 - env: - POSTGRES_USER: user - POSTGRES_PASSWORD: password - POSTGRES_DB: controls_db - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - application-inventory-db: - image: postgres:13.1 - ports: - - 5434:5432 - env: - POSTGRES_USER: user - POSTGRES_PASSWORD: password - POSTGRES_DB: application_inventory_db - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - pathfinder-db: - image: postgres:13.1 - ports: - - 5435:5432 - env: - POSTGRES_USER: user - POSTGRES_PASSWORD: password - POSTGRES_DB: pathfinder_db - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - steps: - - uses: actions/checkout@v2 - - name: Keycloak Admin CLI - uses: carlosthe19916/keycloak-action@0.4 - with: - server: http://keycloak:8080/auth - username: admin - password: admin - kcadm: create realms -f konveyor-realm.json - - name: Controls API - run: | - docker run -d --name controls --network ${{ job.services.controls-db.network }} --network-alias controls -p 8081:8080 \ - -e QUARKUS_HTTP_PORT=8080 \ - -e QUARKUS_DATASOURCE_USERNAME=user \ - -e QUARKUS_DATASOURCE_PASSWORD=password \ - -e QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://controls-db:5432/controls_db \ - -e QUARKUS_OIDC_AUTH_SERVER_URL=http://keycloak:8080/auth/realms/konveyor \ - -e QUARKUS_OIDC_CLIENT_ID=controls-api \ - -e QUARKUS_OIDC_CREDENTIALS_SECRET=secret \ - quay.io/konveyor/tackle-controls:latest-native - sleep 5s && docker logs controls - - name: Application inventory API - run: | - docker run -d --name application-inventory --network ${{ job.services.application-inventory-db.network }} --network-alias application-inventory -p 8082:8080 \ - -e QUARKUS_HTTP_PORT=8080 \ - -e QUARKUS_DATASOURCE_USERNAME=user \ - -e QUARKUS_DATASOURCE_PASSWORD=password \ - -e QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://application-inventory-db:5432/application_inventory_db \ - -e QUARKUS_OIDC_AUTH_SERVER_URL=http://keycloak:8080/auth/realms/konveyor \ - -e QUARKUS_OIDC_CLIENT_ID=application-inventory-api \ - -e QUARKUS_OIDC_CREDENTIALS_SECRET=secret \ - -e IO_TACKLE_APPLICATIONINVENTORY_SERVICES_CONTROLS_SERVICE=controls:8080 \ - quay.io/konveyor/tackle-application-inventory:latest-native - sleep 5s && docker logs application-inventory - - name: Pathfinder API - run: | - docker run -d --name pathfinder --network ${{ job.services.pathfinder-db.network }} --network-alias pathfinder -p 8083:8080 \ - -e QUARKUS_HTTP_PORT=8080 \ - -e QUARKUS_DATASOURCE_USERNAME=user \ - -e QUARKUS_DATASOURCE_PASSWORD=password \ - -e QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://pathfinder-db:5432/pathfinder_db \ - -e QUARKUS_OIDC_AUTH_SERVER_URL=http://keycloak:8080/auth/realms/konveyor \ - -e QUARKUS_OIDC_CLIENT_ID=pathfinder-api \ - -e QUARKUS_OIDC_CREDENTIALS_SECRET=secret \ - quay.io/konveyor/tackle-pathfinder:latest-native - sleep 5s && docker logs pathfinder - - name: Tackle UI - run: | - docker run -d --name tackle-ui --network ${{ job.services.keycloak.network }} --network-alias tackle-ui -p 3000:8080 \ - -e SSO_REALM=konveyor \ - -e SSO_CLIENT_ID=tackle-ui \ - -e SSO_SERVER_URL=http://keycloak:8080/auth \ - -e CONTROLS_API_URL=http://controls:8080/controls \ - -e APPLICATION_INVENTORY_API_URL=http://application-inventory:8080/application-inventory \ - -e PATHFINDER_API_URL=http://pathfinder:8080/pathfinder \ - quay.io/konveyor/tackle-ui:main - sleep 5s && docker logs tackle-ui - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - record: false - wait-on: "http://localhost:3000" - wait-on-timeout: 120 - config: pageLoadTimeout=100000 - browser: ${{ matrix.browser }} - spec: cypress/**/*.test.ts - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CYPRESS_auth_base_url: http://localhost:3000/auth - - uses: actions/upload-artifact@v1 - if: failure() - with: - name: container-screenshots-${{ matrix.os }}-${{ matrix.browser }} - path: cypress/screenshots - - uses: actions/upload-artifact@v1 - if: always() - with: - name: container-videos-${{ matrix.os }}-${{ matrix.browser }} - path: cypress/videos diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index 2f95c664..cee3f58e 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -44,7 +44,7 @@ jobs: ks8: runs-on: ubuntu-latest - needs: [native-image] + needs: [container-image] strategy: matrix: tier: ["@tier1", "@tier2", "@tier3"] From c68bdfd180b6e8eaf0524f56cb41afbde89a0cab Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 30 Sep 2021 10:27:07 +0200 Subject: [PATCH 48/53] Fix verify step --- .github/workflows/pr-regresion-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index cee3f58e..3453ce16 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -87,8 +87,8 @@ jobs: - name: Verify keycloak run: kubectl wait deployment/keycloak --for condition=available --timeout=-1s -n tackle - - name: Verify tackle-ui - run: kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle + - name: Verify tackle-controls + run: kubectl wait deployment/tackle-controls --for condition=available --timeout=-1s -n tackle - name: Verify tackle-application-inventory run: kubectl wait deployment/tackle-application-inventory --for condition=available --timeout=-1s -n tackle - name: Verify tackle-pathfinder From 8cd54aa29a9769133629c41edc6bf8b2275a2f28 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Thu, 30 Sep 2021 11:13:22 +0200 Subject: [PATCH 49/53] fail-fast: false --- .github/workflows/pr-regresion-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index 3453ce16..829b1340 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -46,8 +46,9 @@ jobs: runs-on: ubuntu-latest needs: [container-image] strategy: + fail-fast: false matrix: - tier: ["@tier1", "@tier2", "@tier3"] + tier: ["@tier1", "@tier2", "@tier3"] steps: - name: Download container image uses: actions/download-artifact@v2 From 44b467ccb77accab682e223126e01742aceb7e77 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 1 Oct 2021 08:00:24 +0200 Subject: [PATCH 50/53] use to dev branch --- .github/workflows/pr-regresion-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index 829b1340..fc35f7cb 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -68,6 +68,7 @@ jobs: with: repository: konveyor/tackle-ui-tests path: tackle-ui-tests + ref: dev - name: Setup Minikube uses: manusa/actions-setup-minikube@v2.3.1 with: From 5272fa6c48fa3ab6107ab58f8d7478a5197f5ae6 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 1 Oct 2021 08:02:44 +0200 Subject: [PATCH 51/53] change job name --- .github/workflows/pr-regresion-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index fc35f7cb..d0cfbf87 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -42,7 +42,7 @@ jobs: name: tackle-ui path: tackle-ui.tar - ks8: + k8s: runs-on: ubuntu-latest needs: [container-image] strategy: From 1d4d5bcf29ab3bd7c827a67ecf787d189b3a4fcc Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 1 Oct 2021 10:41:42 +0200 Subject: [PATCH 52/53] replace cypress-io/github-action@v2 by npx --- .github/workflows/pr-regresion-tests.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index d0cfbf87..3ef9219e 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -48,7 +48,7 @@ jobs: strategy: fail-fast: false matrix: - tier: ["@tier1", "@tier2", "@tier3"] + tier: ["@tier1", "@tier2", "@tier3"] steps: - name: Download container image uses: actions/download-artifact@v2 @@ -118,20 +118,8 @@ jobs: echo "CYPRESS_tackleUrl=https://$external_ip" >>$GITHUB_ENV' - name: Cypress run - uses: cypress-io/github-action@v2 - with: - working-directory: tackle-ui-tests - record: false - start: npx echo "Starting Minikube Cypress tests" - config: pageLoadTimeout=100000,retries=2,video=false - browser: chrome - spec: | - **/*.test.ts - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CYPRESS_user: tackle - CYPRESS_pass: password - CYPRESS_grepTags: ${{ matrix.tier }} + run: | + cd tackle-ui-tests && npx cypress run --spec **/*.test.ts --env grepTags=${{ matrix.tier }},user=tackle,pass=password,tackleUrl=${{ env.CYPRESS_tackleUrl }} - uses: actions/upload-artifact@v1 if: failure() with: From 8e4bbca76c0f1734866a1e5866f26f7c1bbb918c Mon Sep 17 00:00:00 2001 From: Carlos Esteban Feria Vila <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 1 Oct 2021 11:08:09 +0200 Subject: [PATCH 53/53] Add `npm install .` --- .github/workflows/pr-regresion-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-regresion-tests.yml b/.github/workflows/pr-regresion-tests.yml index 3ef9219e..1326cebf 100644 --- a/.github/workflows/pr-regresion-tests.yml +++ b/.github/workflows/pr-regresion-tests.yml @@ -119,7 +119,9 @@ jobs: - name: Cypress run run: | - cd tackle-ui-tests && npx cypress run --spec **/*.test.ts --env grepTags=${{ matrix.tier }},user=tackle,pass=password,tackleUrl=${{ env.CYPRESS_tackleUrl }} + cd tackle-ui-tests + npm install . + npx cypress run --spec **/*.test.ts --env grepTags=${{ matrix.tier }},user=tackle,pass=password,tackleUrl=${{ env.CYPRESS_tackleUrl }} - uses: actions/upload-artifact@v1 if: failure() with: