mirror of
https://github.com/k3s-io/k3s.git
synced 2026-02-03 20:39:49 -05:00
Use channel.yaml instead of curling for stable for kubectl install (#13531)
Some checks are pending
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Some checks are pending
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
* Use channel.yaml instead of curling for stable for kubectl install * Stop vex report from leaking out of make local-image Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
parent
ce17fce058
commit
daa11863d2
2 changed files with 4 additions and 2 deletions
3
.github/workflows/e2e.yaml
vendored
3
.github/workflows/e2e.yaml
vendored
|
|
@ -104,7 +104,8 @@ jobs:
|
||||||
uses: ./.github/actions/setup-go
|
uses: ./.github/actions/setup-go
|
||||||
- name: Install Kubectl
|
- name: Install Kubectl
|
||||||
run: |
|
run: |
|
||||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
STABLE_VERSION=$(yq '.channels[] | select(.name == "stable") | .latest | sub("\+.*", "")' channel.yaml)
|
||||||
|
curl -LO "https://dl.k8s.io/release/${STABLE_VERSION}/bin/linux/amd64/kubectl"
|
||||||
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
|
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
|
||||||
- name: "Download k3s binary"
|
- name: "Download k3s binary"
|
||||||
uses: actions/download-artifact@v7
|
uses: actions/download-artifact@v7
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,12 @@ TRIVY_TEMPLATE='{{- $critical := 0 }}{{- $high := 0 }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
Vulnerabilities - Critical: {{ $critical }}, High: {{ $high }}{{ println }}'
|
Vulnerabilities - Critical: {{ $critical }}, High: {{ $high }}{{ println }}'
|
||||||
VEX_REPORT="rancher.openvex.json"
|
VEX_REPORT="/tmp/rancher.openvex.json"
|
||||||
|
|
||||||
# Download Rancher's VEX Hub standalone report
|
# Download Rancher's VEX Hub standalone report
|
||||||
curl -fsS -o ${VEX_REPORT} https://raw.githubusercontent.com/rancher/vexhub/refs/heads/main/reports/rancher.openvex.json
|
curl -fsS -o ${VEX_REPORT} https://raw.githubusercontent.com/rancher/vexhub/refs/heads/main/reports/rancher.openvex.json
|
||||||
|
|
||||||
trivy --quiet image --severity ${SEVERITIES} --vex ${VEX_REPORT} --no-progress --ignore-unfixed --format template --template "${TRIVY_TEMPLATE}" ${IMAGE}
|
trivy --quiet image --severity ${SEVERITIES} --vex ${VEX_REPORT} --no-progress --ignore-unfixed --format template --template "${TRIVY_TEMPLATE}" ${IMAGE}
|
||||||
|
|
||||||
|
rm ${VEX_REPORT}
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue