mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-31 08:20:25 +00:00
Add version artifact
This commit is contained in:
parent
5c86e20c92
commit
7fb85df3ac
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
@ -66,6 +66,14 @@ jobs:
|
||||
COMMIT_HASH=${{ github.sha }}
|
||||
- name: Build and Push CLI
|
||||
run: make push-cli SEM_VER='${{ steps.versioning.outputs.version }}' BUILD_TIMESTAMP='${{ steps.version_parameters.outputs.build_timestamp }}'
|
||||
- shell: bash
|
||||
run: |
|
||||
expr '${{ steps.versioning.outputs.version }}' > version.txt
|
||||
- name: Upload version artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: version
|
||||
path: version.txt
|
||||
- name: publish
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
|
@ -8,22 +8,26 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
const telemetryUrl = "https://us-east4-up9-prod.cloudfunctions.net/mizu-telemetry"
|
||||
|
||||
func ReportRun(cmd string, args interface{}) {
|
||||
if Branch != "main" {
|
||||
rlog.Debugf("reporting only on main branch")
|
||||
return
|
||||
}
|
||||
|
||||
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))
|
||||
|
||||
jsonValue, _ := json.Marshal(argsMap)
|
||||
|
||||
if resp, err := http.Post(telemetryUrl, "application/json", bytes.NewBuffer(jsonValue)); err != nil {
|
||||
rlog.Debugf("error sending telemtry err: %v, response %v", err, resp)
|
||||
if resp, err := http.Post("https://us-east4-up9-prod.cloudfunctions.net/mizu-telemetry",
|
||||
"application/json", bytes.NewBuffer(jsonValue)); err != nil {
|
||||
rlog.Debugf("error sending telemetry err: %v, response %v", err, resp)
|
||||
} else {
|
||||
rlog.Debugf("Successfully reported telemetry")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user