Skip to content

Commit 13f6d31

Browse files
Merge branch 'master' into feature/64960-service-csv-export-without-internal-comments
2 parents 494907f + 53e5024 commit 13f6d31

File tree

97 files changed

+2061
-626
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+2061
-626
lines changed

.bundler-audit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
# ignore specific CVEs from bundler-audit checks
3+
ignore:
4+
- CVE-2024-6484 # non use bootstrap carousel feature

.github/workflows/build-manual.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ jobs:
3535
environment: ${{ inputs.environment }}
3636
project_name: ${{ inputs.project_name }}
3737
push: ${{ inputs.push }}
38-
registry: harbor.puzzle.ch
39-
registry_url: harbor.puzzle.ch/pitc-ruby-public/ptime/int/rails
4038
secrets:
4139
PUZZLE_REGISTRY_USERNAME: ${{ secrets.PUZZLE_REGISTRY_USERNAME }}
4240
PUZZLE_REGISTRY_TOKEN: ${{ secrets.PUZZLE_REGISTRY_TOKEN }}

.github/workflows/reusable-build.yaml

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: 'Reusable: Build and push image'
2+
name: "Reusable: Build and push image"
33

44
"on":
55
workflow_call:
@@ -17,32 +17,56 @@ name: 'Reusable: Build and push image'
1717
type: boolean
1818
default: false
1919
registry:
20-
description: 'FQDN of the registry'
20+
description: "FQDN of the registry"
2121
type: string
22-
required: true
22+
required: false
23+
default: ""
2324
registry_url:
24-
description: 'URL to push image to'
25+
description: "URL to push image to"
2526
type: string
2627
required: false
27-
default: 'harbor.puzzle.ch/pitc-ruby-public/ptime/int/rails'
28+
default: ""
2829

2930
secrets:
3031
PUZZLE_REGISTRY_USERNAME:
31-
description: 'Needed for the registry login'
32+
description: "Needed for the registry login"
3233
required: true
3334
PUZZLE_REGISTRY_TOKEN:
34-
description: 'Needed for the registry login'
35+
description: "Needed for the registry login"
3536
required: true
3637

3738
jobs:
3839
build:
3940
environment: ${{ inputs.environment }}
40-
runs-on: 'ubuntu-latest'
41+
runs-on: "ubuntu-latest"
42+
43+
env:
44+
BUILD_REGISTRY: ${{ inputs.registry || vars.REGISTRY }}
45+
BUILD_REGISTRY_URL: ${{ inputs.registry_url || vars.REGISTRY_URL }}
46+
4147
steps:
48+
- name: Input Validation
49+
run: |
50+
exit_code=0
51+
52+
if [ -z "${BUILD_REGISTRY}" ]; then
53+
echo "::error title=Configuration Error::BUILD_REGISTRY is empty."
54+
echo "Please ensure 'registry' input is set or 'REGISTRY' variable is configured in the ${{ inputs.environment }} environment."
55+
exit_code=1
56+
fi
57+
58+
if [ -z "${BUILD_REGISTRY_URL}" ]; then
59+
echo "::error title=Configuration Error::BUILD_REGISTRY_URL is empty."
60+
echo "Please ensure 'registry_url' input is set or 'REGISTRY_URL' variable is configured in the ${{ inputs.environment }} environment."
61+
exit_code=1
62+
fi
63+
64+
exit "${exit_code}"
65+
4266
- uses: docker/setup-buildx-action@v3
4367
- uses: docker/login-action@v3
4468
with:
45-
registry: ${{ inputs.registry }}
69+
registry: ${{ env.BUILD_REGISTRY }}
4670
username: ${{ secrets.PUZZLE_REGISTRY_USERNAME }}
4771
password: ${{ secrets.PUZZLE_REGISTRY_TOKEN }}
4872
- uses: docker/build-push-action@v4
@@ -55,9 +79,8 @@ jobs:
5579
GITHUB_SHA=${{ github.sha }}
5680
target: app
5781
tags: |
58-
${{ inputs.registry_url }}:latest
59-
${{ inputs.registry_url }}:${{ github.sha }}
82+
${{ env.BUILD_REGISTRY_URL }}:latest
83+
${{ env.BUILD_REGISTRY_URL }}:git-${{ github.sha }}
6084
push: ${{ inputs.push }}
6185
cache-from: type=gha
6286
cache-to: type=gha,mode=max
63-
...

.rubocop.yml

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
---
2+
inherit_mode:
3+
merge:
4+
- Exclude
5+
26
inherit_from: .rubocop_todo.yml
37

48
plugins:
@@ -11,11 +15,21 @@ AllCops:
1115

1216
Metrics:
1317
Exclude:
14-
- 'test/**/*'
18+
- "test/**/*"
19+
20+
Metrics/BlockLength:
21+
Exclude:
22+
- "test/**/*" # Please do not ignore this exclude
23+
- config/routes.rb
24+
25+
Metrics/ModuleLength:
26+
Exclude:
27+
- "test/**/*" # Please do not ignore this exclude
28+
- "app/helpers/evaluator_helper.rb"
1529

1630
Naming/InclusiveLanguage:
1731
Exclude:
18-
- config/environments/development.rb # Bullet uses whitelist :(
32+
- config/environments/development.rb # Bullet uses whitelist :(
1933

2034
# Not gonna rewrite all our tests...
2135
Minitest/MultipleAssertions:
@@ -27,33 +41,28 @@ Rails/ActionControllerTestCase:
2741
# Ignore for existing migrations
2842
Rails/CreateTableWithTimestamps:
2943
Exclude:
30-
- 'db/migrate/20150930143851_create_tables.rb'
31-
- 'db/migrate/20151105101420_create_sectors_and_services.rb'
32-
- 'db/migrate/20160919101807_add_daily_plannings.rb'
33-
- 'db/migrate/20160929150008_create_custom_lists.rb'
34-
- 'db/migrate/20170321095600_employee_master_data.rb'
35-
- 'db/migrate/20170724095653_create_additional_crm_orders.rb'
36-
- 'db/migrate/20190204150125_add_expenses.rb'
37-
- 'db/migrate/20220322152042_create_workplaces.rb'
38-
- 'db/migrate/20230207231358_create_active_storage_variant_records.active_storage.rb'
44+
- "db/migrate/20150930143851_create_tables.rb"
45+
- "db/migrate/20151105101420_create_sectors_and_services.rb"
46+
- "db/migrate/20160919101807_add_daily_plannings.rb"
47+
- "db/migrate/20160929150008_create_custom_lists.rb"
48+
- "db/migrate/20170321095600_employee_master_data.rb"
49+
- "db/migrate/20170724095653_create_additional_crm_orders.rb"
50+
- "db/migrate/20190204150125_add_expenses.rb"
51+
- "db/migrate/20220322152042_create_workplaces.rb"
52+
- "db/migrate/20230207231358_create_active_storage_variant_records.active_storage.rb"
3953

4054
Rails/DangerousColumnNames:
4155
Exclude:
42-
- 'db/migrate/20240311175613_add_id_to_order_team_members.rb' # Added id to many_to_many join table
56+
- "db/migrate/20240311175613_add_id_to_order_team_members.rb" # Added id to many_to_many join table
4357

4458
Style/SafeNavigationChainLength:
4559
Exclude:
46-
- 'app/views/work_items/search.json.jbuilder' # Okish for jbuilder
60+
- "app/views/work_items/search.json.jbuilder" # Okish for jbuilder
4761

4862
Naming/AccessorMethodName:
4963
Exclude:
50-
- 'app/domain/invoicing/small_invoice/client_sync.rb'
64+
- "app/domain/invoicing/small_invoice/client_sync.rb"
5165

5266
Style/SymbolProc:
5367
Exclude:
54-
- 'app/serializers/api/v1/employee_serializer.rb'
55-
56-
Metrics/BlockLength:
57-
Exclude:
58-
- config/routes.rb
59-
...
68+
- "app/serializers/api/v1/employee_serializer.rb"

0 commit comments

Comments
 (0)