Yaml 你能帮我准备脚本复制源代码行并用nexus:1845替换quay.io吗

Yaml 你能帮我准备脚本复制源代码行并用nexus:1845替换quay.io吗,yaml,Yaml,我有以下500多行: source: quay.io/redhat-developer/openshift-jenkins-image-builder source: registry.redhat.io/ocp-tools-4-tech-preview/jenkins-operator-bundle source: registry.redhat.io/rhel8/skopeo 输出应该是这样的:(源是重复的,而不是quay.io应该是nexus:1855) 你能帮我准备脚本吗?这不是代码编

我有以下500多行:

source: quay.io/redhat-developer/openshift-jenkins-image-builder
source: registry.redhat.io/ocp-tools-4-tech-preview/jenkins-operator-bundle
source: registry.redhat.io/rhel8/skopeo
输出应该是这样的:(源是重复的,而不是quay.io应该是nexus:1855)


你能帮我准备脚本吗?这不是代码编写服务。到目前为止你都试了些什么。显示您的代码,并就您无法解决的问题询问特定问题。我编辑了我的问题如果这是您的代码-为什么使用python标记?这里没有python代码。对,删除了python标记
spec:
  repositoryDigestMirrors:
  - mirrors:
    - nexus:1855/redhat-developer/openshift-jenkins-image-builder
    source: quay.io/redhat-developer/openshift-jenkins-image-builder
  - mirrors:
    - nexus:1855/ocp-tools-4-tech-preview/jenkins-operator-bundle
    source: registry.redhat.io/ocp-tools-4-tech-preview/jenkins-operator-bundle
  - mirrors: 
    - nexus:1855/rhel8/skopeo
    source: registry.redhat.io/rhel8/skopeo