Skip to content

Commit

Permalink
fix: use explicit crictl version (v1.25.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
manusa committed Dec 14, 2022
1 parent bb2a719 commit f226aca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/download.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('download module test suite', () => {
// Then
expect(axios).toHaveBeenCalledWith(
expect.objectContaining({
url: 'https://api.github.com/repos/kubernetes-sigs/cri-tools/releases/latest',
url: 'https://api.github.com/repos/kubernetes-sigs/cri-tools/releases/tags/v1.25.0',
headers: {Authorization: 'token secret-token'}
})
);
Expand Down
4 changes: 2 additions & 2 deletions src/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ const downloadMinikube = async (inputs = {}) => {

const installCriCtl = async (inputs = {}) => {
core.info(`Downloading cri-ctl`);
const tag = 'v1.25.0';
const tar = await downloadGitHubArtifact({
inputs,
releaseUrl: 'https://api.github.com/repos/kubernetes-sigs/cri-tools/releases/latest',
releaseUrl: `https://api.github.com/repos/kubernetes-sigs/cri-tools/releases/tags/${tag}`,
assetPredicate: asset =>
isLinux(asset.name) && isAmd64(asset.name) && !isSignature(asset.name) && asset.name.indexOf('crictl') === 0
});
Expand Down Expand Up @@ -78,7 +79,6 @@ const installCriDockerd = async (inputs = {}) => {
const sourceDir = await tc.extractTar(sourceTar);
const sourceContent = firstDir(sourceDir);
logExecSync(`sed -i 's/cri-dockerd --/cri-dockerd --network-plugin=cni --/g' ${sourceDir}/${sourceContent}/packaging/systemd/cri-docker.service`);
logExecSync(`cat ${sourceDir}/${sourceContent}/packaging/systemd/cri-docker.service`);
logExecSync(`sudo cp -a ${sourceDir}/${sourceContent}/packaging/systemd/* /etc/systemd/system`);
const serviceFile = '/etc/systemd/system/cri-docker.service';
fs.writeFileSync(serviceFile, fs.readFileSync(serviceFile).toString()
Expand Down

0 comments on commit f226aca

Please sign in to comment.