diff --git a/hack/concourse/pipeline.yml b/hack/concourse/pipeline.yml index f04806499..7983f8ae0 100644 --- a/hack/concourse/pipeline.yml +++ b/hack/concourse/pipeline.yml @@ -5,13 +5,26 @@ resource_types: repository: appscodeci/github-pr-resource tag: latest +- name: github-status + type: docker-image + source: + repository: dpb587/github-status-resource + tag: master + resources: -- name: searchlight +- name: master type: git source: uri: https://github.com/appscode/searchlight branch: master +- name: repo-status + type: github-status + source: + repository: appscode/searchlight + access_token: ((access_token)) + context: "concourse-ci" + - name: gke type: pull-request source: @@ -69,22 +82,38 @@ resources: versioned_file: appscode/creds.zip jobs: -- name: test-searchlight-master +- name: test-master plan: - - get: searchlight + - get: master trigger: true - get: creds params: unpack: true + - put: repo-status + params: + state: pending + commit: master - task: test-e2e privileged: true - file: searchlight/hack/concourse/task.yml + file: master/hack/concourse/task.yml + input_mapping: + searchlight: master params: ClusterProvider: digitalocean DOCKER_USER: ((docker_user)) DOCKER_PASS: ((docker_pass)) + on_success: + put: repo-status + params: + state: success + commit: master + on_failure: + put: repo-status + params: + state: failure + commit: master -- name: test-searchlight-gke +- name: test-gke plan: - get: gke trigger: true @@ -110,7 +139,7 @@ jobs: put: gke params: {path: gke, status: failure} -- name: test-searchlight-aws +- name: test-aws plan: - get: aws version: every @@ -120,7 +149,7 @@ jobs: - get: creds params: unpack: true - - task: test-aws-kops + - task: test-e2e privileged: true file: aws/hack/concourse/task.yml input_mapping: @@ -148,7 +177,7 @@ jobs: - get: creds params: unpack: true - - task: test-azure-aks + - task: test-e2e privileged: true file: azure-aks/hack/concourse/task.yml input_mapping: @@ -177,7 +206,7 @@ jobs: - get: creds params: unpack: true - - task: test-azure-acs + - task: test-e2e privileged: true file: azure-acs/hack/concourse/task.yml input_mapping: @@ -196,7 +225,7 @@ jobs: put: azure-acs params: {path: azure-acs, status: failure} -- name: test-searchlight-do +- name: test-do plan: - get: do version: every @@ -206,7 +235,7 @@ jobs: - get: creds params: unpack: true - - task: test-do + - task: test-e2e privileged: true file: do/hack/concourse/task.yml input_mapping: @@ -222,7 +251,7 @@ jobs: put: do params: {path: do, status: failure} -- name: test-searchlight-kubespray +- name: test-kubespray plan: - get: kubespray version: every @@ -232,7 +261,7 @@ jobs: - get: creds params: unpack: true - - task: test-kubespray + - task: test-e2e privileged: true file: kubespray/hack/concourse/task.yml input_mapping: diff --git a/hack/concourse/test.sh b/hack/concourse/test.sh index 95488910e..5cb91b66f 100755 --- a/hack/concourse/test.sh +++ b/hack/concourse/test.sh @@ -7,7 +7,7 @@ REPO_NAME=searchlight OPERATOR_NAME=searchlight APP_LABEL=searchlight #required for `kubectl describe deploy -n kube-system -l app=$APP_LABEL` -export APPSCODE_ENV=test-concourse +export APPSCODE_ENV=dev export DOCKER_REGISTRY=appscodeci # get concourse-common diff --git a/hack/deploy/searchlight.sh b/hack/deploy/searchlight.sh index fb60431b7..4cafb607d 100755 --- a/hack/deploy/searchlight.sh +++ b/hack/deploy/searchlight.sh @@ -19,9 +19,7 @@ function cleanup() { } export APPSCODE_ENV=${APPSCODE_ENV:-prod} -if [ "$APPSCODE_ENV" != "test-concourse" ]; then - trap cleanup EXIT -fi +trap cleanup EXIT # ref: https://github.com/appscodelabs/libbuild/blob/master/common/lib.sh#L55 inside_git_repo() { @@ -113,7 +111,7 @@ export SEARCHLIGHT_PURGE=0 export SEARCHLIGHT_ENABLE_STATUS_SUBRESOURCE=false export SCRIPT_LOCATION="curl -fsSL https://raw.githubusercontent.com/appscode/searchlight/7.0.0/" -if [[ "$APPSCODE_ENV" == "dev" || "$APPSCODE_ENV" == "test-concourse" ]]; then +if [[ "$APPSCODE_ENV" == "dev" ]]; then detect_tag export SCRIPT_LOCATION="cat " export SEARCHLIGHT_OPERATOR_TAG=$TAG