Skip to content

Commit

Permalink
move changes from buildah-oci-ta to buildah
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwcook committed Jul 18, 2024
1 parent 38b5623 commit 305fedb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
20 changes: 1 addition & 19 deletions task/buildah-oci-ta/0.1/buildah-oci-ta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ spec:
description: Name of secret which contains the entitlement certificates
type: string
default: etc-pki-entitlement
- name: ACTIVATION_KEY
default: activation-key
description: Name of secret which contains subscription activation key
type: string
- name: HERMETIC
description: Determines if build will be executed without network access.
type: string
Expand Down Expand Up @@ -152,10 +148,7 @@ spec:
secret:
optional: true
secretName: $(params.ENTITLEMENT_SECRET)
- name: activation-key
secret:
optional: true
secretName: $(params.ACTIVATION_KEY)

- name: shared
emptyDir: {}
- name: trusted-ca
Expand Down Expand Up @@ -185,8 +178,6 @@ spec:
value: $(params.DOCKERFILE)
- name: ENTITLEMENT_SECRET
value: $(params.ENTITLEMENT_SECRET)
- name: ACTIVATION_KEY
value: $(params.ACTIVATION_KEY)
- name: HERMETIC
value: $(params.HERMETIC)
- name: IMAGE
Expand Down Expand Up @@ -231,8 +222,6 @@ spec:
name: varlibcontainers
- mountPath: /entitlement
name: etc-pki-entitlement
- mountPath: /activation-key
name: activation-key
- mountPath: /additional-secret
name: additional-secret
- mountPath: /mnt/trusted-ca
Expand Down Expand Up @@ -365,13 +354,6 @@ spec:
echo "Adding the entitlement to the build"
fi
ACTIVATION_KEY_PATH="/activation-key"
if [ -d "$ACTIVATION_KEY_PATH" ]; then
cp -r --preserve=mode "$ACTIVATION_KEY_PATH" /tmp/activation-key
VOLUME_MOUNTS="${VOLUME_MOUNTS} --volume /tmp/activation-key:/activation-key"
echo "Adding activation key to the build"
fi
ADDITIONAL_SECRET_PATH="/additional-secret"
ADDITIONAL_SECRET_TMP="/tmp/additional-secret"
if [ -d "$ADDITIONAL_SECRET_PATH" ]; then
Expand Down
19 changes: 19 additions & 0 deletions task/buildah/0.1/buildah.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ spec:
description: Name of secret which contains the entitlement certificates
type: string
default: "etc-pki-entitlement"
- name: ACTIVATION_KEY
default: activation-key
description: Name of secret which contains subscription activation key
type: string
- name: ADDITIONAL_SECRET
description: Name of a secret which will be made available to the build with 'buildah build --secret' at /run/secrets/$ADDITIONAL_SECRET
type: string
Expand Down Expand Up @@ -153,6 +157,8 @@ spec:
value: $(params.BUILDER_IMAGE)
- name: ENTITLEMENT_SECRET
value: $(params.ENTITLEMENT_SECRET)
- name: ACTIVATION_KEY
value: $(params.ACTIVATION_KEY)
- name: ADDITIONAL_SECRET
value: $(params.ADDITIONAL_SECRET)
- name: BUILD_ARGS_FILE
Expand Down Expand Up @@ -306,6 +312,13 @@ spec:
echo "Adding the entitlement to the build"
fi
ACTIVATION_KEY_PATH="/activation-key"
if [ -d "$ACTIVATION_KEY_PATH" ]; then
cp -r --preserve=mode "$ACTIVATION_KEY_PATH" /tmp/activation-key
VOLUME_MOUNTS="${VOLUME_MOUNTS} --volume /tmp/activation-key:/activation-key"
echo "Adding activation key to the build"
fi
ADDITIONAL_SECRET_PATH="/additional-secret"
ADDITIONAL_SECRET_TMP="/tmp/additional-secret"
if [ -d "$ADDITIONAL_SECRET_PATH" ]; then
Expand Down Expand Up @@ -353,6 +366,8 @@ spec:
name: varlibcontainers
- mountPath: "/entitlement"
name: etc-pki-entitlement
- mountPath: /activation-key
name: activation-key
- mountPath: "/additional-secret"
name: additional-secret
- name: trusted-ca
Expand Down Expand Up @@ -543,6 +558,10 @@ spec:
secret:
secretName: $(params.ENTITLEMENT_SECRET)
optional: true
- name: activation-key
secret:
optional: true
secretName: $(params.ACTIVATION_KEY)
- name: additional-secret
secret:
secretName: $(params.ADDITIONAL_SECRET)
Expand Down

0 comments on commit 305fedb

Please sign in to comment.