Skip to content

Commit

Permalink
fix: CI pipeline using GitHub actions
Browse files Browse the repository at this point in the history
Removed google cloud build in favour of actions. Add tests for helm
charts with this. Removes pulling from google cloud build which
is not documented anymore by actions.
  • Loading branch information
colinjfw committed Sep 21, 2019
1 parent adf2971 commit 7eddfb9
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 37 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: 'Test'
on: ['push']

jobs:

build:
runs-on: 'ubuntu-latest'

steps:
- uses: 'actions/checkout@v1'

- name: 'Docker Build'
run: 'docker build .'

deployment:
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout'
uses: 'actions/checkout@v1'

- name: 'Deploy Canary'
uses: 'deliverybot/helm@ci-v2'
with:
helm: helm3
token: '${{ github.token }}'
secrets: '${{ toJSON(secrets) }}'
chart: 'app'
namespace: production
release: production-myapp
version: '${{ github.sha }}'
track: canary
value-files: '["./tests/values.yml"]'
values: |
replicaCount: 1
image:
repository: nginx
tag: latest
env:
KUBECONFIG_FILE: '${{ secrets.KUBECONFIG }}'

- name: 'Deploy Production'
uses: 'deliverybot/helm@ci-v2'
with:
helm: helm3
token: '${{ github.token }}'
secrets: '${{ toJSON(secrets) }}'
chart: 'app'
namespace: production
release: production-myapp
version: '${{ github.sha }}'
track: stable
value-files: '["./tests/values.yml"]'
remove-canary: "true"
values: |
replicaCount: 5
image:
repository: nginx
tag: latest
env:
KUBECONFIG_FILE: '${{ secrets.KUBECONFIG }}'
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ inputs:
JSON encoded map.
runs:
using: docker
image: docker://gcr.io/deliverybot/helm:v1.0.0
image: Dockerfile
14 changes: 0 additions & 14 deletions cloudbuild.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions hack/get-tag.sh

This file was deleted.

4 changes: 0 additions & 4 deletions hack/update-version.sh

This file was deleted.

7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
"mustache": "^3.0.3"
},
"scripts": {
"release": "standard-version --commit-all"
},
"standard-version": {
"scripts": {
"postbump": "./hack/update-version.sh"
}
"release": "standard-version"
}
}
7 changes: 7 additions & 0 deletions tests/values.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
env:
- name: ENVIRONMENT
value: production

secrets:
- name: API_KEY
value: '${{ secrets.API_KEY }}'

0 comments on commit 7eddfb9

Please sign in to comment.