Skip to content

Commit

Permalink
Use concourse scripts from libbuild (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
tahsinrahman authored and tamalsaha committed Aug 18, 2018
1 parent 02a2f9b commit a53816a
Show file tree
Hide file tree
Showing 3 changed files with 232 additions and 108 deletions.
229 changes: 212 additions & 17 deletions hack/concourse/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resource_types:
- name: pull-request
type: docker-image
source:
repository: tahsin/git-pull-resource
repository: appscodeci/github-pr-resource
tag: latest

resources:
Expand All @@ -12,45 +12,240 @@ resources:
uri: https://github.com/appscode/searchlight
branch: master

- name: pull-request
- name: gke
type: pull-request
source:
owner: appscode
repo: searchlight
label: ok-to-test/gke
access_token: ((access_token))

- name: aws
type: pull-request
source:
owner: appscode
repo: searchlight
label: ok-to-test/kops-aws
access_token: ((access_token))

- name: azure-aks
type: pull-request
source:
owner: appscode
repo: searchlight
label: ok-to-test/aks
access_token: ((access_token))

- name: azure-acs
type: pull-request
source:
owner: appscode
repo: searchlight
label: ok-to-test/acs
access_token: ((access_token))

- name: do
type: pull-request
source:
owner: appscode
repo: searchlight
label: ok-to-test/do
access_token: ((access_token))

- name: kubespray
type: pull-request
source:
owner: appscode
repo: searchlight
label: ok-to-test
label: ok-to-test/kubespray
access_token: ((access_token))

- name: creds
type: s3
source:
bucket: appscode-ci
access_key_id: ((s3-access-key))
secret_access_key: ((s3-secret))
versioned_file: appscode/creds.zip

jobs:
- name: test-searchlight
- name: test-searchlight-master
plan:
- get: searchlight
trigger: true
- get: creds
params:
unpack: true
- task: test-e2e
privileged: true
file: searchlight/hack/concourse/task.yml
params:
TOKEN: ((digitaloceanToken))
ClusterProvider: digitalocean
DOCKER_USER: ((docker_user))
DOCKER_PASS: ((docker_pass))

- name: test-searchlight-pr
- name: test-searchlight-gke
plan:
- get: pull-request
- get: gke
trigger: true
- put: pull-request
params: { path: pull-request, status: pending}
- task: run-e2e-test
version: every
- put: gke
params: { path: gke, status: pending}
- get: creds
params:
unpack: true
- task: test-e2e
privileged: true
file: pull-request/hack/concourse/task.yml
file: gke/hack/concourse/task.yml
input_mapping:
searchlight: pull-request
searchlight: gke
params:
TOKEN: ((digitaloceanToken))
ClusterProvider: gke
DOCKER_USER: ((docker_user))
DOCKER_PASS: ((docker_pass))
on_success:
put: gke
params: { path: gke, status: success}
on_failure:
put: pull-request
params: {path: pull-request, status: failure}
put: gke
params: {path: gke, status: failure}

- name: test-searchlight-aws
plan:
- get: aws
version: every
trigger: true
- put: aws
params: { path: aws, status: pending}
- get: creds
params:
unpack: true
- task: test-aws-kops
privileged: true
file: aws/hack/concourse/task.yml
input_mapping:
searchlight: aws
params:
KOPS_AWS_ACCESS_KEY_ID: ((kops_aws_access_key_id))
KOPS_AWS_SECRET_ACCESS_KEY: ((kops_aws_secret_access_key))
ClusterProvider: aws
DOCKER_USER: ((docker_user))
DOCKER_PASS: ((docker_pass))
on_success:
put: pull-request
params: { path: pull-request, status: success}
put: aws
params: { path: aws, status: success}
on_failure:
put: aws
params: {path: aws, status: failure}

- name: test-azure-aks
plan:
- get: azure-aks
version: every
trigger: true
- put: azure-aks
params: { path: azure-aks, status: pending}
- get: creds
params:
unpack: true
- task: test-azure-aks
privileged: true
file: azure-aks/hack/concourse/task.yml
input_mapping:
searchlight: azure-aks
params:
ClusterProvider: aks
APP_ID: ((azure_app_id))
TENANT_ID: ((azure_tenant_id))
PASSWORD: ((azure_password))
DOCKER_USER: ((docker_user))
DOCKER_PASS: ((docker_pass))
on_success:
put: azure-aks
params: { path: azure-aks, status: success}
on_failure:
put: azure-aks
params: {path: azure-aks, status: failure}

- name: test-azure-acs
plan:
- get: azure-acs
version: every
trigger: true
- put: azure-acs
params: { path: azure-acs, status: pending}
- get: creds
params:
unpack: true
- task: test-azure-acs
privileged: true
file: azure-acs/hack/concourse/task.yml
input_mapping:
searchlight: azure-acs
params:
ClusterProvider: acs
APP_ID: ((azure_app_id))
TENANT_ID: ((azure_tenant_id))
PASSWORD: ((azure_password))
DOCKER_USER: ((docker_user))
DOCKER_PASS: ((docker_pass))
on_success:
put: azure-acs
params: { path: azure-acs, status: success}
on_failure:
put: azure-acs
params: {path: azure-acs, status: failure}

- name: test-searchlight-do
plan:
- get: do
version: every
trigger: true
- put: do
params: { path: do, status: pending}
- get: creds
params:
unpack: true
- task: test-do
privileged: true
file: do/hack/concourse/task.yml
input_mapping:
searchlight: do
params:
ClusterProvider: digitalocean
DOCKER_USER: ((docker_user))
DOCKER_PASS: ((docker_pass))
on_success:
put: do
params: { path: do, status: success}
on_failure:
put: do
params: {path: do, status: failure}

- name: test-searchlight-kubespray
plan:
- get: kubespray
version: every
trigger: true
- put: kubespray
params: { path: kubespray, status: pending}
- get: creds
params:
unpack: true
- task: test-kubespray
privileged: true
file: kubespray/hack/concourse/task.yml
input_mapping:
searchlight: kubespray
params:
DOCKER_USER: ((docker_user))
DOCKER_PASS: ((docker_pass))
ClusterProvider: kubespray
PACKET_API_TOKEN: ((packet_api_token))
PACKET_PROJECT_ID: ((packet_project_id))
on_success:
put: kubespray
params: { path: kubespray, status: success}
on_failure:
put: kubespray
params: {path: kubespray, status: failure}
3 changes: 2 additions & 1 deletion hack/concourse/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ platform: linux
image_resource:
type: docker-image
source:
repository: 1gtm/kubedb
repository: appscodeci/dind
tag: latest

inputs:
- name: searchlight
- name: creds

run:
path: searchlight/hack/concourse/test.sh
Loading

0 comments on commit a53816a

Please sign in to comment.