Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing new trigger Frogbot tests against dev-master #660

Open
wants to merge 33 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
10d1a89
replaces 'return' to 'continue' so we iterate all the PRs even if we …
eranturgeman Mar 12, 2024
93a99d0
cherry pick mistaken commit to dev
eranturgeman Mar 12, 2024
73f9b8f
Adding a new trigger for Frogbot tests
eranturgeman Mar 12, 2024
4cb86bd
.
eranturgeman Mar 12, 2024
4d64e2e
added new workflow for on-demand trigger
eranturgeman Mar 12, 2024
db764bb
changed credentials names so we can add new credentials to dev-master…
eranturgeman Mar 12, 2024
4c67c46
.
eranturgeman Mar 12, 2024
27498aa
.
eranturgeman Mar 12, 2024
4203c08
.
eranturgeman Mar 12, 2024
cce49ab
.
eranturgeman Mar 12, 2024
1e2045a
new workflow file to enable triggering Frogbot's tests against dev-ma…
eranturgeman Mar 12, 2024
1915812
Merge branch 'dev' of https://github.com/jfrog/frogbot into new-trigg…
eranturgeman Mar 12, 2024
c112a62
attempt to unify workflow files
eranturgeman Mar 13, 2024
88ef840
attempt to unify workflow files
eranturgeman Mar 13, 2024
b5b91bc
attempt to unify workflow files 2
eranturgeman Mar 13, 2024
0d04af2
attempt to unify workflow files 3
eranturgeman Mar 13, 2024
4f8b9ce
ready to review
eranturgeman Mar 13, 2024
1764235
minor fix
eranturgeman Mar 13, 2024
4fae52f
fix comment
eranturgeman Mar 18, 2024
95c054d
Merge branch 'new-trigger-for-frogbot-tests' of https://github.com/er…
eranturgeman Mar 18, 2024
ce2792c
minor changes
eranturgeman Mar 18, 2024
640c2b5
temporary print the value
eranturgeman Mar 26, 2024
1da358d
temporary print values
eranturgeman Mar 26, 2024
6ad95a1
temporary print values 2
eranturgeman Mar 26, 2024
dddb5e1
temporary print values 3
eranturgeman Mar 26, 2024
8c3bd57
temporary print values 4
eranturgeman Mar 26, 2024
e78318a
temporary print values 5
eranturgeman Mar 27, 2024
33a2067
temporary print values 6
eranturgeman Mar 27, 2024
cd99a6e
temporary print values 7
eranturgeman Mar 27, 2024
c844de9
temporary print values 8
eranturgeman Mar 27, 2024
c2382d2
temporary print values 9
eranturgeman Mar 27, 2024
c3f8d91
temporary print values 10
eranturgeman Mar 27, 2024
b39f9cd
temporary print values 11
eranturgeman Mar 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 23 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ on:
pull_request_target:
types: [labeled]

workflow_dispatch:

# Ensures that only the latest commit is running for each PR at a time.
# Ignores this rule for push events.
concurrency:
group: ${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
Pretest:
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push'
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Unlabel 'safe to test'
Expand All @@ -22,6 +24,14 @@ jobs:
with:
labels: "safe to test"

- name: Declare environment
run: |
if [ "${{ github.event_name }}" = "push" ]; then
echo "Working in production environment."
elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "Working in dev-master environment."
fi

- name: Checkout code
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -115,8 +125,8 @@ jobs:
if: ${{ matrix.suite.name != 'GitHub Integration' || matrix.os == 'ubuntu' }}
run: go test github.com/jfrog/frogbot/v2/${{ matrix.suite.package }} -v -race -timeout 30m -cover
env:
JF_URL: ${{ secrets.PLATFORM_URL }}
JF_ACCESS_TOKEN: ${{ secrets.PLATFORM_ADMIN_TOKEN }}
JF_URL: ${{ github.event_name == 'workflow_dispatch' && secrets.DEV_MASTER_PLATFORM_URL || secrets.PLATFORM_URL }}
JF_ACCESS_TOKEN: ${{ github.event_name == 'workflow_dispatch' && secrets.DEV_MASTER_PLATFORM_ADMIN_TOKEN || secrets.PLATFORM_ADMIN_TOKEN }}
eranturgeman marked this conversation as resolved.
Show resolved Hide resolved

github-integration:
name: GitHub Integration Tests
Expand All @@ -132,8 +142,10 @@ jobs:
- name: Run Tests
run: go test github_test.go integrationutils.go commands.go -v -race -timeout 30m -cover
env:
JF_URL: ${{ secrets.PLATFORM_URL }}
JF_ACCESS_TOKEN: ${{ secrets.PLATFORM_ADMIN_TOKEN }}
# If the action is triggered by 'workflow_dispatch' the credentials are: DEV_MASTER_PLATFORM_URL & DEV_MASTER_PLATFORM_ADMIN_TOKEN
# If the action is triggered by a 'pull request' event the credentials are: PLATFORM_URL & PLATFORM_ADMIN_TOKEN
JF_URL: ${{ github.event_name == 'workflow_dispatch' && secrets.DEV_MASTER_PLATFORM_URL || secrets.PLATFORM_URL }}
JF_ACCESS_TOKEN: ${{ github.event_name == 'workflow_dispatch' && secrets.DEV_MASTER_PLATFORM_ADMIN_TOKEN || secrets.PLATFORM_ADMIN_TOKEN }}
FROGBOT_TESTS_GITHUB_TOKEN: ${{ secrets.FROGBOT_TESTS_GITHUB_TOKEN }}

azure-integration:
Expand All @@ -154,8 +166,8 @@ jobs:
- name: Run Tests
run: go test azure_test.go integrationutils.go commands.go -v -race -timeout 30m -cover
env:
JF_URL: ${{ secrets.PLATFORM_URL }}
JF_ACCESS_TOKEN: ${{ secrets.PLATFORM_ADMIN_TOKEN }}
JF_URL: ${{ github.event_name == 'workflow_dispatch' && secrets.DEV_MASTER_PLATFORM_URL || secrets.PLATFORM_URL }}
JF_ACCESS_TOKEN: ${{ github.event_name == 'workflow_dispatch' && secrets.DEV_MASTER_PLATFORM_ADMIN_TOKEN || secrets.PLATFORM_ADMIN_TOKEN }}
FROGBOT_TESTS_AZURE_TOKEN: ${{ secrets.FROGBOT_TESTS_AZURE_TOKEN }}

gitlab-integration:
Expand All @@ -176,8 +188,8 @@ jobs:
- name: Run Tests
run: go test gitlab_test.go integrationutils.go commands.go -v -race -timeout 30m -cover
env:
JF_URL: ${{ secrets.PLATFORM_URL }}
JF_ACCESS_TOKEN: ${{ secrets.PLATFORM_ADMIN_TOKEN }}
JF_URL: ${{ github.event_name == 'workflow_dispatch' && secrets.DEV_MASTER_PLATFORM_URL || secrets.PLATFORM_URL }}
JF_ACCESS_TOKEN: ${{ github.event_name == 'workflow_dispatch' && secrets.DEV_MASTER_PLATFORM_ADMIN_TOKEN || secrets.PLATFORM_ADMIN_TOKEN }}
FROGBOT_TESTS_GITLAB_TOKEN: ${{ secrets.FROGBOT_TESTS_GITLAB_TOKEN }}

bitbucket-server-integration:
Expand All @@ -200,8 +212,8 @@ jobs:

- name: Run Tests
env:
JF_URL: ${{ secrets.PLATFORM_URL }}
JF_ACCESS_TOKEN: ${{ secrets.PLATFORM_ADMIN_TOKEN }}
JF_URL: ${{ github.event_name == 'workflow_dispatch' && secrets.DEV_MASTER_PLATFORM_URL || secrets.PLATFORM_URL }}
JF_ACCESS_TOKEN: ${{ github.event_name == 'workflow_dispatch' && secrets.DEV_MASTER_PLATFORM_ADMIN_TOKEN || secrets.PLATFORM_ADMIN_TOKEN }}
FROGBOT_TESTS_BB_SERVER_TOKEN: ${{ secrets.FROGBOT_TESTS_BB_SERVER_TOKEN }}
JFROG_CLI_LOG_LEVEL: "DEBUG"
run: go test -v bitbucket_server_test.go commands.go integrationutils.go
Loading