Pass docker_config directory to Skopeo and ORAS
Merge Request Description
Rescan-rebuild stage was seen failing due to ORAS download failing: https://repo1.dso.mil/dsop/parasoft/parasoft/cpptest/cpptest-professional/-/jobs/13681759
Determined root cause was no authentication. This MR refactors Skopeo and ORASArtifact classes to receive a docker config directory as an argument.
Merge Request BOE
Risk
Lint stage was modified -> risk
Mitigated by running pipeline in staging (see below)
Testing
Skopeo and ORASArtifact classes were tested locally and produced desired results:
from ironbank.pipeline.container_tools.skopeo import Skopeo
Skopeo.inspect('ironbank/opensource/python:v3.10.6', '/Users/cmiller/repos/ironbank-pipeline/docker_config/')
from ironbank.pipeline.artifacts import ORASArtifact
ORASArtifact.download('registry1.dso.mil/ironbank/redhat/ubi/ubi8@sha256:0efb3d617d8b525910cf3bba1f4afd77c54e19b321d6b350bf43e648a6b9c837',
'/Users/cmiller/repos/ironbank-pipeline/', '/Users/cmiller/repos/ironbank-pipeline/docker_config/')
Full pipeline ran in staging:
- Dev Branch: https://code-ib-mario.staging.dso.mil/dsop/opensource/python/python39/-/pipelines/2480
- Initial run of rescan-or-rebuild stage: https://code-ib-mario.staging.dso.mil/dsop/opensource/python/python39/-/jobs/32222
- Re-run of rescan-or-rebuild stage after upload to harbor: https://code-ib-mario.staging.dso.mil/dsop/opensource/python/python39/-/jobs/32247
- Master: https://code-ib-mario.staging.dso.mil/dsop/opensource/python/python39/-/pipelines/2481
- UBI8: https://code-ib-mario.staging.dso.mil/dsop/redhat/ubi/ubi8/-/pipelines/2482
Edited by Cody Miller