Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/cmd-remote-build-container
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ def main():
# Add some information about the commit to labels for the container
args.labels.append(f"org.opencontainers.image.revision={commit}")
args.labels.append(f"org.opencontainers.image.source={args.git_url}")
if args.add_openshift_build_labels:
args.labels.append(f"io.openshift.build.commit.id={commit}")
args.labels.append(f"io.openshift.build.source-location={args.git_url}")
# If a tag wasn't passed then use the arch + shortcommit
if not args.tag:
args.tag = f"{args.arch}-{shortcommit}"
Expand Down Expand Up @@ -257,6 +260,9 @@ Examples:
parser.add_argument(
'--label', dest="labels", default=[], action='append',
required=False, help='Add image label(s)')
parser.add_argument(
'--add-openshift-build-labels', required=False, action='store_true',
help='Add io.openshift.build.* labels with git information')
parser.add_argument(
'--mount-host-ca-certs', required=False, action='store_true',
help='Mount the CA certificate from the remote host')
Expand Down
Loading