Skip to content

Commit 8101c4e

Browse files
committed
add timestamp as props for python
1 parent 4fce9d6 commit 8101c4e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

artifactory/commands/python/twine.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import (
55
"fmt"
66
"os"
77
"os/exec"
8+
"strconv"
89
"strings"
10+
"time"
911

1012
"github.com/jfrog/build-info-go/build"
1113
"github.com/jfrog/build-info-go/utils/pythonutils"
@@ -215,9 +217,10 @@ func (tc *TwineCommand) uploadAndCollectBuildInfo() error {
215217
return err
216218
}
217219

220+
timestamp := strconv.FormatInt(buildInfo.GetBuildTimestamp().UnixNano()/int64(time.Millisecond), 10)
218221
propsParams := services.PropsParams{
219222
Reader: searchReader,
220-
Props: fmt.Sprintf("build.name=%s;build.number=%s", buildName, buildNumber),
223+
Props: fmt.Sprintf("build.name=%s;build.number=%s;build.timestamp=%s", buildName, buildNumber, timestamp),
221224
}
222225

223226
_, err = servicesManager.SetProps(propsParams)

0 commit comments

Comments
 (0)