UNCLASSIFIED - NO CUI

Skip to content

Resolve "Add Dynamic MIME Types to S3 Upload Function"

While working the issue to update the MIME types for the S3 upload, I saw a message that the "Download All Files" function of IBFE wasn't working as it used to. When I compared how we used to upload documents in the Jenkins pipeline, we have changed some of these values.

Test Pipeline Run:

https://repo1.dsop.io/dsop/opensource/pipeline-test-project/ubi8/-/pipelines/109187

S3 Link to artifacts:

https://console.amazonaws-us-gov.com/s3/buckets/ironbank-pipeline-artifacts?region=us-gov-west-1&prefix=testing/container-scan-reports/opensource/pipeline-test-project/ubi8/&showversions=false

repo_map.json now has a contentType of application/json instead of application/octet-stream
The tar.gz file for all artifacts now has a contentType of application/x-compressed-tar instead of application/octet-stream and a contentEncoding of gzip, which was not previously included in the extra_args uploaded.

Issues this MR address in addition to adding the dynamic MIME types:

  • Removed unneeded quotes on approval status that breaks the IBFE
    • e.g. Existing pipeline outputs IMAGE_APPROVAL_STATUS='approved' instead of IMAGE_APPROVAL_STATUS=approved
    • Causing image
  • Reverts the tar_name value to match the tar_location as we used to do during the Jenkins days
    • e.g.
      • Current tar location: "Tar_Location": "https://s3-us-gov-west-1.amazonaws.com/ironbank-pipeline-artifacts/container-scan-reports/redhat/ubi/ubi8/8.3/2020-12-11T23:09:35.292_101487/reports/ubi8-8.3-reports-signature.tar.gz"
      • Current tar name: "Tar_Name": "ubi8-101487.tar"
      • Previous tar name: "Tar_Name": "ubi8-8.0-reports-signature.tar.gz" (Which matched the file name in TAR_LOCATION)
      • Tar name now matches tar location's filename
        "Tar_Name": "ubi8-8.2-reports-signature.tar.gz"
        "Tar_Location": "<s3-file-path>/ubi8-8.2-reports-signature.tar.gz"

Merge request reports