CI/CD for Master Data
Automatic master data updates using GitHub Actions, etc.
Automating master data updates can reduce human error and speed up the development cycle.
Automation Flow
The general automation flow is as follows:
- Data Creation: Create master data using Excel, Google Sheets, CSV, etc.
- Conversion: Convert from spreadsheets to GS2 master data format (JSON).
- Commit: Commit the converted JSON or GS2-Deploy template to a Git repository.
- Deployment: CI tools (GitHub Actions, CircleCI, etc.) detect changes and reflect them in GS2.
Automating Deployment
Using GS2-Deploy
If you embed master data in a GS2-Deploy template, you can reflect changes by updating the GS2-Deploy stack from your CI.
Example for GitHub Actions:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: GS2 Deploy
run: |
# Use gs2-cli or similar to update the stack
gs2-cli deploy update-stack --stack-name master-data --template-file template.yaml
Using Export/Import of the Management Console
By calling the API to update the CurrentItemModelMaster of each microservice, you can reflect the contents of the JSON file.
Recommendations
- Test in a Verification Environment: Always deploy to a project/namespace for verification and confirm operation before reflecting changes in the production environment.
- Validation: We strongly recommend using scripts to check data consistency (ID duplication checks, existence checks for related resources, etc.) before deployment.