1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-28 13:15:12 +01:00

[DEVOPS-1388] Dockerize the DB Migrator Utility (#2936)

* Remove unused workflow

* Add dockerfile for MsSqlMigratorUtility

* Change cmd

* Fix dockerfile param
This commit is contained in:
Michał Chęciński 2023-05-16 17:31:02 +02:00 committed by GitHub
parent 12f21b0c33
commit 0f09d46a3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 14 deletions

View File

@ -1,14 +0,0 @@
---
name: Build Migrator CLI
on:
workflow_dispatch:
jobs:
stub:
name: Stub
runs-on: ubuntu-22.04
steps:
- name: Stub
run: echo "Stub"

View File

@ -126,6 +126,9 @@ jobs:
- project_name: Scim - project_name: Scim
base_path: ./bitwarden_license/src base_path: ./bitwarden_license/src
dotnet: true dotnet: true
- project_name: MsSqlMigratorUtility
base_path: ./util
dotnet: true
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
@ -246,6 +249,10 @@ jobs:
base_path: ./src base_path: ./src
docker_repos: [bitwardenprod.azurecr.io, bitwardenqa.azurecr.io] docker_repos: [bitwardenprod.azurecr.io, bitwardenqa.azurecr.io]
dotnet: true dotnet: true
- project_name: MsSqlMigratorUtility
base_path: ./util
docker_repos: [bitwardenprod.azurecr.io, bitwardenqa.azurecr.io]
dotnet: true
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

View File

@ -0,0 +1,3 @@
*
!obj/build-output/publish/*
!obj/Docker/empty/

View File

@ -0,0 +1,8 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
LABEL com.bitwarden.product="bitwarden"
WORKDIR /app
COPY obj/build-output/publish .
CMD ["sh", "-c", "dotnet /app/MsSqlMigratorUtility.dll \"${MSSQL_CONN_STRING}\" -v"]