Skip to content

Commit

Permalink
fix: s2i image name need remove url scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
ymh1028 committed Feb 8, 2020
1 parent 771b358 commit 306963f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/stores/s2i/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,9 @@ export default class S2IBuilderStore extends Base {
'-'
)}-${get(data, 'spec.config.tag')}-${generateId(3)}`.slice(-63)
}
const repoUrl = get(
data,
'metadata.annotations["kubesphere.io/repoUrl"]',
''
)
let repoUrl = get(data, 'metadata.annotations["kubesphere.io/repoUrl"]', '')
repoUrl = repoUrl.replace(/^(http(s)?:\/\/)?(.*)$/, '$3')

const imageName = get(data, 'spec.config.imageName', '')

if (repoUrl && !imageName.startsWith(repoUrl)) {
Expand Down

0 comments on commit 306963f

Please sign in to comment.