veecode-platform / platform-backstage-plugins

Apache License 2.0
10 stars 3 forks source link

Integrated gitlab pipeline plugin status code 500 #5

Closed songyanping closed 4 months ago

songyanping commented 6 months ago
  1. I am using a self hosted Gitlab
  2. Gitlab pipelines Plugin requires settings
  3. app-config.yaml info:
integrations:
  gitlab:
    - host: gitlab-sre.intranet.local
      token: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
      apiBaseUrl: https://gitlab-sre.intranet.local/api/v4
proxy:
  endpoints:
    '/gitlab/api':
      target: https://gitlab-sre.intranet.local/api/v4
      allowedHeaders: ['Authorization', 'Content-Type']
      headers:
        Accept: application/json 
        Content-Type: application/json 

auth:
  # see https://backstage.io/docs/auth/ to learn about auth providers
  environment: development
  providers:
    gitlab:
      development:
        clientId: 376c52fcabd082b6570ae7676512cd683e5530d51f6ceb9c151ffdf3a0b3787e
        clientSecret: xxxxxxxxxxxxxxxx
        audience: https://gitlab-sre.intranet.local
        # callbackUrl: http://localhost:7007/api/auth/gitlab/handler/frame
  1. logs info:
[1] 2024-02-22T06:16:48.214Z proxy error [HPM] Error occurred while proxying request localhost:7007/projects/sre%2Fsre-test%2Fswagger-example/pipelines?ref= to https://gitlab-sre.intranet.local/api/v4 [SELF_SIGNED_CERT_IN_CHAIN] (https://nodejs.org/api/errors.html#errors_common_system_errors) type=plugin
[1] 2024-02-22T06:16:48.214Z backstage info ::1 - - [22/Feb/2024:06:16:48 +0000] "GET /api/proxy/gitlab/api/projects/sre%2Fsre-test%2Fswagger-example/pipelines?ref= HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0" type=incomingRequest
[1] 2024-02-22T06:16:48.270Z proxy error [HPM] Error occurred while proxying request localhost:7007/projects/sre%2Fsre-test%2Fswagger-example/pipelines?ref= to https://gitlab-sre.intranet.local/api/v4 [SELF_SIGNED_CERT_IN_CHAIN] (https://nodejs.org/api/errors.html#errors_common_system_errors) type=plugin
[1] 2024-02-22T06:16:48.271Z backstage info ::1 - - [22/Feb/2024:06:16:48 +0000] "GET /api/proxy/gitlab/api/projects/sre%2Fsre-test%2Fswagger-example/pipelines?ref= HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0" type=incomingRequest
[1] 2024-02-22T06:26:03.007Z search info Collating documents for software-catalog via DefaultCatalogCollatorFactory type=plugin documentType=software-catalog
[1] 2024-02-22T06:26:03.008Z search info Collating documents for techdocs via DefaultTechDocsCollatorFactory type=plugin documentType=techdocs
songyanping commented 6 months ago
  1. I am using a self hosted Gitlab
  2. Gitlab pipelines Plugin requires settings
  3. app-config.yaml info:
integrations:
  gitlab:
    - host: gitlab-sre.intranet.local
      token: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
      apiBaseUrl: https://gitlab-sre.intranet.local/api/v4
proxy:
  endpoints:
    '/gitlab/api':
      target: https://gitlab-sre.intranet.local/api/v4
      allowedHeaders: ['Authorization', 'Content-Type']
      headers:
        Accept: application/json 
        Content-Type: application/json 

auth:
  # see https://backstage.io/docs/auth/ to learn about auth providers
  environment: development
  providers:
    gitlab:
      development:
        clientId: 376c52fcabd082b6570ae7676512cd683e5530d51f6ceb9c151ffdf3a0b3787e
        clientSecret: xxxxxxxxxxxxxxxx
        audience: https://gitlab-sre.intranet.local
        # callbackUrl: http://localhost:7007/api/auth/gitlab/handler/frame
  1. logs info:
[1] 2024-02-22T06:16:48.214Z proxy error [HPM] Error occurred while proxying request localhost:7007/projects/sre%2Fsre-test%2Fswagger-example/pipelines?ref= to https://gitlab-sre.intranet.local/api/v4 [SELF_SIGNED_CERT_IN_CHAIN] (https://nodejs.org/api/errors.html#errors_common_system_errors) type=plugin
[1] 2024-02-22T06:16:48.214Z backstage info ::1 - - [22/Feb/2024:06:16:48 +0000] "GET /api/proxy/gitlab/api/projects/sre%2Fsre-test%2Fswagger-example/pipelines?ref= HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0" type=incomingRequest
[1] 2024-02-22T06:16:48.270Z proxy error [HPM] Error occurred while proxying request localhost:7007/projects/sre%2Fsre-test%2Fswagger-example/pipelines?ref= to https://gitlab-sre.intranet.local/api/v4 [SELF_SIGNED_CERT_IN_CHAIN] (https://nodejs.org/api/errors.html#errors_common_system_errors) type=plugin
[1] 2024-02-22T06:16:48.271Z backstage info ::1 - - [22/Feb/2024:06:16:48 +0000] "GET /api/proxy/gitlab/api/projects/sre%2Fsre-test%2Fswagger-example/pipelines?ref= HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0" type=incomingRequest
[1] 2024-02-22T06:26:03.007Z search info Collating documents for software-catalog via DefaultCatalogCollatorFactory type=plugin documentType=software-catalog
[1] 2024-02-22T06:26:03.008Z search info Collating documents for techdocs via DefaultTechDocsCollatorFactory type=plugin documentType=techdocs
andrevtg commented 6 months ago

You are supposed to use valid certificates for HTTPS in your gitlab service, not self-signed ones.