Skip to content

Commit

Permalink
Merge pull request #1 from pagopa/VAS-760-setup-nuovo-repository-github
Browse files Browse the repository at this point in the history
[VAS-760] todo resolved
  • Loading branch information
jacopocarlini authored Feb 23, 2024
2 parents d4a70e6 + c3ac3aa commit b431d0f
Show file tree
Hide file tree
Showing 28 changed files with 56 additions and 144 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/check_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ jobs:
- name: Check Size
uses: actions/[email protected]
env:
IGNORED_FILES: openapi.json, openapi-node.json
IGNORED_FILES: openapi.json
BRANCH_NAME: ${{ github.head_ref}}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand All @@ -100,8 +101,8 @@ jobs:
const execSync = require('child_process').execSync;
for (const file of IGNORED_FILES.trim().split(',')) {
const ignored_additions_str = execSync('git --no-pager diff --numstat origin/main..origin/${{ github.head_ref}} | grep ' + file + ' | cut -f 1', { encoding: 'utf-8' })
const ignored_deletions_str = execSync('git --no-pager diff --numstat origin/main..origin/${{ github.head_ref}} | grep ' + file + ' | cut -f 2', { encoding: 'utf-8' })
const ignored_additions_str = execSync('git --no-pager diff --numstat origin/main..origin/'+BRANCH_NAME+' | grep ' + file + ' | cut -f 1', { encoding: 'utf-8' })
const ignored_deletions_str = execSync('git --no-pager diff --numstat origin/main..origin/'+BRANCH_NAME+' | grep ' + file + ' | cut -f 2', { encoding: 'utf-8' })
const ignored_additions = ignored_additions_str.split('\n').map(elem=> parseInt(elem || 0)).reduce(
(accumulator, currentValue) => accumulator + currentValue,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
workflow_dispatch:

env:
PROJECT_KEY: # TODO
PROJECT_KEY: pagopa_pagopa-backoffice-external

permissions:
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_with_github_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
type: string

env:
APP_NAME: # TODO
APP_NAME: backoffice-external


permissions:
Expand Down
86 changes: 0 additions & 86 deletions .github/workflows/update_code.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .identity/99_variables.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
locals {
github = {
org = "pagopa"
repository = "TODO" #TODO
repository = "pagopa-backoffice-external"
}

prefix = "pagopa"
domain = "TODO" #TODO
domain = "selfcare"
location_short = "weu"
product = "${var.prefix}-${var.env_short}"

Expand Down
2 changes: 1 addition & 1 deletion .identity/env/dev/backend.tfvars
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource_group_name = "io-infra-rg"
storage_account_name = "pagopainfraterraformdev"
container_name = "azurermstate"
key = "<your-repo-name>.tfstate" # TODO
key = "pagopa-backoffice-external.tfstate"
2 changes: 1 addition & 1 deletion .identity/env/dev/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ tags = {
CreatedBy = "Terraform"
Environment = "Dev"
Owner = "pagoPA"
Source = "https://github.com/pagopa/your-repository" # TODO
Source = "https://github.com/pagopa/pagopa-backoffice-external"
CostCenter = "TS310 - PAGAMENTI & SERVIZI"
}
2 changes: 1 addition & 1 deletion .identity/env/prod/backend.tfvars
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource_group_name = "io-infra-rg"
storage_account_name = "pagopainfraterraformprod"
container_name = "azurermstate"
key = "<your-repo-name>.tfstate" # TODO
key = "pagopa-backoffice-external.tfstate"
2 changes: 1 addition & 1 deletion .identity/env/prod/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ tags = {
CreatedBy = "Terraform"
Environment = "Prod"
Owner = "pagoPA"
Source = "https://github.com/pagopa/your-repository" # TODO
Source = "https://github.com/pagopa/pagopa-backoffice-external"
CostCenter = "TS310 - PAGAMENTI & SERVIZI"
}
2 changes: 1 addition & 1 deletion .identity/env/uat/backend.tfvars
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource_group_name = "io-infra-rg"
storage_account_name = "pagopainfraterraformuat"
container_name = "azurermstate"
key = "<your-repo-name>.tfstate" # TODO
key = "pagopa-backoffice-external.tfstate"
2 changes: 1 addition & 1 deletion .identity/env/uat/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ tags = {
CreatedBy = "Terraform"
Environment = "Uat"
Owner = "pagoPA"
Source = "https://github.com/pagopa/your-repository" # TODO
Source = "https://github.com/pagopa/pagopa-backoffice-external"
CostCenter = "TS310 - PAGAMENTI & SERVIZI"
}
2 changes: 1 addition & 1 deletion .opex/env/prod/backend.tfvars
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource_group_name = "io-infra-rg"
storage_account_name = "pagopainfraterraformprod"
container_name = "azurermstate"
key = "opex.<your-repo-name>.terraform.tfstate" #TODO
key = "opex.pagopa-backoffice-external.terraform.tfstate"
2 changes: 1 addition & 1 deletion .opex/env/prod/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
oa3_spec: ./openapi/openapi.json # If start with http the file would be downloaded from the internet
name: opex_<your-repo-name> # TODO
name: opex_pagopa-backoffice-external
location: West Europe
timespan: 5m # Default, a number or a timespan https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/timespan
data_source: /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-vnet-rg/providers/Microsoft.Network/applicationGateways/pagopa-p-app-gw
Expand Down
2 changes: 1 addition & 1 deletion .opex/env/prod/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ tags = {
CreatedBy = "Terraform"
Environment = "Prod"
Owner = "pagoPA"
Source = "https://github.com/pagopa/your-repository" # TODO
Source = "https://github.com/pagopa/pagopa-backoffice-external"
CostCenter = "TS310 - PAGAMENTI & SERVIZI"
}
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# see https://help.github.com/en/articles/about-code-owners#example-of-a-codeowners-file

* @pagopa/pagopa-team-backoffice
* @pagopa/pagopa-team-backoffice @alessio-cialini @svariant @gioelemella
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.8'

services:
app:
container_name: 'service' # TODO
container_name: 'backoffice-external'
image: ${image}
platform: linux/amd64
build:
Expand Down
17 changes: 8 additions & 9 deletions helm/values-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
microservice-chart:
namespace: "your-namespace" # TODO: set your AKS namespace
namespace: "selfcare"
nameOverride: ""
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/yourname # TODO
repository: ghcr.io/pagopa/pagopa-backoffice-external
tag: "0.0.0"
pullPolicy: Always
livenessProbe:
Expand All @@ -29,8 +29,8 @@ microservice-chart:
- 8080
ingress:
create: true
host: "your.host" # TODO: set the host
path: /your-path-here/(.*) # TODO: set your path
host: "weudev.selfcare.internal.dev.platform.pagopa.it"
path: "/selfcare/pagopa/v1/(.*)"
servicePort: 8080
serviceAccount:
create: false
Expand Down Expand Up @@ -62,14 +62,13 @@ microservice-chart:
type: Utilization # Allowed types are 'Utilization' or 'AverageValue'
value: "75"
envConfig:
# TODO: set your name
WEBSITE_SITE_NAME: 'yourProjectName' # required to show cloud role name in application insights
WEBSITE_SITE_NAME: 'pagopa-backoffice-external' # required to show cloud role name in application insights
ENV: 'azure-dev'
APP_LOGGING_LEVEL: 'DEBUG'
DEFAULT_LOGGING_LEVEL: 'INFO'
CORS_CONFIGURATION: '{"origins": ["*"], "methods": ["*"]}'

OTEL_SERVICE_NAME: # TODO
OTEL_SERVICE_NAME: "pagopa-backoffice-external"
OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=dev"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
OTEL_TRACES_EXPORTER: otlp
Expand All @@ -81,7 +80,7 @@ microservice-chart:
APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-d-connection-string'
OTEL_EXPORTER_OTLP_HEADERS: elastic-apm-secret-token
keyvault:
name: "pagopa-d-name-kv" #TODO
name: "pagopa-d-selfcare-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
nodeSelector: { }
tolerations: [ ]
Expand All @@ -108,7 +107,7 @@ microservice-chart:
deployment:
create: true
image:
repository: ghcr.io/pagopa/yourname # TODO
repository: ghcr.io/pagopa/pagopa-backoffice-external
tag: "0.0.0"
pullPolicy: Always
envConfig: { }
Expand Down
17 changes: 8 additions & 9 deletions helm/values-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
microservice-chart:
namespace: "your-namespace" # TODO: set your AKS namespace
namespace: "selfcare"
nameOverride: ""
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/yourname # TODO
repository: ghcr.io/pagopa/pagopa-backoffice-external
tag: "0.0.0"
pullPolicy: Always
livenessProbe:
Expand All @@ -29,8 +29,8 @@ microservice-chart:
- 8080
ingress:
create: true
host: "your.host" # TODO: set the host
path: /your-path-here/(.*) # TODO: set your path
host: "weuprod.selfcare.internal.platform.pagopa.it"
path: "/selfcare/pagopa/v1/(.*)"
servicePort: 8080
serviceAccount:
create: false
Expand Down Expand Up @@ -62,14 +62,13 @@ microservice-chart:
type: Utilization # Allowed types are 'Utilization' or 'AverageValue'
value: "75"
envConfig:
# TODO: set your name
WEBSITE_SITE_NAME: 'yourProjectName' # required to show cloud role name in application insights
WEBSITE_SITE_NAME: 'pagopa-backoffice-external' # required to show cloud role name in application insights
ENV: 'azure-prod'
APP_LOGGING_LEVEL: 'INFO'
DEFAULT_LOGGING_LEVEL: 'INFO'
CORS_CONFIGURATION: '{"origins": ["*"], "methods": ["*"]}'

OTEL_SERVICE_NAME: # TODO
OTEL_SERVICE_NAME: "pagopa-backoffice-external"
OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=prod"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
OTEL_TRACES_EXPORTER: otlp
Expand All @@ -81,7 +80,7 @@ microservice-chart:
APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-p-connection-string'
OTEL_EXPORTER_OTLP_HEADERS: elastic-apm-secret-token
keyvault:
name: "pagopa-p-name-kv" #TODO
name: "pagopa-p-selfcare-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
nodeSelector: { }
tolerations: [ ]
Expand All @@ -108,7 +107,7 @@ microservice-chart:
deployment:
create: true
image:
repository: ghcr.io/pagopa/yourname # TODO
repository: ghcr.io/pagopa/pagopa-backoffice-external
tag: "0.0.0"
pullPolicy: Always
envConfig: { }
Expand Down
19 changes: 9 additions & 10 deletions helm/values-uat.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
microservice-chart:
namespace: "your-namespace" # TODO: set your AKS namespace
namespace: "selfcare"
nameOverride: ""
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/yourname # TODO
repository: ghcr.io/pagopa/pagopa-backoffice-external
tag: "0.0.0"
pullPolicy: Always
livenessProbe:
Expand All @@ -29,8 +29,8 @@ microservice-chart:
- 8080
ingress:
create: true
host: "your.host" # TODO: set the host
path: /your-path-here/(.*) # TODO: set your path
host: "weuuat.selfcare.internal.uat.platform.pagopa.it"
path: "/selfcare/pagopa/v1/(.*)"
servicePort: 8080
serviceAccount:
create: false
Expand All @@ -51,7 +51,7 @@ microservice-chart:
cpu: "0.25"
autoscaling:
enable: true
minReplica: 3
minReplica: 1
maxReplica: 10
pollingInterval: 10 # seconds
cooldownPeriod: 50 # seconds
Expand All @@ -62,13 +62,12 @@ microservice-chart:
type: Utilization # Allowed types are 'Utilization' or 'AverageValue'
value: "75"
envConfig:
# TODO: set your name
WEBSITE_SITE_NAME: 'yourProjectName' # required to show cloud role name in application insights
WEBSITE_SITE_NAME: 'pagopa-backoffice-external' # required to show cloud role name in application insights
ENV: 'azure-uat'
APP_LOGGING_LEVEL: 'DEBUG'
DEFAULT_LOGGING_LEVEL: 'INFO'
CORS_CONFIGURATION: '{"origins": ["*"], "methods": ["*"]}'
OTEL_SERVICE_NAME: # TODO
OTEL_SERVICE_NAME: "pagopa-backoffice-external"
OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=uat"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
OTEL_TRACES_EXPORTER: otlp
Expand All @@ -80,7 +79,7 @@ microservice-chart:
APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-u-connection-string'
OTEL_EXPORTER_OTLP_HEADERS: elastic-apm-secret-token
keyvault:
name: "pagopa-u-name-kv" #TODO
name: "pagopa-u-selfcare-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
nodeSelector: { }
tolerations: [ ]
Expand All @@ -107,7 +106,7 @@ microservice-chart:
deployment:
create: true
image:
repository: ghcr.io/pagopa/yourname # TODO
repository: ghcr.io/pagopa/pagopa-backoffice-external
tag: "0.0.0"
pullPolicy: Always
envConfig: { }
Expand Down
Loading

0 comments on commit b431d0f

Please sign in to comment.