-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathcodeship-steps.yml
72 lines (72 loc) · 4.25 KB
/
codeship-steps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
- name: test app engine deployments
type: parallel
steps:
- name: test java app engine deployment
service: deployment-ansible
command: bash -c "CODESHIP_GOOGLE_APP_ENGINE_KEY_CONTENT="${GOOGLE_KEY_CONTENT_TEST_JAVA}" codeship_app_engine_deploy -d maven -f /deploy/test-app-engine-java -P codeship-deploy-test-java -c"
- name: test ruby app engine deployment
service: deployment-ansible
command: bash -c "CODESHIP_GOOGLE_APP_ENGINE_KEY_CONTENT="${GOOGLE_KEY_CONTENT_TEST_RUBY}" codeship_app_engine_deploy -f /deploy/test-app-engine-ruby -P codeship-deploy-test-ruby -c"
- name: python based deployment checks
type: serial
steps:
- name: test python app engine deployment
service: deployment-ansible
command: bash -c 'CODESHIP_GOOGLE_APP_ENGINE_KEY_CONTENT="${GOOGLE_KEY_CONTENT_TEST_PYTHON}" codeship_app_engine_deploy -f /deploy/test-app-engine-python -P codeship-deploy-test-py -c'
- name: test that a git repository can be reset with -C
service: deployment-ansible
command: bash -c 'cd /deploy/test-app-engine-python && git config --global user.email "you@example.com" && git config --global user.name "Your Name" && git init && git add . && git commit -m "foo" && echo "foo" > main.py && CODESHIP_GOOGLE_APP_ENGINE_KEY_CONTENT="${GOOGLE_KEY_CONTENT_TEST_PYTHON}" codeship_app_engine_deploy -f /deploy/test-app-engine-python -P codeship-deploy-test-py -c -C'
- name: negative test for a git repository reset where we dont reset but deploy garbage, which should fail the URL check
service: deployment-ansible
command: bash -c 'cd /deploy/test-app-engine-python && echo "foo" > main.py && ! CODESHIP_GOOGLE_APP_ENGINE_KEY_CONTENT="${GOOGLE_KEY_CONTENT_TEST_PYTHON}" codeship_app_engine_deploy -f /deploy/test-app-engine-python -P codeship-deploy-test-py -c'
- name: go based deployment checks
type: serial
steps:
- name: test go app engine deployment
service: deployment-ansible
command: bash -c 'CODESHIP_GOOGLE_APP_ENGINE_KEY_CONTENT="${GOOGLE_KEY_CONTENT_TEST_GO}" codeship_app_engine_deploy -f /deploy/test-app-engine-go -P codeship-deploy-test-go -c'
- name: negative test check URL not existin
service: deployment-ansible
command: bash -c '! CODESHIP_GOOGLE_APP_ENGINE_KEY_CONTENT="${GOOGLE_KEY_CONTENT_TEST_GO}" codeship_app_engine_deploy -f /deploy/test-app-engine-go -P codeship-deploy-test-go -c -u http://foo.bar.baz'
- name: test php app engine deployment
service: deployment-ansible
command: bash -c 'CODESHIP_GOOGLE_APP_ENGINE_KEY_CONTENT="${GOOGLE_KEY_CONTENT_TEST_PHP}" codeship_app_engine_deploy -f /deploy/test-app-engine-php -P codeship-deploy-test-php -c'
- name: negative test detects invalid JSON
service: deployment-ansible
command: bash -c '! CODESHIP_GOOGLE_APP_ENGINE_KEY_CONTENT="${GOOGLE_KEY_CONTENT_TEST_NO_JSON}" codeship_app_engine_deploy -f /deploy/test-app-engine-php -P codeship-deploy-test-php -c'
- name: test node app engine deployment
service: deployment-ansible
command: bash -c "CODESHIP_GOOGLE_APP_ENGINE_KEY_CONTENT="${GOOGLE_KEY_CONTENT_TEST_NODE}" codeship_app_engine_deploy -f /deploy/test-app-engine-node -P codeship-deploy-test-node -c"
- name: Test
type: parallel
steps:
- name: Test Deployment
service: deployment
command: /deploy/test/deploy_to_google.sh
- name: Test dockercfg Generator
type: serial
steps:
- name: Build
service: dockercfg-generator
command: /dev/null
- name: Test Push
service: dockercfg-test
type: push
image_name: gcr.io/key-airlock-160720/codeship-testing
registry: https://gcr.io
dockercfg_service: dockercfg-generator
- name: Deploy (to Docker Hub)
type: serial
tag: master
steps:
- name: Push Deployment
service: deployment
type: push
image_name: codeship/google-cloud-deployment
registry: https://index.docker.io/v1/
encrypted_dockercfg_path: dockercfg.encrypted
- name: Push dockercfg Generator
service: dockercfg-generator
type: push
image_name: codeship/gcr-dockercfg-generator
encrypted_dockercfg_path: dockercfg.encrypted