Skip to content

Commit

Permalink
feat(integration/artifactory): add properties on release bundle (#6559)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsamin authored May 30, 2023
1 parent ca43679 commit ab9f015
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"regexp"
"strconv"
"strings"
"time"

Expand Down Expand Up @@ -231,12 +232,18 @@ func (e *artifactoryReleasePlugin) createReleaseBundle(distriClient art.DistribC

paramsBuild := fmt.Sprintf("%s/%s", strings.Replace(buildInfoName, "/", "\\/", -1), version)

newReleaseProperties := new(utils.Properties)
newReleaseProperties.AddProperty("release.name", params.Name)
newReleaseProperties.AddProperty("release.version", params.Version)
newReleaseProperties.AddProperty("release.timestamp", strconv.FormatInt(time.Now().Unix(), 10))

params.SpecFiles = make([]*utils.CommonParams, 0, len(artifactPromoted))
for _, arti := range artifactPromoted {
query := &utils.CommonParams{
Recursive: true,
Build: paramsBuild,
Pattern: arti,
Recursive: true,
Build: paramsBuild,
Pattern: arti,
TargetProps: newReleaseProperties,
}
params.SpecFiles = append(params.SpecFiles, query)
}
Expand Down

0 comments on commit ab9f015

Please sign in to comment.