Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
50ea2d81
Commit
50ea2d81
authored
Nov 03, 2020
by
Brad Davidson
Committed by
Brad Davidson
Nov 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix size check and make script shell consistent
Related to #2205 Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
3e4fd7b4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
9 deletions
+20
-9
binary_size_check.sh
scripts/binary_size_check.sh
+11
-3
ci
scripts/ci
+6
-2
dispatch
scripts/dispatch
+2
-3
manifest
scripts/manifest
+1
-1
No files found.
scripts/binary_size_check.sh
View file @
50ea2d81
#!/bin/sh
#!/bin/
ba
sh
set
-e
...
...
@@ -7,10 +7,18 @@ if [ "${DEBUG}" = 1 ]; then
fi
MAX_BINARY_SIZE
=
61000000
SIZE
=
$(
ls
-l
dist/artifacts/k3s |
awk
-F
' '
'{print $5}'
)
BIN_SUFFIX
=
"-
${
ARCH
}
"
if
[
${
ARCH
}
=
amd64
]
;
then
BIN_SUFFIX
=
""
elif
[
${
ARCH
}
=
arm
]
;
then
BIN_SUFFIX
=
"-armhf"
fi
CMD_NAME
=
"dist/artifacts/k3s
${
BIN_SUFFIX
}
"
SIZE
=
$(
stat
-c
'%s'
${
CMD_NAME
})
if
[
${
SIZE
}
-gt
${
MAX_BINARY_SIZE
}
]
;
then
echo
"k3s binary
exceeds acceptable size of "
${
MAX_BINARY_SIZE
}
echo
"k3s binary
${
CMD_NAME
}
size
${
SIZE
}
exceeds acceptable size of
${
MAX_BINARY_SIZE
}
"
exit
1
fi
...
...
scripts/ci
View file @
50ea2d81
#!/bin/bash
set
-e
cd
$(
dirname
$0
)
SCRIPT_DIR
=
$(
dirname
$0
)
pushd
$SCRIPT_DIR
./download
if
[
-z
"
$SKIP_VALIDATE
"
]
;
then
...
...
@@ -10,4 +11,7 @@ fi
./build
./package
./binary_size_check.sh
popd
$SCRIPT_DIR
/binary_size_check.sh
scripts/dispatch
View file @
50ea2d81
#!/bin/sh
#!/bin/
ba
sh
set
-e
set
-x
...
...
@@ -8,4 +8,4 @@ REPO="https://api.github.com/repos/rancher/k3s-upgrade/dispatches"
curl
-XPOST
-u
"
${
PAT_USERNAME
}
:
${
PAT_TOKEN
}
"
\
-H
"Accept: application/vnd.github.everest-preview+json"
\
-H
"Content-Type: application/json"
$REPO
\
--data
'{"event_type": "create_tag", "client_payload": {"tag":"'
"
$DRONE_TAG
"
'"}}'
\ No newline at end of file
--data
'{"event_type": "create_tag", "client_payload": {"tag":"'
"
$DRONE_TAG
"
'"}}'
scripts/manifest
View file @
50ea2d81
#!/bin/sh
#!/bin/
ba
sh
if
[
-z
"
${
DRONE_TAG
}
"
]
;
then
echo
"DRONE_TAG not defined"
>
&2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment