private boolean findAndSetManifestFromArtifactory ( ArtifactoryServer server , ArtifactoryDependenciesClient dependenciesClient , TaskListener listener ) throws IOException { String candidateImagePath = DockerUtils . getImagePath ( imageTag ) ; String manifestPath ; // Try to get manifest, assuming reverse proxy manifestPath = StringUtils . join ( new String [ ] { server . getUrl ( ) , targetRepo , candidateImagePath , "manifest.json" } , "/" ) ; if ( checkAndSetManifestAndImagePathCandidates ( manifestPath , candidateImagePath , dependenciesClient , listener ) ) { return true ; } // Try to get manifest, assuming proxy-less candidateImagePath = candidateImagePath . substring ( candidateImagePath . indexOf ( "/" ) + 1 ) ; manifestPath = StringUtils . join ( new String [ ] { server . getUrl ( ) , targetRepo , candidateImagePath , "manifest.json" } , "/" ) ; if ( checkAndSetManifestAndImagePathCandidates ( manifestPath , candidateImagePath , dependenciesClient , listener ) ) { return true ; } // Couldn't find correct manifest listener . getLogger ( ) . println ( "Could not find corresponding manifest.json file in Artifactory." ) ; return false ; }
Find and validate manifest . json file in Artifactory for the current image . Since provided imageTag differs between reverse - proxy and proxy - less configuration try to build the correct manifest path .