Skip to content

Commit

Permalink
Check fission CLI & server git commit SHA before test (#1200)
Browse files Browse the repository at this point in the history
Check fission CLI & server git commit SHA before test 
to make sure we test against with the same commit.
  • Loading branch information
life1347 committed Jun 3, 2019
1 parent a3fd606 commit 4c4bb1b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,6 +1,7 @@
# Binaries
cmd/fission-bundle/fission-bundle
cmd/fission-cli/fission
cmd/fission-cli/fission-cli
cmd/fetcher/fetcher
cmd/builder/builder
cmd/preupgradechecks/pre-upgrade-checks
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -40,7 +40,6 @@ before_script:
- hack/verify-gofmt.sh
- hack/verify-govet.sh
- helm lint charts/fission-all/ charts/fission-core/
- go build -o cmd/fission-cli/fission ./cmd/fission-cli/
- hack/runtests.sh

script:
Expand Down
Binary file removed preupgradechecks/pre-upgrade-checks
Binary file not shown.
9 changes: 5 additions & 4 deletions test/test_utils.sh
Expand Up @@ -137,7 +137,7 @@ build_and_push_env_builder() {
build_fission_cli() {
travis_fold_start build_fission_cli "fission cli"
pushd $ROOT/cmd/fission-cli
go build .
go build -ldflags "-X github.com/fission/fission/pkg/info.GitCommit=$(getGitCommit) -X github.com/fission/fission/pkg/info.BuildDate=$(getDate) -X github.com/fission/fission/pkg/info.Version=$(getVersion)" -o $HOME/tool/fission .
popd
travis_fold_end build_fission_cli
}
Expand All @@ -153,9 +153,6 @@ set_environment() {
export FISSION_URL=http://$(kubectl -n $ns get svc controller -o jsonpath='{...ip}')
export FISSION_ROUTER=$(kubectl -n $ns get svc router -o jsonpath='{...ip}')
export FISSION_NATS_STREAMING_URL="http://defaultFissionAuthToken@$(kubectl -n $ns get svc nats-streaming -o jsonpath='{...ip}:{.spec.ports[0].port}')"

# set path to include cli
export PATH=$ROOT/cmd/fission-cli:$PATH
}

generate_test_id() {
Expand Down Expand Up @@ -543,6 +540,10 @@ install_and_test() {

wait_for_services $id
set_environment $id

# ensure we run tests against with the same git commit version of CLI & server
fission --version|grep "gitcommit"|tr -d ' '|uniq -c|grep "2 gitcommit"

run_all_tests $id

dump_logs $id
Expand Down

0 comments on commit 4c4bb1b

Please sign in to comment.