Skip to content

Commit 6f9a2ea

Browse files
anoopcs9phlogistonjohn
authored andcommitted
tests/ad-server: Add optional override for container image tags
This is in preparation to accept ad-server container images built(and tagged 'nightly') with nightly Samba RPMs.
1 parent 58b6fb7 commit 6f9a2ea

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

tests/files/samba-ad-server-deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
- name: samba
1919
# Pointing to locally built image,
2020
# change here to use a registry.
21-
image: samba-ad-container:latest
21+
image: samba-ad-container:$IMG_TAG
2222
# Need imagePullPolicy Never for working with local images.
2323
# Otherwise we get "ErrImagePull".
2424
imagePullPolicy: Never

tests/files/samba-domain-member-pod.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ metadata:
7474
spec:
7575
shareProcessNamespace: true
7676
containers:
77-
- image: samba-container:latest
77+
- image: samba-container:$IMG_TAG
7878
# Need imagePullPolicy Never for working with local images.
7979
# Otherwise we get "ErrImagePull".
8080
imagePullPolicy: Never
@@ -109,7 +109,7 @@ spec:
109109
name: samba-state-dir
110110
- mountPath: "/run/samba/winbindd"
111111
name: samba-sockets-dir
112-
- image: quay.io/samba.org/samba-server:latest
112+
- image: quay.io/samba.org/samba-server:$IMG_TAG
113113
name: winbind
114114
command:
115115
- "samba-container"
@@ -134,7 +134,7 @@ spec:
134134
- mountPath: "/run/samba/winbindd"
135135
name: samba-sockets-dir
136136
initContainers:
137-
- image: quay.io/samba.org/samba-server:latest
137+
- image: quay.io/samba.org/samba-server:$IMG_TAG
138138
name: init
139139
args:
140140
- "init"
@@ -154,7 +154,7 @@ spec:
154154
name: samba-container-config
155155
- mountPath: "/var/lib/samba"
156156
name: samba-state-dir
157-
- image: quay.io/samba.org/samba-server:latest
157+
- image: quay.io/samba.org/samba-server:$IMG_TAG
158158
name: must-join
159159
args:
160160
- "must-join"

tests/test-deploy-ad-member.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/usr/bin/env bash
22

33
SCRIPT_DIR="$(cd "$(dirname "${0}")" && pwd)"
4+
IMG_TAG=${IMG_TAG:-"latest"}
45

56
source "${SCRIPT_DIR}/common.sh"
67

78
echo "Creating ad member pod..."
8-
ERROR_MSG=$(kubectl create -f "${MEMBER_POD_YAML}" 2>&1 1>/dev/null)
9+
ERROR_MSG=$(IMG_TAG=${IMG_TAG} envsubst < "${MEMBER_POD_YAML}" | kubectl create -f - 2>&1 1>/dev/null)
910
if [ $? -ne 0 ] ; then
1011
if [[ "${ERROR_MSG}" =~ "AlreadyExists" ]] ; then
1112
echo "pod exists already. Continuing."

tests/test-deploy-ad-server.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/usr/bin/env bash
22

33
SCRIPT_DIR="$(cd "$(dirname "${0}")" && pwd)"
4+
IMG_TAG=${IMG_TAG:-"latest"}
45

56
source "${SCRIPT_DIR}/common.sh"
67

78
echo "Creating ad server deployment..."
8-
ERROR_MSG=$(kubectl create -f "${AD_DEPLOYMENT_YAML}" 2>&1 1>/dev/null)
9+
ERROR_MSG=$(IMG_TAG=${IMG_TAG} envsubst < "${AD_DEPLOYMENT_YAML}" | kubectl create -f - 2>&1 1>/dev/null)
910
if [ $? -ne 0 ] ; then
1011
if [[ "${ERROR_MSG}" =~ "AlreadyExists" ]] ; then
1112
echo "Deployment exists already. Continuing."

0 commit comments

Comments
 (0)