Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Errors thrown when run "npm run build" on linux. #103

@kuanfandevops

Description

@kuanfandevops
  1. When run "npm run build -- --pr=80", it has no issues if run on local mac os, but it throws the following error when run on Linux.

Error: command: oc --namespace=30b186-tools apply -f - --output=name
stderr:The BuildConfig "cthub-frontend-build-80" is invalid: metadata.labels: Invalid value: "https://github.com/bcgov/cthub": a valid label must be an empty string or consist of alphanumeric characters, '-', '' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9])?')

  1. The following code causes the above issue. The value of github-repo can not be a git repo url.
    const envLabels = {
    'env-name': envName,
    'env-id': envId,
    'github-repo': this.git.repository,
    'github-owner': this.git.owner,
    };
    Recommend to use the below code. The lib/clean.js needs to be updated as well.
    'github-repo': this.git.repository.substr(this.git.repository.lastIndexOf("/")+1),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions