generated from Greenstand/treetracker-microservice-template
-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (40 loc) · 1.66 KB
/
treetracker-api-test-tool-test-env.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
name: Test Tool for Test ENV
on:
workflow_dispatch:
inputs:
captureCount:
description: 'The count of capture'
required: true
funderId:
description: 'The funder id'
required: true
growerId:
description: 'The grower id'
required: true
subOrganizationId:
description: 'The sub organization id'
required: true
permissions: read-all
env:
project-directory: ./
jobs:
seed:
name: Generate data to DB
runs-on: ubuntu-latest
if: |
!contains(github.event.head_commit.message, 'skip-ci') &&
github.event_name == 'push' &&
github.repository == "Greenstand/${{ github.event.repository.name }}"
steps:
- name: Install doctl for kubernetes
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.TEST_DIGITALOCEAN_TOKEN }}
- name: Save DigitalOcean kubeconfig
run: doctl kubernetes cluster kubeconfig save ${{ secrets.TEST_CLUSTER_NAME }}
- name: List pods in microservice
run: kubectl -n ${{ secrets.K8S_NAMESPACE }} exec deployment/treetracker-earnings-api -- npm run seed-cli -- earnings --funder_id ${{ github.event.inputs.funderId}} -c ${{ github.event.inputs.captureCount}} -g ${{ github.event.inputs.growerId}} -s ${{github.event.inputs.subOrganizationId}}
# - name: Update kubernetes resources
# run: kustomize build deployment/overlays/development | kubectl apply -n ${{ secrets.K8S_NAMESPACE }} --wait -f -
# - name: Attempt to wait for migration job to complete
# run: kubectl wait -n ${{ secrets.K8S_NAMESPACE }} --for=condition=complete --timeout=45s job/database-migration-job