mirror of
https://github.com/Azure/setup-kubectl
synced 2025-09-23 12:07:59 +00:00
Compare commits
2 commits
87e3e3045e
...
6b0161eed9
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6b0161eed9 | ||
![]() |
42b5b7bc56 |
3 changed files with 3 additions and 4 deletions
|
@ -251,7 +251,7 @@ describe('Testing all functions in run file.', () => {
|
||||||
jest.spyOn(core, 'setOutput').mockImplementation()
|
jest.spyOn(core, 'setOutput').mockImplementation()
|
||||||
expect(await run.run()).toBeUndefined()
|
expect(await run.run()).toBeUndefined()
|
||||||
expect(toolCache.downloadTool).toHaveBeenCalledWith(
|
expect(toolCache.downloadTool).toHaveBeenCalledWith(
|
||||||
'https://storage.googleapis.com/kubernetes-release/release/stable.txt'
|
'https://dl.k8s.io/release/stable.txt'
|
||||||
)
|
)
|
||||||
expect(core.getInput).toHaveBeenCalledWith('version', {required: true})
|
expect(core.getInput).toHaveBeenCalledWith('version', {required: true})
|
||||||
expect(core.addPath).toHaveBeenCalledWith('pathToCachedTool')
|
expect(core.addPath).toHaveBeenCalledWith('pathToCachedTool')
|
||||||
|
|
|
@ -12,8 +12,7 @@ import {
|
||||||
|
|
||||||
const kubectlToolName = 'kubectl'
|
const kubectlToolName = 'kubectl'
|
||||||
const stableKubectlVersion = 'v1.15.0'
|
const stableKubectlVersion = 'v1.15.0'
|
||||||
const stableVersionUrl =
|
const stableVersionUrl = 'https://dl.k8s.io/release/stable.txt'
|
||||||
'https://storage.googleapis.com/kubernetes-release/release/stable.txt'
|
|
||||||
|
|
||||||
export async function run() {
|
export async function run() {
|
||||||
let version = core.getInput('version', {required: true})
|
let version = core.getInput('version', {required: true})
|
||||||
|
|
|
@ -10,7 +10,7 @@ def get_latest_version():
|
||||||
time_to_sleep = 2
|
time_to_sleep = 2
|
||||||
for _ in range(10):
|
for _ in range(10):
|
||||||
response = requests.get(
|
response = requests.get(
|
||||||
'https://storage.googleapis.com/kubernetes-release/release/stable.txt')
|
'https://dl.k8s.io/release/stable.txt')
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
break
|
break
|
||||||
print('Failed to obtain latest version info, retrying.')
|
print('Failed to obtain latest version info, retrying.')
|
||||||
|
|
Loading…
Reference in a new issue