mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-29 17:49:40 +00:00
Merge pull request #125 from up9inc/version_artifcat
Add version artifact
This commit is contained in:
commit
59ef3a4244
7
.github/workflows/publish.yml
vendored
7
.github/workflows/publish.yml
vendored
@ -75,3 +75,10 @@ jobs:
|
|||||||
tag: ${{ steps.versioning.outputs.version }}
|
tag: ${{ steps.versioning.outputs.version }}
|
||||||
prerelease: ${{ github.ref != 'refs/heads/main' }}
|
prerelease: ${{ github.ref != 'refs/heads/main' }}
|
||||||
bodyFile: 'cli/bin/README.md'
|
bodyFile: 'cli/bin/README.md'
|
||||||
|
- shell: bash
|
||||||
|
run: echo '${{ steps.versioning.outputs.version }}' >> version.txt
|
||||||
|
- name: Upload version artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: version
|
||||||
|
path: version.txt
|
||||||
|
@ -15,15 +15,21 @@ func ReportRun(cmd string, args interface{}) {
|
|||||||
rlog.Debugf("reporting only on main branch")
|
rlog.Debugf("reporting only on main branch")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
argsBytes, _ := json.Marshal(args)
|
argsBytes, _ := json.Marshal(args)
|
||||||
argsMap := map[string]string{"telemetry_type": "mizu_execution", "cmd": cmd, "args": string(argsBytes), "component": "mizu_cli"}
|
argsMap := map[string]string{
|
||||||
|
"telemetry_type": "execution",
|
||||||
|
"cmd": cmd,
|
||||||
|
"args": string(argsBytes),
|
||||||
|
"component": "mizu_cli",
|
||||||
|
"BuildTimestamp": BuildTimestamp,
|
||||||
|
"version": SemVer}
|
||||||
argsMap["message"] = fmt.Sprintf("mizu %v - %v", argsMap["cmd"], string(argsBytes))
|
argsMap["message"] = fmt.Sprintf("mizu %v - %v", argsMap["cmd"], string(argsBytes))
|
||||||
|
|
||||||
jsonValue, _ := json.Marshal(argsMap)
|
jsonValue, _ := json.Marshal(argsMap)
|
||||||
|
|
||||||
if resp, err := http.Post(telemetryUrl, "application/json", bytes.NewBuffer(jsonValue)); err != nil {
|
if resp, err := http.Post(telemetryUrl,
|
||||||
rlog.Debugf("error sending telemtry err: %v, response %v", err, resp)
|
"application/json", bytes.NewBuffer(jsonValue)); err != nil {
|
||||||
|
rlog.Debugf("error sending telemetry err: %v, response %v", err, resp)
|
||||||
} else {
|
} else {
|
||||||
rlog.Debugf("Successfully reported telemetry")
|
rlog.Debugf("Successfully reported telemetry")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user