File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed
Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 1717
1818REPOSITORY=" "
1919ARGS=()
20+ PREDICATE=" "
2021
2122while (( $# > 0 )) ; do
2223 case " $1 " in
2324 --repository) shift ; REPOSITORY=" $1 " ; shift ;;
2425 (--repository=* ) REPOSITORY=" ${1# --repository=} " ; shift ;;
26+ --predicate) shift ; PREDICATE=" $( rlocation " $1 " ) " ; shift ;;
27+ (--predicate=* ) PREDICATE=" $( rlocation " ${1# --predicate=} " ) " ; shift ;;
2528 * ) ARGS+=( " $1 " ); shift ;;
2629 esac
2730done
@@ -31,5 +34,5 @@ if [[ -z "${REPOSITORY}" ]]; then
3134 exit 1
3235fi
3336
34- exec " ${COSIGN} " attest " ${REPOSITORY} @${DIGEST} " ${ARGS[@]+" ${ARGS[@]} " }
37+ exec " ${COSIGN} " attest " ${REPOSITORY} @${DIGEST} " --predicate " ${PREDICATE} " ${ARGS[@]+" ${ARGS[@]} " }
3538
Original file line number Diff line number Diff line change @@ -118,10 +118,6 @@ attrs = {
118118 executable = True ,
119119 cfg = "target" ,
120120 ),
121- "tarball_name" : attr .string (
122- default = "tarball.tar" ,
123- doc = "Name of the tarball file to generate." ,
124- ),
125121 "_run_template" : attr .label (
126122 default = Label ("//oci/private:load.sh.tpl" ),
127123 doc = """ \
@@ -187,7 +183,7 @@ def _load_impl(ctx):
187183
188184 # This action produces a large output and should rarely be used as it puts load on the cache.
189185 # It will only run if the "tarball" output_group is explicitly requested
190- tarball = ctx .actions .declare_file ("{}/{} " .format (ctx .label .name , ctx . attr . tarball_name ))
186+ tarball = ctx .actions .declare_file ("{}/tarball.tar " .format (ctx .label .name ))
191187 tar_inputs = depset (direct = mtree_outputs , transitive = [mtree_inputs ])
192188 tar_args = ctx .actions .args ()
193189 tar_args .add_all (["--create" , "--no-xattr" , "--no-mac-metadata" ])
Original file line number Diff line number Diff line change @@ -15,10 +15,8 @@ elif command -v docker &> /dev/null; then
1515 CONTAINER_CLI=" docker"
1616elif command -v podman & > /dev/null; then
1717 CONTAINER_CLI=" podman"
18- elif command -v nerdctl & > /dev/null; then
19- CONTAINER_CLI=" nerdctl"
2018else
21- echo >&2 " Neither docker or podman or nerdctl could be found."
19+ echo >&2 " Neither docker or podman could be found."
2220 echo >&2 " To use a different container runtime, pass an executable to the 'loader' attribute of oci_tarball."
2321 exit 1
2422fi
You can’t perform that action at this time.
0 commit comments