Skip to content

Commit

Permalink
Update fats
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Syer committed Feb 11, 2020
1 parent 8169b33 commit dbb7469
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fats.yaml
kind.yaml
1 change: 1 addition & 0 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -o nounset
set -o pipefail

export CLUSTER=${CLUSTER-kind}
export CLUSTER_NAME=${CLUSTER_NAME-fats}
export REGISTRY=${REGISTRY-docker-daemon}
export NAMESPACE=${NAMESPACE-fats}

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

set -o nounset

NAMESPACE=${NAMESPACE-fats}
export NAMESPACE=${NAMESPACE-fats}
export CLUSTER_NAME=${CLUSTER_NAME-fats}

# fetch FATS scripts
fats_dir=`dirname "${BASH_SOURCE[0]}"`/fats
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/fats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -o nounset
set -o pipefail

export CLUSTER=${CLUSTER-kind}
export CLUSTER_NAME=${CLUSTER_NAME-fats}
export REGISTRY=${REGISTRY-docker-daemon}
export NAMESPACE=${NAMESPACE-fats}

Expand All @@ -15,8 +16,8 @@ readonly slug=${version}-${git_timestamp}-${git_sha:0:16}

# fetch FATS scripts
fats_dir=`dirname "${BASH_SOURCE[0]}"`/fats
fats_repo="dsyer/fats"
fats_refspec=eb2963a # master as of 2019-11-07
fats_repo="projectriff/fats"
fats_refspec=6cf797ff # kind cluster changes
if [ ! -f ${fats_dir} ]; then
mkdir -p ${fats_dir}
curl -L https://github.com/${fats_repo}/archive/${fats_refspec}.tar.gz | \
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -o nounset
set -o pipefail

export CLUSTER=${CLUSTER-kind}
export CLUSTER_NAME=${CLUSTER_NAME-fats}
export REGISTRY=${REGISTRY-docker-daemon}
export NAMESPACE=${NAMESPACE-fats}

Expand Down Expand Up @@ -40,22 +41,22 @@ for test in simple enhanced petclinic config service; do
echo "##[endgroup]"
done

for test in simple enhanced petclinic server; do
for test in simple enhanced petclinic server secure; do
echo "##[group]Apply app $test"
kubectl apply \
-f <(kustomize build samples/${REGISTRY}/${test}) \
--dry-run --namespace ${NAMESPACE}
echo "##[endgroup]"
done

for test in simple enhanced petclinic server; do
for test in simple enhanced petclinic server secure; do
echo "##[group]Deploy app $test"
name=demo
if [ "${test}" == "petclinic" ] || [ "${test}" == "server" ]; then
name=${test}
fi
kapp deploy --wait-check-interval 2s --wait-timeout 30m -y -a $test \
-f <(kustomize build samples/${REGISTRY}/${test} | IMAGE=$(fats_image_repo ${name}) envsubst) \
&& kapp delete -y -a $test
-f <(kustomize build samples/${REGISTRY}/${test} | IMAGE=$(fats_image_repo ${name}) envsubst) \
&& kapp delete -y -a $test
echo "##[endgroup]"
done
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namePrefix: fats-
resources:
- ../../../../../layers/samples/secure
images:
- name: dsyer/demo
newName: ${IMAGE}
5 changes: 5 additions & 0 deletions .github/workflows/samples/dockerhub/secure/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namePrefix: fats-
resources:
- ../../../../../layers/samples/secure

0 comments on commit dbb7469

Please sign in to comment.