Skip to content

Commit 4adf3ec

Browse files
committed
JGC-395 - Change repo layout and settings
1 parent 4b8f4bd commit 4adf3ec

35 files changed

+629
-363
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- [ ] All [tests](https://github.com/jfrog/jfrog-cli/CONTRIBUTING.md#tests) have passed. If this feature is not already covered by the tests, new tests have been added.
2-
- [ ] The pull request is targeting the `dev` branch.
2+
- [ ] The pull request is targeting the `master` branch.
33
- [ ] The code has been validated to compile successfully by running `go vet ./...`.
44
- [ ] The code has been formatted properly using `go fmt ./...`.
55

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
open-pull-requests-limit: 10
8+
groups:
9+
go:
10+
update-types:
11+
- minor
12+
- patch

.github/workflows/accessTests.yml

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
name: Access Tests
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
5-
- '**'
6-
tags-ignore:
7-
- '**'
8-
# Triggers the workflow on labeled PRs only.
6+
- "master"
7+
# Triggers the workflow on PRs to master branch only.
98
pull_request_target:
10-
types: [ labeled ]
9+
types: [opened, synchronize]
10+
branches:
11+
- "master"
12+
1113
# Ensures that only the latest commit is running for each PR at a time.
1214
concurrency:
1315
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
@@ -17,33 +19,64 @@ permissions:
1719
contents: read
1820
jobs:
1921
Access-Tests:
20-
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push'
21-
name: Access tests (${{ matrix.os }})
22+
name: Access tests (${{ matrix.os.name }})
2223
strategy:
2324
fail-fast: false
2425
matrix:
25-
os: [ ubuntu, windows, macos ]
26-
runs-on: ${{ matrix.os }}-latest
26+
os:
27+
- name: ubuntu
28+
version: latest
29+
- name: windows
30+
version: latest
31+
- name: macos
32+
version: latest
33+
runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }}
2734
steps:
35+
- name: Skip macOS - JGC-413
36+
if: matrix.os.name == 'macos'
37+
run: |
38+
echo "::warning::JGC-413 - Skip until artifactory bootstrap in osx is fixed"
39+
exit 0
40+
2841
- name: Checkout code
42+
if: matrix.os.name != 'macos'
2943
uses: actions/checkout@v4
3044
with:
3145
ref: ${{ github.event.pull_request.head.sha }}
3246

3347
- name: Setup Go with cache
48+
if: matrix.os.name != 'macos'
3449
uses: jfrog/.github/actions/install-go-with-cache@main
3550

51+
- name: Debug macOS Environment and Set Timeout
52+
if: runner.os == 'macOS'
53+
run: |
54+
echo "=== macOS Debug Information ==="
55+
echo "Architecture: $(uname -m)"
56+
echo "macOS Version: $(sw_vers -productVersion)"
57+
echo "macOS Build: $(sw_vers -buildVersion)"
58+
echo "Available memory: $(system_profiler SPHardwareDataType | grep Memory || echo 'Memory info not available')"
59+
echo "Available disk space: $(df -h)"
60+
echo "Java version: $(java -version 2>&1 || echo 'Java not found')"
61+
echo "Go version: $(go version)"
62+
echo "Setting RT_CONNECTION_TIMEOUT_SECONDS to 2400 for macOS"
63+
echo "RT_CONNECTION_TIMEOUT_SECONDS=2400" >> $GITHUB_ENV
64+
3665
- name: Install local Artifactory
66+
if: matrix.os.name != 'macos'
3767
uses: jfrog/.github/actions/install-local-artifactory@main
3868
with:
3969
RTLIC: ${{ secrets.RTLIC }}
70+
RT_CONNECTION_TIMEOUT_SECONDS: ${{ env.RT_CONNECTION_TIMEOUT_SECONDS || '1200' }}
4071

4172
- name: Get ID Token and Exchange Token
73+
if: matrix.os.name != 'macos'
4274
shell: bash
4375
run: |
4476
ID_TOKEN=$(curl -sLS -H "User-Agent: actions/oidc-client" -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
4577
"${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=jfrog-github" | jq .value | tr -d '"')
4678
echo "JFROG_CLI_OIDC_EXCHANGE_TOKEN_ID=${ID_TOKEN}" >> $GITHUB_ENV
4779
4880
- name: Run Access tests
81+
if: matrix.os.name != 'macos'
4982
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.access --jfrog.url=http://127.0.0.1:8082 --jfrog.adminToken=${{ env.JFROG_TESTS_LOCAL_ACCESS_TOKEN }}

.github/workflows/analysis.yml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
name: "Static Analysis"
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
5-
- '**'
6-
tags-ignore:
7-
- '**'
8-
pull_request:
6+
- "master"
7+
pull_request_target:
8+
types: [opened, synchronize]
9+
branches:
10+
- "master"
911
concurrency:
1012
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
1113
cancel-in-progress: true
1214
jobs:
1315
Go-Lint:
14-
name: Lint ${{ matrix.os }}
15-
strategy:
16-
fail-fast: false
17-
matrix:
18-
os: [ ubuntu, windows, macos ]
19-
runs-on: ${{ matrix.os }}-latest
16+
name: Lint
17+
runs-on: ubuntu-latest
2018
steps:
2119
- name: Checkout code
2220
uses: actions/checkout@v4
@@ -30,7 +28,7 @@ jobs:
3028
run: go vet -v ./...
3129

3230
Static-Check:
33-
name: Static Check ubuntu-latest
31+
name: Static Check
3432
runs-on: ubuntu-latest
3533
steps:
3634
- name: Checkout Source
@@ -41,17 +39,17 @@ jobs:
4139

4240
- name: Run golangci linter
4341
uses: jfrog/.github/actions/golangci-lint@main
44-
42+
4543
Go-Sec:
46-
name: Go-Sec ubuntu-latest
44+
name: Go-Sec
4745
runs-on: ubuntu-latest
4846
steps:
4947
- name: Checkout Source
5048
uses: actions/checkout@v4
5149

5250
- name: Setup Go with cache
5351
uses: jfrog/.github/actions/install-go-with-cache@main
54-
52+
5553
- name: Run Go-Sec scanner
5654
uses: jfrog/.github/actions/gosec-scanner@main
5755

@@ -65,4 +63,20 @@ jobs:
6563
- name: Run ShellCheck
6664
uses: ludeeus/action-shellcheck@master
6765
with:
68-
ignore_paths: '*test*'
66+
ignore_paths: "*test*"
67+
68+
No-Replace:
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Checkout Source
72+
uses: actions/checkout@v4
73+
74+
- name: Check for uncommented replace instructions on JFrog dependencies
75+
run: |
76+
if grep -E '^[[:space:]]*replace[[:space:]]+github\.com/jfrog' go.mod; then
77+
echo "❌ Found uncommented replace directives for JFrog dependencies in go.mod"
78+
echo "All replace directives for JFrog dependencies should be commented out"
79+
exit 1
80+
else
81+
echo "✅ No uncommented replace directives for JFrog dependencies found in go.mod"
82+
fi

.github/workflows/artifactoryTests.yml

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,78 @@
11
name: Artifactory Tests
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
5-
- '**'
6-
tags-ignore:
7-
- '**'
8-
# Triggers the workflow on labeled PRs only.
6+
- "master"
7+
# Triggers the workflow on PRs to master branch only.
98
pull_request_target:
10-
types: [ labeled ]
9+
types: [opened, synchronize]
10+
branches:
11+
- "master"
12+
1113
# Ensures that only the latest commit is running for each PR at a time.
1214
concurrency:
1315
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
1416
cancel-in-progress: true
1517
jobs:
1618
Artifactory-Tests:
17-
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push'
18-
name: ${{ matrix.suite }} ${{ matrix.os }}
19+
name: ${{ matrix.suite }} ${{ matrix.os.name }}
1920
strategy:
2021
fail-fast: false
2122
matrix:
22-
suite: [ artifactory, artifactoryProject ]
23-
os: [ ubuntu, windows, macos ]
24-
runs-on: ${{ matrix.os }}-latest
23+
suite: [artifactory, artifactoryProject]
24+
os:
25+
- name: ubuntu
26+
version: latest
27+
- name: windows
28+
version: latest
29+
- name: macos
30+
version: latest
31+
runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }}
2532
env:
2633
JFROG_CLI_LOG_LEVEL: DEBUG
2734
steps:
35+
- name: Skip macOS - JGC-413
36+
if: matrix.os.name == 'macos'
37+
run: |
38+
echo "::warning::JGC-413 - Skip until artifactory bootstrap in osx is fixed"
39+
exit 0
40+
2841
- name: Checkout code
42+
if: matrix.os.name != 'macos'
2943
uses: actions/checkout@v4
3044
with:
3145
ref: ${{ github.event.pull_request.head.sha }}
3246

3347
- name: Setup Go with cache
48+
if: matrix.os.name != 'macos'
3449
uses: jfrog/.github/actions/install-go-with-cache@main
3550

51+
- name: Debug macOS Environment and Set Timeout
52+
if: runner.os == 'macOS'
53+
run: |
54+
echo "=== macOS Debug Information ==="
55+
echo "Architecture: $(uname -m)"
56+
echo "macOS Version: $(sw_vers -productVersion)"
57+
echo "macOS Build: $(sw_vers -buildVersion)"
58+
echo "Available memory: $(system_profiler SPHardwareDataType | grep Memory || echo 'Memory info not available')"
59+
echo "Available disk space: $(df -h)"
60+
echo "Java version: $(java -version 2>&1 || echo 'Java not found')"
61+
echo "Go version: $(go version)"
62+
echo "Setting RT_CONNECTION_TIMEOUT_SECONDS to 2400 for macOS"
63+
echo "RT_CONNECTION_TIMEOUT_SECONDS=2400" >> $GITHUB_ENV
64+
3665
- name: Install local Artifactory
66+
if: matrix.os.name != 'macos'
3767
uses: jfrog/.github/actions/install-local-artifactory@main
3868
with:
3969
RTLIC: ${{ secrets.RTLIC }}
70+
RT_CONNECTION_TIMEOUT_SECONDS: ${{ env.RT_CONNECTION_TIMEOUT_SECONDS || '1200' }}
4071

4172
- name: Run Artifactory tests
73+
if: ${{ matrix.suite == 'artifactory' && matrix.os.name != 'macos' }}
4274
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.artifactory --jfrog.url=http://127.0.0.1:8082 --jfrog.adminToken=${{ env.JFROG_TESTS_LOCAL_ACCESS_TOKEN }}
43-
if: ${{ matrix.suite == 'artifactory' }}
4475

4576
- name: Run Artifactory projects tests
77+
if: ${{ matrix.suite == 'artifactoryProject' && matrix.os.name != 'macos' }}
4678
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.artifactoryProject --ci.runId=${{ runner.os }}-${{ matrix.suite }}
47-
if: ${{ matrix.suite == 'artifactoryProject' }}

.github/workflows/distributionTests.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
name: Distribution Tests
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
5-
- '**'
6-
tags-ignore:
7-
- '**'
8-
# Triggers the workflow on labeled PRs only.
6+
- "master"
7+
# Triggers the workflow on PRs to master branch only.
98
pull_request_target:
10-
types: [labeled]
9+
types: [opened, synchronize]
10+
branches:
11+
- "master"
12+
1113
# Ensures that only the latest commit is running for each PR at a time.
1214
concurrency:
1315
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
1416
cancel-in-progress: true
1517
jobs:
1618
Distribution-Tests:
17-
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push'
1819
name: Distribution tests (${{ matrix.os }})
1920
strategy:
2021
fail-fast: false
2122
matrix:
22-
os: [ ubuntu, windows, macos ]
23+
os: [ubuntu, windows, macos]
2324
runs-on: ${{ matrix.os }}-latest
2425
steps:
2526
- name: Setup Go with cache

.github/workflows/dockerTests.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
name: Docker Tests
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
5-
- '**'
6-
tags-ignore:
7-
- '**'
8-
# Triggers the workflow on labeled PRs only.
6+
- "master"
7+
# Triggers the workflow on PRs to master branch only.
98
pull_request_target:
10-
types: [labeled]
9+
types: [opened, synchronize]
10+
branches:
11+
- "master"
12+
1113
# Ensures that only the latest commit is running for each PR at a time.
1214
concurrency:
1315
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
1416
cancel-in-progress: true
1517
jobs:
1618
Docker-tests:
17-
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push'
1819
name: ubuntu-latest
1920
runs-on: ubuntu-latest
2021
steps:

.github/workflows/frogbot-scan-pull-request.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: "Frogbot Scan Pull Request"
22
on:
33
pull_request_target:
4-
types: [ opened, synchronize ]
4+
types: [opened, synchronize]
5+
branches:
6+
- "master"
57
permissions:
68
pull-requests: write
79
contents: read
@@ -121,4 +123,3 @@ jobs:
121123
# Set the minimum severity for vulnerabilities that should be fixed and commented on in pull requests
122124
# The following values are accepted: Low, Medium, High or Critical
123125
# JF_MIN_SEVERITY: ""
124-

.github/workflows/goTests.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
name: Go Tests
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
5-
- '**'
6-
tags-ignore:
7-
- '**'
8-
# Triggers the workflow on labeled PRs only.
6+
- "master"
7+
# Triggers the workflow on PRs to master branch only.
98
pull_request_target:
10-
types: [labeled]
9+
types: [opened, synchronize]
10+
branches:
11+
- "master"
12+
1113
# Ensures that only the latest commit is running for each PR at a time.
1214
concurrency:
1315
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
1416
cancel-in-progress: true
1517
jobs:
1618
GO-tests:
1719
# Go modules doesn't allow passing credentials to a private registry using an HTTP URL. Therefore, the Go tests run against a remote Artifactory server.
18-
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push'
1920
name: Go tests (${{ matrix.os }})
2021
strategy:
2122
fail-fast: false
2223
matrix:
23-
os: [ ubuntu, windows, macos ]
24+
os: [ubuntu, windows, macos]
2425
runs-on: ${{ matrix.os }}-latest
2526
steps:
2627
- name: Checkout code

0 commit comments

Comments
 (0)