sigs.k8s.io/prow@v0.0.0-20240503223140-c5e374dc7eb1/pkg/pod-utils/decorate/testdata/TestProwJobToPod_8.yaml (about)

     1  metadata:
     2    annotations:
     3      prow.k8s.io/context: job-context
     4      prow.k8s.io/job: job-name
     5    creationTimestamp: null
     6    labels:
     7      created-by-prow: "true"
     8      needstobe: inherited
     9      prow.k8s.io/build-id: blabla
    10      prow.k8s.io/context: job-context
    11      prow.k8s.io/id: pod
    12      prow.k8s.io/job: job-name
    13      prow.k8s.io/refs.base_ref: base-ref
    14      prow.k8s.io/refs.org: org-name
    15      prow.k8s.io/refs.pull: "1"
    16      prow.k8s.io/refs.repo: repo-name
    17      prow.k8s.io/type: presubmit
    18    name: pod
    19  spec:
    20    automountServiceAccountToken: false
    21    containers:
    22    - command:
    23      - /tools/entrypoint
    24      env:
    25      - name: MY_ENV
    26        value: rocks
    27      - name: ARTIFACTS
    28        value: /logs/artifacts
    29      - name: BUILD_ID
    30        value: blabla
    31      - name: BUILD_NUMBER
    32        value: blabla
    33      - name: CI
    34        value: "true"
    35      - name: GOPATH
    36        value: /home/prow/go
    37      - name: JOB_NAME
    38        value: job-name
    39      - name: JOB_SPEC
    40        value: '{"type":"presubmit","job":"job-name","buildid":"blabla","prowjobid":"pod","refs":{"org":"org-name","repo":"repo-name","base_ref":"base-ref","base_sha":"base-sha","pulls":[{"number":1,"author":"author-name","sha":"pull-sha","title":"pull-title","head_ref":"orig-branch-name"}],"path_alias":"somewhere/else"},"decoration_config":{"timeout":"2h0m0s","grace_period":"10s","utility_images":{"clonerefs":"clonerefs:tag","initupload":"initupload:tag","entrypoint":"entrypoint:tag","sidecar":"sidecar:tag"},"gcs_configuration":{"bucket":"my-bucket","path_strategy":"legacy","default_org":"kubernetes","default_repo":"kubernetes","mediaTypes":{"log":"text/plain"}},"default_service_account_name":"default-SA","cookiefile_secret":"yummy/.gitcookies"}}'
    41      - name: JOB_TYPE
    42        value: presubmit
    43      - name: PROW_JOB_ID
    44        value: pod
    45      - name: PULL_BASE_REF
    46        value: base-ref
    47      - name: PULL_BASE_SHA
    48        value: base-sha
    49      - name: PULL_HEAD_REF
    50        value: orig-branch-name
    51      - name: PULL_NUMBER
    52        value: "1"
    53      - name: PULL_PULL_SHA
    54        value: pull-sha
    55      - name: PULL_REFS
    56        value: base-ref:base-sha,1:pull-sha
    57      - name: PULL_TITLE
    58        value: pull-title
    59      - name: REPO_NAME
    60        value: repo-name
    61      - name: REPO_OWNER
    62        value: org-name
    63      - name: ENTRYPOINT_OPTIONS
    64        value: '{"timeout":7200000000000,"grace_period":10000000000,"artifact_dir":"/logs/artifacts","args":["/bin/thing","some","args"],"container_name":"test","process_log":"/logs/process-log.txt","marker_file":"/logs/marker-file.txt","metadata_file":"/logs/artifacts/metadata.json"}'
    65      image: tester
    66      name: test
    67      resources: {}
    68      terminationMessagePolicy: FallbackToLogsOnError
    69      volumeMounts:
    70      - mountPath: /logs
    71        name: logs
    72      - mountPath: /tools
    73        name: tools
    74      - mountPath: /home/prow/go
    75        name: code
    76      workingDir: /home/prow/go/src/somewhere/else
    77    - env:
    78      - name: JOB_SPEC
    79        value: '{"type":"presubmit","job":"job-name","buildid":"blabla","prowjobid":"pod","refs":{"org":"org-name","repo":"repo-name","base_ref":"base-ref","base_sha":"base-sha","pulls":[{"number":1,"author":"author-name","sha":"pull-sha","title":"pull-title","head_ref":"orig-branch-name"}],"path_alias":"somewhere/else"},"decoration_config":{"timeout":"2h0m0s","grace_period":"10s","utility_images":{"clonerefs":"clonerefs:tag","initupload":"initupload:tag","entrypoint":"entrypoint:tag","sidecar":"sidecar:tag"},"gcs_configuration":{"bucket":"my-bucket","path_strategy":"legacy","default_org":"kubernetes","default_repo":"kubernetes","mediaTypes":{"log":"text/plain"}},"default_service_account_name":"default-SA","cookiefile_secret":"yummy/.gitcookies"}}'
    80      - name: SIDECAR_OPTIONS
    81        value: '{"gcs_options":{"items":["/logs/artifacts"],"bucket":"my-bucket","path_strategy":"legacy","default_org":"kubernetes","default_repo":"kubernetes","mediaTypes":{"log":"text/plain"},"dry_run":false},"entries":[{"args":["/bin/thing","some","args"],"container_name":"test","process_log":"/logs/process-log.txt","marker_file":"/logs/marker-file.txt","metadata_file":"/logs/artifacts/metadata.json"}],"censoring_options":{}}'
    82      image: sidecar:tag
    83      name: sidecar
    84      resources: {}
    85      terminationMessagePolicy: FallbackToLogsOnError
    86      volumeMounts:
    87      - mountPath: /logs
    88        name: logs
    89    initContainers:
    90    - args:
    91      - --cookiefile=/secrets/cookiefile/.gitcookies
    92      env:
    93      - name: CLONEREFS_OPTIONS
    94        value: '{"src_root":"/home/prow/go","log":"/logs/clone.json","git_user_name":"ci-robot","git_user_email":"ci-robot@k8s.io","refs":[{"org":"org-name","repo":"repo-name","base_ref":"base-ref","base_sha":"base-sha","pulls":[{"number":1,"author":"author-name","sha":"pull-sha","title":"pull-title","head_ref":"orig-branch-name"}],"path_alias":"somewhere/else"}],"cookie_path":"/secrets/cookiefile/.gitcookies","github_api_endpoints":["https://api.github.com"]}'
    95      image: clonerefs:tag
    96      name: clonerefs
    97      resources: {}
    98      terminationMessagePolicy: FallbackToLogsOnError
    99      volumeMounts:
   100      - mountPath: /logs
   101        name: logs
   102      - mountPath: /home/prow/go
   103        name: code
   104      - mountPath: /tmp
   105        name: clonerefs-tmp
   106      - mountPath: /secrets/cookiefile
   107        name: cookiefile
   108        readOnly: true
   109    - env:
   110      - name: INITUPLOAD_OPTIONS
   111        value: '{"bucket":"my-bucket","path_strategy":"legacy","default_org":"kubernetes","default_repo":"kubernetes","mediaTypes":{"log":"text/plain"},"dry_run":false,"log":"/logs/clone.json"}'
   112      - name: JOB_SPEC
   113        value: '{"type":"presubmit","job":"job-name","buildid":"blabla","prowjobid":"pod","refs":{"org":"org-name","repo":"repo-name","base_ref":"base-ref","base_sha":"base-sha","pulls":[{"number":1,"author":"author-name","sha":"pull-sha","title":"pull-title","head_ref":"orig-branch-name"}],"path_alias":"somewhere/else"},"decoration_config":{"timeout":"2h0m0s","grace_period":"10s","utility_images":{"clonerefs":"clonerefs:tag","initupload":"initupload:tag","entrypoint":"entrypoint:tag","sidecar":"sidecar:tag"},"gcs_configuration":{"bucket":"my-bucket","path_strategy":"legacy","default_org":"kubernetes","default_repo":"kubernetes","mediaTypes":{"log":"text/plain"}},"default_service_account_name":"default-SA","cookiefile_secret":"yummy/.gitcookies"}}'
   114      image: initupload:tag
   115      name: initupload
   116      resources: {}
   117      terminationMessagePolicy: FallbackToLogsOnError
   118      volumeMounts:
   119      - mountPath: /logs
   120        name: logs
   121    - args:
   122      - --copy-mode-only
   123      image: entrypoint:tag
   124      name: place-entrypoint
   125      resources: {}
   126      terminationMessagePolicy: FallbackToLogsOnError
   127      volumeMounts:
   128      - mountPath: /tools
   129        name: tools
   130    restartPolicy: Never
   131    securityContext: {}
   132    serviceAccountName: default-SA
   133    terminationGracePeriodSeconds: 12
   134    volumes:
   135    - emptyDir: {}
   136      name: logs
   137    - emptyDir: {}
   138      name: tools
   139    - emptyDir: {}
   140      name: clonerefs-tmp
   141    - name: cookiefile
   142      secret:
   143        defaultMode: 256
   144        secretName: yummy
   145    - emptyDir: {}
   146      name: code
   147  status: {}