Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Add additional build info properties and parameterize VcsType #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
9 changes: 8 additions & 1 deletion src/commands/build-information.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ parameters:
[Optional] The log level. Valid options are verbose, debug, information, warning, error and fatal. Defaults to 'debug'.
type: string
default: ""
vcs_type:
description: |
[Optional] The type of VCS used. Defaults to 'GitHub'.
type: string
default: "GitHub"
steps:
- run:
name: "Push build information for << parameters.package_id >>"
Expand Down Expand Up @@ -107,7 +112,9 @@ steps:
BuildNumber: "$CIRCLE_BUILD_NUM",
BuildUrl: "$CIRCLE_BUILD_URL",
Branch: "$CIRCLE_BRANCH",
VcsType: "GitHub"
VcsType: "<< parameters.vcs_type >>",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably make this dynamic, too, by using << pipeline.project.type >>. See https://circleci.com/docs/2.0/variables#pipeline-values.

VcsRoot: "$CIRCLE_REPOSITORY_URL",
VcsCommitNumber: "$CIRCLE_SHA1"
}
EOL

Expand Down