Skip to content

Commit

Permalink
Allow different namespaces in CI for fission-function and fission-bui…
Browse files Browse the repository at this point in the history
…lder (#2609)

* Add variables for function/builder namespace in the test
* Allow different namespaces in integration tests

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
  • Loading branch information
shubham-bansal96 and sanketsudake committed Nov 11, 2022
1 parent fa03716 commit 57d3a80
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/push_pr.yaml
Expand Up @@ -113,6 +113,7 @@ jobs:
kubectl port-forward svc/controller 8889:80 -nfission &
- name: Get fission version
timeout-minutes: 10
run: |
fission version
Expand All @@ -127,11 +128,13 @@ jobs:
command -v fission && fission support dump
- name: Kind export logs
timeout-minutes: 10
if: ${{ always() }}
run: |
kind export logs --name kind kind-logs
- name: Archive fission dump
timeout-minutes: 10
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v3
with:
Expand All @@ -140,6 +143,7 @@ jobs:
retention-days: 5

- name: Archive kind logs
timeout-minutes: 10
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
Expand Down
1 change: 1 addition & 0 deletions test/kind_CI.sh
Expand Up @@ -15,6 +15,7 @@ echo "source test_utils done"
dump_system_info

export FUNCTION_NAMESPACE=fission-function
export BUILDER_NAMESPACE=fission-builder
export FISSION_NAMESPACE=fission
export FISSION_ROUTER=127.0.0.1:8888
export NODE_RUNTIME_IMAGE=fission/node-env-14
Expand Down
2 changes: 1 addition & 1 deletion test/tests/test_annotations.sh
Expand Up @@ -14,7 +14,7 @@ mkdir -p $tmp_dir
ENV=python-${TEST_ID}
RESOURCE_NS=default # Change to test-specific namespace once we support namespaced CRDs
FUNCTION_NS=${FUNCTION_NAMESPACE:-fission-function}
BUILDER_NS=fission-builder
BUILDER_NS=${BUILDER_NAMESPACE:-fission-builder}
LIST_ANNOTATIONS=go-template='{{range $key,$value := .metadata.annotations}}{{$key}}: {{$value}}{{"\n"}}{{end}}'

# fs
Expand Down
2 changes: 1 addition & 1 deletion test/tests/test_env_vars.sh
Expand Up @@ -16,7 +16,7 @@ ENV=python-${TEST_ID}
FN=foo-${TEST_ID}
RESOURCE_NS=default # Change to test-specific namespace once we support namespaced CRDs
FUNCTION_NS=${FUNCTION_NAMESPACE:-fission-function}
BUILDER_NS=fission-builder
BUILDER_NS=${BUILDER_NAMESPACE:-fission-builder}

# fs
ENV_SPEC_FILE=${tmp_dir}/${ENV}.yaml
Expand Down
2 changes: 1 addition & 1 deletion test/utils.sh
Expand Up @@ -161,7 +161,7 @@ wait_for_builder() {
# wait for tiller ready
set +e
while true; do
kubectl --namespace fission-builder get pod -l envName=$env -o jsonpath="$JSONPATH" | grep "Ready=True"
kubectl --namespace $BUILDER_NAMESPACE get pod -l envName=$env -o jsonpath="$JSONPATH" | grep "Ready=True"
if [[ $? -eq 0 ]]; then
break
fi
Expand Down

0 comments on commit 57d3a80

Please sign in to comment.