-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: only migrate admin api and consumer api if in development mode * feat: add DatabaseMigrator * feat: add RunMigration config property * chore: add Rider run config * feat: add Dockerfile * ci: add database migrator to docker-compose.test.yml * feat: also migrate AdminApiDbContext * chore: add rolling update configuration to eventhandler deployment * feat: add databasemigrator to helm chart * ci: add database migrator to publish pipeline * ci: add database migrator to test pipeline * feat: implement rollback behavior * ci: make buildContainerImage script executable * ci: map config into database migrator * feat: update setup-postgres.sql * chore: remove unused using directive * refactor: change structure of files in helm folder * feat: remove CREATE TABLE permission from setup-sqlserver script * feat: don't set schema owners for sqlserver * chore: use default user (sa/postgres) in all modules for local development * ci: set environment variables with admin connection string for database-migrator * fix: base dockerfile on aspnet instead of runtime * fix: add name for all resources to values * ci: change dependencies in docker-compsoe files * feat: add special configmap for database migrator * feat: improve logging for Executor * chore: remove commented out code * feat: set default log level of DatabaseMigrator to Information * chore: explicitly set helm.sh/hook-delete-policy annotation for databasemigrator job * chore: remove redundant blank * ci: add missing condition in docker-compose.test.yml * ci: add health check for sqlserver docker compose service * ci: let seed-client depend on consumer-api health * ci: fix cyclic reference * ci: let consumer-api depend on database-migrator * refactor: fix duplicated log event names * ci: test * ci: test * ci: test * ci: change health check of sql server * ci: fix health check * fix: remove duplicated role in ALTER DEFAULT PRIVILEGES commands * ci: reduce sleep time for sqlserver start * ci: further reduce sleep time for sqlserver start * ci: reduce sleep * feat: update permissions in setup-sqlserver.sql script * ci: try to not update docker-compose * ci: remove debug statement * chore: only allow RunMigrations flag if environment is Development or Local --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
c0e45a6
commit ff91a68
Showing
40 changed files
with
1,010 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env node | ||
|
||
import { $ } from "zx"; | ||
import { getRequiredEnvVar } from "../lib.js"; | ||
|
||
const tag = getRequiredEnvVar("TAG"); | ||
|
||
const platforms = process.env.PLATFORMS ?? "linux/amd64,linux/arm64"; | ||
const push = process.env.PUSH === "1" ? ["--push", "--provenance=true", "--sbom=true"] : ""; | ||
|
||
await $`docker buildx build --file ./DatabaseMigrator/Dockerfile --tag ghcr.io/nmshd/backbone-database-migrator:${tag} --platform ${platforms} ${push} .`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,6 +161,45 @@ jobs: | |
TAG: ${{ steps.extract-version-from-git-tag.outputs.VERSION }} | ||
PUSH: 1 | ||
|
||
publish-database-migrator: | ||
name: Publish Database Migrator Container Image | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install script dependencies | ||
run: npm install --prefix ./.ci | ||
- name: Docker Login | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract version from git tag | ||
id: extract-version-from-git-tag | ||
run: echo "VERSION=$(./.ci/extractVersionFromGitTag.js)" >> $GITHUB_OUTPUT | ||
env: | ||
GIT_TAG: ${{ github.ref_name }} | ||
- name: Log in to Docker Hub for accessing the cloud builder | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.CLOUD_BUILDER_USERNAME }} | ||
password: ${{ secrets.CLOUD_BUILDER_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
version: "lab:latest" | ||
driver: cloud | ||
endpoint: "jssoft/js-soft" | ||
- name: Build and Push Container Image | ||
run: ./.ci/dbm/buildContainerImage.js | ||
env: | ||
TAG: ${{ steps.extract-version-from-git-tag.outputs.VERSION }} | ||
PUSH: 1 | ||
|
||
publish-helm-chart: | ||
name: Publish Helm Chart | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Backbone" type="com.intellij.execution.configurations.multilaunch" factoryName="MultiLaunchConfiguration"> | ||
<rows> | ||
<ExecutableRowSnapshot> | ||
<option name="condition"> | ||
<ConditionSnapshot> | ||
<option name="type" value="immediately"/> | ||
</ConditionSnapshot> | ||
</option> | ||
<option name="executable"> | ||
<ExecutableSnapshot> | ||
<option name="id" value="runConfig:Docker.docker-compose: Compose Deployment"/> | ||
</ExecutableSnapshot> | ||
</option> | ||
</ExecutableRowSnapshot> | ||
<ExecutableRowSnapshot> | ||
<option name="condition"> | ||
<ConditionSnapshot> | ||
<option name="type" value="immediately"/> | ||
</ConditionSnapshot> | ||
</option> | ||
<option name="executable"> | ||
<ExecutableSnapshot> | ||
<option name="id" value="runConfig:.NET Launch Settings Profile.AdminApi: Default"/> | ||
</ExecutableSnapshot> | ||
</option> | ||
</ExecutableRowSnapshot> | ||
<ExecutableRowSnapshot> | ||
<option name="condition"> | ||
<ConditionSnapshot> | ||
<option name="type" value="immediately"/> | ||
</ConditionSnapshot> | ||
</option> | ||
<option name="executable"> | ||
<ExecutableSnapshot> | ||
<option name="id" value="runConfig:.NET Launch Settings Profile.ConsumerApi: Default"/> | ||
</ExecutableSnapshot> | ||
</option> | ||
</ExecutableRowSnapshot> | ||
</rows> | ||
<method v="2"/> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.