Skip to content

feat: support CRI #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/__tests__/download.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ describe('download module test suite', () => {
data: {
assets: [
{
name: 'cni-plugins-linux-amd64-v1.2.0.tgz.sha1',
name: 'cni-plugins-linux-amd64-v1.3.0.tgz.sha1',
browser_download_url: 'http://invalid'
},
{
name: 'cni-plugins-linux-amd64-v1.2.0.tgz',
name: 'cni-plugins-linux-amd64-v1.3.0.tgz',
browser_download_url: 'http://valid'
},
{
name: 'cni-plugins-linux-amd64-v1.2.0.tgz.sha512',
name: 'cni-plugins-linux-amd64-v1.3.0.tgz.sha512',
browser_download_url: 'http://invalid'
},
{
name: 'cni-plugins-windows-amd64-v1.2.0.tgz',
name: 'cni-plugins-windows-amd64-v1.3.0.tgz',
browser_download_url: 'http://invalid'
}
]
Expand All @@ -102,7 +102,7 @@ describe('download module test suite', () => {
// Then
expect(axios).toHaveBeenCalledWith(
expect.objectContaining({
url: 'https://api.github.com/repos/containernetworking/plugins/releases/tags/v1.2.0',
url: 'https://api.github.com/repos/containernetworking/plugins/releases/tags/v1.3.0',
headers: {Authorization: 'token secret-token'}
})
);
Expand Down Expand Up @@ -150,7 +150,7 @@ describe('download module test suite', () => {
// Then
expect(axios).toHaveBeenCalledWith(
expect.objectContaining({
url: 'https://api.github.com/repos/kubernetes-sigs/cri-tools/releases/tags/v1.25.0',
url: 'https://api.github.com/repos/kubernetes-sigs/cri-tools/releases/tags/v1.28.0',
headers: {Authorization: 'token secret-token'}
})
);
Expand All @@ -172,23 +172,23 @@ describe('download module test suite', () => {
data: {
assets: [
{
name: 'cri-dockerd-0.2.3-3.el7.src.rpm',
name: 'cri-dockerd-0.3.4-3.el7.src.rpm',
browser_download_url: 'http://invalid'
},
{
name: 'cri-dockerd-0.2.3-3.el7.src.rpm',
name: 'cri-dockerd-0.3.4-3.el7.src.rpm',
browser_download_url: 'http://invalid'
},
{
name: 'cri-dockerd-v0.2.0-darwin-arm64.tar.gz',
browser_download_url: 'http://invalid'
},
{
name: 'cri-dockerd-0.2.3.arm64.tgz',
name: 'cri-dockerd-0.3.4.arm64.tgz',
browser_download_url: 'http://invalid'
},
{
name: 'cri-dockerd-0.2.3.amd64.tgz',
name: 'cri-dockerd-0.3.4.amd64.tgz',
browser_download_url: 'http://valid'
},
{
Expand All @@ -211,7 +211,7 @@ describe('download module test suite', () => {
// Then
expect(axios).toHaveBeenCalledWith(
expect.objectContaining({
url: 'https://api.github.com/repos/Mirantis/cri-dockerd/releases/tags/v0.2.3',
url: 'https://api.github.com/repos/Mirantis/cri-dockerd/releases/tags/v0.3.4',
headers: {Authorization: 'token secret-token'}
})
);
Expand Down
6 changes: 3 additions & 3 deletions src/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const downloadMinikube = async (inputs = {}) => {
// https://github.com/kubernetes/minikube/commit/fd549f396dbd39385baefe88dcead0ccf99f1bff
const installCniPlugins = async (inputs = {}) => {
core.info(`Downloading CNI plugins`);
const tag = 'v1.2.0';
const tag = 'v1.3.0';
const tar = await downloadGitHubArtifact({
inputs,
releaseUrl: `https://api.github.com/repos/containernetworking/plugins/releases/tags/${tag}`,
Expand All @@ -62,7 +62,7 @@ const installCniPlugins = async (inputs = {}) => {

const installCriCtl = async (inputs = {}) => {
core.info(`Downloading cri-ctl`);
const tag = 'v1.25.0';
const tag = 'v1.28.0';
const tar = await downloadGitHubArtifact({
inputs,
releaseUrl: `https://api.github.com/repos/kubernetes-sigs/cri-tools/releases/tags/${tag}`,
Expand All @@ -78,7 +78,7 @@ const installCriDockerd = async (inputs = {}) => {
// const tagInfo = await getTagInfo({inputs, releaseUrl});
// const tag = tagInfo.data.name;
// const releaseUrl = 'https://api.github.com/repos/Mirantis/cri-dockerd/releases/latest';
const tag = 'v0.2.3';
const tag = 'v0.3.4';
const releaseUrl = `https://api.github.com/repos/Mirantis/cri-dockerd/releases/tags/${tag}`;
const binaryTar = await downloadGitHubArtifact({
inputs,
Expand Down