diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d59468e9bad..d5476d01ddf 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -14,6 +14,9 @@ steps: queue: "workers" docker: "*" command: "make cover_integration_ci" + retry: + automatic: + limit: 1 plugins: - docker-compose#v3.0.0: run: integration-test-cassandra @@ -24,6 +27,9 @@ steps: queue: "workers" docker: "*" command: "make cover_integration_ci EVENTSV2=true" + retry: + automatic: + limit: 1 plugins: - docker-compose#v3.0.0: run: integration-test-cassandra @@ -34,6 +40,9 @@ steps: queue: "workers" docker: "*" command: "make cover_xdc_ci" + retry: + automatic: + limit: 1 plugins: - docker-compose#v3.0.0: run: integration-test-xdc-cassandra @@ -44,6 +53,9 @@ steps: queue: "workers" docker: "*" command: "make cover_integration_ci" + retry: + automatic: + limit: 1 plugins: - docker-compose#v3.0.0: run: integration-test-mysql @@ -54,6 +66,9 @@ steps: queue: "workers" docker: "*" command: "make cover_integration_ci EVENTSV2=true" + retry: + automatic: + limit: 1 plugins: - docker-compose#v3.0.0: run: integration-test-mysql @@ -64,9 +79,25 @@ steps: queue: "workers" docker: "*" command: "make cover_xdc_ci" + retry: + automatic: + limit: 1 plugins: - docker-compose#v3.0.0: run: integration-test-xdc-mysql config: docker/buildkite/docker-compose.yml - - wait \ No newline at end of file + - wait + + - label: ":docker: build and push master" + agents: + queue: "workers" + docker: "*" + command: "scripts/buildkite/docker-push.sh" + retry: + automatic: + limit: 1 + plugins: + - docker-login#v2.0.1: + username: ubercadence + password-env: DOCKER_LOGIN_PASSWORD \ No newline at end of file diff --git a/host/elasticsearch_test.go b/host/elasticsearch_test.go index ef0a1bb03e5..2ada428a698 100644 --- a/host/elasticsearch_test.go +++ b/host/elasticsearch_test.go @@ -25,6 +25,7 @@ package host import ( "bytes" + "context" "encoding/json" "flag" "fmt" @@ -181,8 +182,8 @@ func (s *elasticsearchIntegrationSuite) TestListWorkflow_SearchAttribute() { s.testHelperForReadOnce(we.GetRunId(), query, false) } -/* func (s *elasticsearchIntegrationSuite) TestListWorkflow_PageToken() { + s.T().Skip("fixme: flaky test") id := "es-integration-list-workflow-token-test" wt := "es-integration-list-workflow-token-test-type" tl := "es-integration-list-workflow-token-test-tasklist" @@ -193,10 +194,9 @@ func (s *elasticsearchIntegrationSuite) TestListWorkflow_PageToken() { s.testListWorkflowHelper(numOfWorkflows, pageSize, request, id, wt, false) } -*/ -/* func (s *elasticsearchIntegrationSuite) TestListWorkflow_SearchAfter() { + s.T().Skip("fixme: flaky test") id := "es-integration-list-workflow-searchAfter-test" wt := "es-integration-list-workflow-searchAfter-test-type" tl := "es-integration-list-workflow-searchAfter-test-tasklist" @@ -207,7 +207,6 @@ func (s *elasticsearchIntegrationSuite) TestListWorkflow_SearchAfter() { s.testListWorkflowHelper(numOfWorkflows, pageSize, request, id, wt, false) } -*/ func (s *elasticsearchIntegrationSuite) TestListWorkflow_OrQuery() { id := "es-integration-list-workflow-or-query-test" @@ -314,9 +313,9 @@ func (s *elasticsearchIntegrationSuite) TestListWorkflow_OrQuery() { s.Equal(3, searchVal) } -/* // To test last page search trigger max window size error func (s *elasticsearchIntegrationSuite) TestListWorkflow_MaxWindowSize() { + s.T().Skip("fixme: flaky test") // set es index index settings indexName := s.testClusterConfig.ESConfig.Indices[common.VisibilityAppName] _, err := s.esClient.IndexPutSettings(indexName). @@ -370,7 +369,6 @@ func (s *elasticsearchIntegrationSuite) TestListWorkflow_MaxWindowSize() { Do(context.Background()) s.NoError(err) } -*/ func (s *elasticsearchIntegrationSuite) TestListWorkflow_OrderBy() { id := "es-integration-list-workflow-order-by-test" diff --git a/scripts/buildkite/docker-push.sh b/scripts/buildkite/docker-push.sh new file mode 100755 index 00000000000..b1496f9d91a --- /dev/null +++ b/scripts/buildkite/docker-push.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -ex + +# if current branch is not master, this PR is not merged to master yet +if [ "$BUILDKITE_BRANCH" != "master" ]; then + echo "Skipping docker-push since this change is not in master yet" + exit 0 +fi + +MASTER_SHA=$(git rev-parse origin/master) + +# if this commit is not the same as tip of master, lets skip this and +# let the commit at tip of master do the push +if [ "$BUILDKITE_COMMIT" != "$MASTER_SHA" ]; then + echo "Skipping docker-push for this commit since tip of master is already ahead" + exit 0 +fi + +cd docker + +echo "Building docker image for $BUILDKITE_MESSAGE" + +docker build . -f Dockerfile -t ubercadence/server:master --build-arg git_branch=$BUILDKITE_COMMIT +docker push ubercadence/server:master + +docker build . -f Dockerfile-cli -t ubercadence/cli:master --build-arg git_branch=$BUILDKITE_COMMIT +docker push ubercadence/cli:master