Skip to content

Commit

Permalink
doc(CI) exemple update
Browse files Browse the repository at this point in the history
  • Loading branch information
loan-mgt committed Jan 27, 2024
1 parent 95d262a commit 9777968
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,28 @@ stages:
- validate

variables:
DUM_FLYWAY_VALIDATE_VERSION: "v0.2.5"
MIGRATION_DIR: "path/to/migrations"
BRANCH_TO_COMPARE: "origin/your-branch"
MIGRATION_DIR: "<path/to/migration/directory>"
BRANCH_TO_COMPARE: "origin/main"

# for MR integration
GITLAB_URL: "https://<your-gitlab-url>/api"
GITLAB_TOKEN: $<access-token>


validate:
stage: validate
image: alpine:latest
image:
name: ghcr.io/loan-mgt/dum-flyway-validate:latest
entrypoint: [""]
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: on_success
script:
- apk --update add curl git
- curl -LO https://github.com/loan-mgt/dum-flyway-validate/releases/download/$DUM_FLYWAY_VALIDATE_VERSION/dum-flyway-validate
- chmod +x dum-flyway-validate
- git config --global --add safe.directory $(pwd)
- git fetch origin
- ./dum-flyway-validate --migration-dir $MIGRATION_DIR --branch $BRANCH_TO_COMPARE --integration
- dum-flyway-validate --migration-dir $MIGRATION_DIR --branch $BRANCH_TO_COMPARE..HEAD --integration
```

## Contributing
Expand Down

0 comments on commit 9777968

Please sign in to comment.