Closed schurlinga closed 1 year ago
Hello.
I got the same error.
2023-01-20T17:18:30.9743754Z [command]/usr/bin/curl -s -L -o /opt/app-root/app/_work/r1/a/.download/openshift-client-linux.tar.gz https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.10.44/openshift-client-linux.tar.gz
2023-01-20T17:18:41.8248444Z ##[debug]Exit code 0 received from tool '/usr/bin/curl'
2023-01-20T17:18:41.8257142Z ##[debug]STDIO streams have closed for tool '/usr/bin/curl'
2023-01-20T17:18:41.8267886Z ##[debug]expanding /opt/app-root/app/_work/r1/a/.download/openshift-client-linux.tar.gz into /opt/app-root/app/_work/r1/a/.download
2023-01-20T17:18:41.8287994Z ##[debug]task result: Failed
2023-01-20T17:18:41.8361713Z ##[error]unknown archive format /opt/app-root/app/_work/r1/a/.download/openshift-client-linux.tar.gz
I believe the issue could be located at this line: (https://github.com/redhat-developer/openshift-vsts/blob/master/src/oc-install.ts#L230)
Could it be that "path.extname(archive)" is returning ".bz" instead of ".tar.gz" when the compressed file ends with ".tar.gz"?
yes, that is the issue, because in unzipArchive there is no case for ".gz". Only for ".tgz" and ".tar.gz"
@schurlinga @rgh-hipoges I just released the extension with the fix (v. 2.0.1). Let me know if you face any other issue.
And ... sorry for the late release. had some issue with Jenkins
@lstocchi thx for the release, will test it today.
I also added a comment to your Pull Request, as i think there could be another issue if anyone uploads the archive with .tar.bz2
as the extension.
Hello,
I am running an azure devops agent on Linux and when it comes to the oc-setup@3 task, it throws an error trying to expand the *.tar.gz file.
Pipeline Error:
##[error]unknown archive format /opt/app-root/app/_work/1/s/.download/openshift-client-linux.tar.gz
Agent Specs:
Pipeline Task:
Pipeline Logs: