Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions _api/v1/build_distributions/schema/subset/post.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"fixed_test_suite_split": true,
"cache_read_attempt": true,
"commit_hash": "6e3396177d9f8ca87e2b93b4b0a25babd09d574d",
"branch": "master",
"branch": "main",
"node_total": "4",
"node_index": "0",
"ci_build_id": 1234,
Expand All @@ -25,7 +25,7 @@
"fixed_test_suite_split": true,
"cache_read_attempt": false,
"commit_hash": "6e3396177d9f8ca87e2b93b4b0a25babd09d574d",
"branch": "master",
"branch": "main",
"node_total": "4",
"node_index": "0",
"ci_build_id": 1234,
Expand Down
2 changes: 1 addition & 1 deletion _api/v1/build_subsets/schema/post.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commit_hash": "6e3396177d9f8ca87e2b93b4b0a25babd09d574d",
"branch": "master",
"branch": "main",
"node_total": "4",
"node_index": "0",
"test_files": [
Expand Down
2 changes: 1 addition & 1 deletion _api/v1/build_subsets/schema/post_response_201.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Response does not contain any data.
// when successfully created BuildSubset record on API side
// and Knapsack Pro client is outdated
{
"message": "Please update client knapsack_pro-ruby/rspec 2.3.0 version to 2.4.0. See CHANGELOG: https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md#change-log"
"message": "Please update client knapsack_pro-ruby/rspec 2.3.0 version to 2.4.0. See CHANGELOG: https://github.com/KnapsackPro/knapsack_pro-ruby/blob/main/CHANGELOG.md#change-log"
}
2 changes: 1 addition & 1 deletion _api/v1/builds/main.raml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ get:

You can provide optional query params to filter list of CI builds by **commit_hash**, **branch**, **node_total**.

Example 1: /v1/builds?page=1&branch=master&node_total=2
Example 1: /v1/builds?page=1&branch=main&node_total=2

Example 2: /v1/builds?page=1&commit_hash=d1acb81ac1bead703eb6de64d1af24104d5d4b2c

Expand Down
8 changes: 4 additions & 4 deletions _api/v1/builds/schema/index/response_200.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
"is_page_out_of_range": false
},
"links": {
"first": "https://api.knapsackpro.com/v1/builds?branch=master&commit_hash=d1acb81ac1bead703eb6de64d1af24104d5d4b2c&node_total=2&page=1",
"first": "https://api.knapsackpro.com/v1/builds?branch=main&commit_hash=d1acb81ac1bead703eb6de64d1af24104d5d4b2c&node_total=2&page=1",
"prev": null,
"self": "https://api.knapsackpro.com/v1/builds?branch=master&commit_hash=d1acb81ac1bead703eb6de64d1af24104d5d4b2c&node_total=2&page=1",
"self": "https://api.knapsackpro.com/v1/builds?branch=main&commit_hash=d1acb81ac1bead703eb6de64d1af24104d5d4b2c&node_total=2&page=1",
"next": null,
"last": "https://api.knapsackpro.com/v1/builds?branch=master&commit_hash=d1acb81ac1bead703eb6de64d1af24104d5d4b2c&node_total=2&page=1"
"last": "https://api.knapsackpro.com/v1/builds?branch=main&commit_hash=d1acb81ac1bead703eb6de64d1af24104d5d4b2c&node_total=2&page=1"
},
"data": [
{
"id": "07c0fca5-9a6c-4313-b176-25dad6139057",
"commit_hash": "d1acb81ac1bead703eb6de64d1af24104d5d4b2c",
"branch": "master",
"branch": "main",
"node_total": 2,
"created_at": "2019-09-18T17:54:54.430Z",
"updated_at": "2019-09-18T18:02:16.149Z"
Expand Down
2 changes: 1 addition & 1 deletion _api/v1/builds/schema/show/response_200.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "ba2190af-1bb1-4e3a-8ce1-37303549a4c3",
"commit_hash": "347f33f598e5c66727e36b6f0c13b034f6a057f0",
"branch": "master",
"branch": "main",
"node_total": 2,
"created_at": "2018-04-02T10:00:44.741Z",
"updated_at": "2018-04-02T10:00:44.763Z",
Expand Down
2 changes: 1 addition & 1 deletion _api/v1/params/branch.raml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
type: string
required: true
example: master
example: main
description: |
You are running tests on this branch.
2 changes: 1 addition & 1 deletion _api/v1/params/filters/branch.raml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
type: string
required: false
example: master
example: main
description: |
You can filter by branch name.
6 changes: 3 additions & 3 deletions _api/v1/queues/schema/queue/post.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"attempt_connect_to_queue": true,
"fixed_queue_split": false,
"commit_hash": "6e3396177d9f8ca87e2b93b4b0a25babd09d574d",
"branch": "master",
"branch": "main",
"node_total": "4",
"node_index": "0",
"node_build_id": "1234",
Expand All @@ -27,7 +27,7 @@
"attempt_connect_to_queue": false,
"fixed_queue_split": false,
"commit_hash": "6e3396177d9f8ca87e2b93b4b0a25babd09d574d",
"branch": "master",
"branch": "main",
"node_total": "4",
"node_index": "0",
"node_build_id": "1234",
Expand Down Expand Up @@ -58,7 +58,7 @@
"attempt_connect_to_queue": false,
"fixed_queue_split": false,
"commit_hash": "6e3396177d9f8ca87e2b93b4b0a25babd09d574d",
"branch": "master",
"branch": "main",
"node_total": "4",
"node_index": "0",
"node_build_id": "1234",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ preload_app true

before_fork do |server, worker|
Signal.trap 'TERM' do
puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
puts 'Unicorn main worker intercepting TERM and sending myself QUIT instead'
Process.kill 'QUIT', Process.pid
end

Expand All @@ -59,7 +59,7 @@ end

after_fork do |server, worker|
Signal.trap 'TERM' do
puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT'
puts 'Unicorn worker intercepting TERM and doing nothing. Wait for main worker to send QUIT'
end

defined?(ActiveRecord::Base) and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ You will get a response from API with the list of CI builds.
{
"id": "651efcce-cc5f-4cfc-b8fa-f49b4e5fb4af",
"commit_hash": "347f33f598e5c66727e36b6f0c13b034f6a057f0",
"branch": "master",
"branch": "main",
"node_total": 3,
"created_at": "2018-04-21T10:57:42.439Z",
"updated_at": "2018-04-21T10:57:54.989Z"
},
{
"id": "ba2190af-1bb1-4e3a-8ce1-37303549a4c3",
"commit_hash": "347f33f598e5c66727e36b6f0c13b034f6a057f0",
"branch": "master",
"branch": "main",
"node_total": 2,
"created_at": "2018-04-02T10:00:44.741Z",
"updated_at": "2018-04-02T10:00:44.763Z"
Expand All @@ -75,7 +75,7 @@ You can use optional query params like `commit_hash`, `branch`, `node_total` to

{% highlight plain %}
curl -X GET \
https://api.knapsackpro.com/v1/builds?page=1&branch=master&node_total=2&commit_hash=d1acb81ac1bead703eb6de64d1af24104d5d4b2c \
https://api.knapsackpro.com/v1/builds?page=1&branch=main&node_total=2&commit_hash=d1acb81ac1bead703eb6de64d1af24104d5d4b2c \
-H 'cache-control: no-cache' \
-H 'KNAPSACK-PRO-TEST-SUITE-TOKEN: e5311882cbba506223ee8036fa68dc13'
{% endhighlight %}
Expand All @@ -100,7 +100,7 @@ For instance, you can get a response from Knapsack Pro API:
{
"id": "651efcce-cc5f-4cfc-b8fa-f49b4e5fb4af",
"commit_hash": "347f33f598e5c66727e36b6f0c13b034f6a057f0",
"branch": "master",
"branch": "main",
"node_total": 2,
"created_at": "2018-04-02T10:00:44.741Z",
"updated_at": "2018-04-02T10:00:44.763Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ blocks:
- checkout
# Restore dependencies from cache.
# Read about caching: https://docs.semaphoreci.com/article/54-toolbox-reference#cache
- cache restore gems-$SEMAPHORE_GIT_BRANCH-$(checksum Gemfile.lock),gems-$SEMAPHORE_GIT_BRANCH-,gems-master-
- cache restore gems-$SEMAPHORE_GIT_BRANCH-$(checksum Gemfile.lock),gems-$SEMAPHORE_GIT_BRANCH-,gems-main-
# Set Ruby version:
- sem-version ruby 2.6.1
- bundle install --jobs=4 --retry=3 --path vendor/bundle
Expand All @@ -102,7 +102,7 @@ blocks:
prologue:
commands:
- checkout
- cache restore gems-$SEMAPHORE_GIT_BRANCH-$(checksum Gemfile.lock),gems-$SEMAPHORE_GIT_BRANCH-,gems-master-
- cache restore gems-$SEMAPHORE_GIT_BRANCH-$(checksum Gemfile.lock),gems-$SEMAPHORE_GIT_BRANCH-,gems-main-
# Start Postgres database service.
# See https://docs.semaphoreci.com/article/54-toolbox-reference#sem-service
- sem-service start postgres
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ In our case Rails application has Postgres database so you need to set up servic
{% highlight yaml %}
# If you need DB like PostgreSQL then define service below.
# Example for Redis can be found here:
# https://github.com/actions/example-services/tree/master/.github/workflows
# https://github.com/actions/example-services/tree/main/.github/workflows
services:
postgres:
image: postgres:10.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Now we can run `knapsack-pro-cypress` as usual:
run: knapsack-pro-cypress
- name: Upload E2E test reports
if: always()
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v4
with:
name: test-reports-${{ env.KNAPSACK_PRO_CI_NODE_INDEX }}
path: mochawesome-report
Expand Down Expand Up @@ -105,22 +105,22 @@ Now we need to download all our test artifacts, which were uploaded as `test-rep
- name: Create reports directory
run: mkdir reports
- name: Download test-reports-0
uses: actions/download-artifact@master
uses: actions/download-artifact@v4
with:
name: test-reports-0
path: reports/0
- name: Download test-reports-1
uses: actions/download-artifact@master
uses: actions/download-artifact@v4
with:
name: test-reports-1
path: reports/1
- name: Download test-reports-2
uses: actions/download-artifact@master
uses: actions/download-artifact@v4
with:
name: test-reports-2
path: reports/2
- name: Download test-reports-3
uses: actions/download-artifact@master
uses: actions/download-artifact@v4
with:
name: test-reports-3
path: reports/3
Expand Down Expand Up @@ -221,7 +221,7 @@ Now we upload this report:

{% highlight yml %}
- name: Upload report
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v4
with:
name: E2E Test Reports
path: report/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
runs-on: ubuntu-latest

# If you need DB like PostgreSQL, Redis then define service below.
# https://github.com/actions/example-services/tree/master/.github/workflows
# https://github.com/actions/example-services/tree/main/.github/workflows
services:
postgres:
image: postgres:10.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ The first CI node sends the below request. Its purpose is to attempt to connect
"attempt_connect_to_queue": true,
"fixed_queue_split": false,
"commit_hash": "6e3396177d9f8ca87e2b93b4b0a25babd09d574d",
"branch": "master",
"branch": "main",
"node_total": "2",
"node_index": "0",
"node_build_id": "1234",
Expand Down Expand Up @@ -233,7 +233,7 @@ You need to make a second request. This time, it should contain a list of test f
"attempt_connect_to_queue": false,
"fixed_queue_split": false,
"commit_hash": "6e3396177d9f8ca87e2b93b4b0a25babd09d574d",
"branch": "master",
"branch": "main",
"node_total": "2",
"node_index": "0",
"node_build_id": "1234",
Expand Down Expand Up @@ -295,7 +295,7 @@ After you execute the test files, you should ask the API for another set of test
"attempt_connect_to_queue": false,
"fixed_queue_split": false,
"commit_hash": "6e3396177d9f8ca87e2b93b4b0a25babd09d574d",
"branch": "master",
"branch": "main",
"node_total": "2",
"node_index": "0",
"node_build_id": "1234",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-latest

# If you need DB like PostgreSQL, Redis then define service below.
# https://github.com/actions/example-services/tree/master/.github/workflows
# https://github.com/actions/example-services/tree/main/.github/workflows
services:
postgres:
image: postgres:10.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest

# If you need DB like PostgreSQL, Redis then define service below.
# https://github.com/actions/example-services/tree/master/.github/workflows
# https://github.com/actions/example-services/tree/main/.github/workflows
services:
postgres:
image: postgres:10.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ In the config below, we also pass the settings for doing a health check to ensur
{% highlight yml %}
# If you need DB like PostgreSQL, Redis then define service below.

# https://github.com/actions/example-services/tree/master/.github/workflows
# https://github.com/actions/example-services/tree/main/.github/workflows

services:
postgres:
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
runs-on: ubuntu-latest

# If you need DB like PostgreSQL, Redis then define service below.
# https://github.com/actions/example-services/tree/master/.github/workflows
# https://github.com/actions/example-services/tree/main/.github/workflows
services:
postgres:
image: postgres:10.8
Expand Down
6 changes: 3 additions & 3 deletions docusaurus/docs/knapsack_pro-ruby/guide/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ jobs:
runs-on: ubuntu-latest

# If you need a DB, then define it in the service below.
# https://github.com/actions/example-services/tree/master/.github/workflows
# https://github.com/actions/example-services/tree/main/.github/workflows
services:
postgres:
image: postgres:10.8
Expand Down Expand Up @@ -926,7 +926,7 @@ blocks:
- name: bundle
commands:
- checkout
- cache restore gems-$SEMAPHORE_GIT_BRANCH-$(checksum Gemfile.lock),gems-$SEMAPHORE_GIT_BRANCH-,gems-master-
- cache restore gems-$SEMAPHORE_GIT_BRANCH-$(checksum Gemfile.lock),gems-$SEMAPHORE_GIT_BRANCH-,gems-main-
- sem-version ruby 2.6.1
- bundle install --jobs=4 --retry=3 --path vendor/bundle
- cache store gems-$SEMAPHORE_GIT_BRANCH-$(checksum Gemfile.lock) vendor/bundle
Expand All @@ -950,7 +950,7 @@ blocks:
prologue:
commands:
- checkout
- cache restore gems-$SEMAPHORE_GIT_BRANCH-$(checksum Gemfile.lock),gems-$SEMAPHORE_GIT_BRANCH-,gems-master-
- cache restore gems-$SEMAPHORE_GIT_BRANCH-$(checksum Gemfile.lock),gems-$SEMAPHORE_GIT_BRANCH-,gems-main-
- sem-service start postgres
- sem-version ruby 2.6.1
- bundle install --jobs=4 --retry=3 --path vendor/bundle
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/ruby/cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ For example, you could decide to run Knapsack Pro on all the CI nodes but the la
KNAPSACK_PRO_CI_NODE_TOTAL=$((MY_CI_NODE_TOTAL-1)) bundle exec rake knapsack_pro:queue:rspec
```

To find out which environment variable to use in place of `MY_CI_NODE_TOTAL`, take a look at what Knapsack Pro uses as `node_total` for your [CI provider](https://github.com/KnapsackPro/knapsack_pro-ruby/tree/master/lib/knapsack_pro/config/ci) (e.g., for CircleCI it would be [`CIRCLE_NODE_TOTAL`](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/lib/knapsack_pro/config/ci/circle.rb#L6))
To find out which environment variable to use in place of `MY_CI_NODE_TOTAL`, take a look at what Knapsack Pro uses as `node_total` for your [CI provider](https://github.com/KnapsackPro/knapsack_pro-ruby/tree/main/lib/knapsack_pro/config/ci) (e.g., for CircleCI it would be [`CIRCLE_NODE_TOTAL`](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/main/lib/knapsack_pro/config/ci/circle.rb#L6))

## Fail the CI build if one of the test files exceeds a certain time limit

Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/ruby/encryption.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Also, note that the following branch names won't be encrypted to allow the Knaps
- `dev`
- `staging`
- `production`
- [full list](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/lib/knapsack_pro/crypto/branch_encryptor.rb) of non-encryptable branches
- [full list](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/main/lib/knapsack_pro/crypto/branch_encryptor.rb) of non-encryptable branches

## Debug test file names

Expand Down
Loading
Loading