simplifying skaffold tests
This commit is contained in:
parent
5b445ae668
commit
fb342b36fc
@ -1,15 +0,0 @@
|
|||||||
FROM ubuntu:22.04
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y curl
|
|
||||||
|
|
||||||
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
|
|
||||||
&& mv kubectl /usr/bin/kubectl \
|
|
||||||
&& chmod +x /usr/bin/kubectl
|
|
||||||
|
|
||||||
ADD example.yaml /example.yaml
|
|
||||||
ADD example_dockerlogin.yaml /example_dockerlogin.yaml
|
|
||||||
ADD example_template.yaml /example_template.yaml
|
|
||||||
|
|
||||||
ADD utils/test.sh /test.sh
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/test.sh" ]
|
|
@ -9,9 +9,6 @@ build:
|
|||||||
- image: ghcr.io/lerentis/bitwarden-crd-operator
|
- image: ghcr.io/lerentis/bitwarden-crd-operator
|
||||||
docker:
|
docker:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
- image: integration-test-container
|
|
||||||
docker:
|
|
||||||
dockerfile: Dockerfile.test
|
|
||||||
deploy:
|
deploy:
|
||||||
helm:
|
helm:
|
||||||
releases:
|
releases:
|
||||||
@ -22,10 +19,39 @@ deploy:
|
|||||||
setValueTemplates:
|
setValueTemplates:
|
||||||
image.repository: "{{.IMAGE_REPO_ghcr_io_lerentis_bitwarden_crd_operator}}"
|
image.repository: "{{.IMAGE_REPO_ghcr_io_lerentis_bitwarden_crd_operator}}"
|
||||||
image.tag: "{{.IMAGE_TAG_ghcr_io_lerentis_bitwarden_crd_operator}}@{{.IMAGE_DIGEST_ghcr_io_lerentis_bitwarden_crd_operator}}"
|
image.tag: "{{.IMAGE_TAG_ghcr_io_lerentis_bitwarden_crd_operator}}@{{.IMAGE_DIGEST_ghcr_io_lerentis_bitwarden_crd_operator}}"
|
||||||
verify:
|
hooks:
|
||||||
- name: integration-test-container
|
after:
|
||||||
container:
|
- host:
|
||||||
name: integration-test-container
|
command:
|
||||||
image: "integration-test-container:a11852f8bb9bf99553238e1fa29206421c72801df5da96ccf9f77ebd069f815f"
|
- kubectl
|
||||||
executionMode:
|
- apply
|
||||||
kubernetesCluster: {}
|
- -f
|
||||||
|
- ./example*.yaml
|
||||||
|
- host:
|
||||||
|
command:
|
||||||
|
- sleep
|
||||||
|
- '5'
|
||||||
|
- host:
|
||||||
|
command:
|
||||||
|
- kubectl
|
||||||
|
- get
|
||||||
|
- secret
|
||||||
|
- test-regcred
|
||||||
|
- host:
|
||||||
|
command:
|
||||||
|
- kubectl
|
||||||
|
- get
|
||||||
|
- secret
|
||||||
|
- test-scope
|
||||||
|
- host:
|
||||||
|
command:
|
||||||
|
- kubectl
|
||||||
|
- get
|
||||||
|
- secret
|
||||||
|
- test-secret
|
||||||
|
- host:
|
||||||
|
command:
|
||||||
|
- kubectl
|
||||||
|
- get
|
||||||
|
- secret
|
||||||
|
- test-template
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
for f in /*.yaml
|
|
||||||
do
|
|
||||||
echo "applying $f ..."
|
|
||||||
kubectl apply -f "$f"
|
|
||||||
done
|
|
||||||
|
|
||||||
kubectl get secret test-regcred
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Could not find secret test-regcred"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
kubectl get secret test-scope
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Could not find secret test-scope"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
kubectl get secret test-secret
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Could not find secret test-secret"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
kubectl get secret test-template
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Could not find secret test-template"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
Loading…
Reference in New Issue
Block a user