Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pipeline #411

Merged
merged 3 commits into from
Aug 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 42 additions & 13 deletions hack/concourse/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -110,7 +139,7 @@ jobs:
put: gke
params: {path: gke, status: failure}

- name: test-searchlight-aws
- name: test-aws
plan:
- get: aws
version: every
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -222,7 +251,7 @@ jobs:
put: do
params: {path: do, status: failure}

- name: test-searchlight-kubespray
- name: test-kubespray
plan:
- get: kubespray
version: every
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion hack/concourse/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions hack/deploy/searchlight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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
Expand Down