From 7967de66f9a36d9c30b5a14330bca5137a95d04f Mon Sep 17 00:00:00 2001 From: jjstratton Date: Thu, 10 Oct 2024 11:15:50 -0700 Subject: [PATCH 01/18] common images and pipelines --- .github/workflows/build-push-common.yml | 65 +++++++++++++++++++ .../workflows/build-push-commonconstants.yml | 65 +++++++++++++++++++ .github/workflows/build-push-commonmodels.yml | 65 +++++++++++++++++++ backend/Dockerfile.Common | 38 +++++++++++ backend/Dockerfile.CommonConstants | 37 +++++++++++ backend/Dockerfile.CommonModels | 37 +++++++++++ 6 files changed, 307 insertions(+) create mode 100644 .github/workflows/build-push-common.yml create mode 100644 .github/workflows/build-push-commonconstants.yml create mode 100644 .github/workflows/build-push-commonmodels.yml create mode 100644 backend/Dockerfile.Common create mode 100644 backend/Dockerfile.CommonConstants create mode 100644 backend/Dockerfile.CommonModels diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml new file mode 100644 index 00000000..ba0c180c --- /dev/null +++ b/.github/workflows/build-push-common.yml @@ -0,0 +1,65 @@ +name: diam-common + +on: + push: + branches: [jess-admin-tool] + paths: + - "backend/common/**" + - ".github/workflows/build-push-common.yml" + workflow_dispatch: +env: + IMAGE_NAME: common + WORKING_DIRECTORY: ./backend + BRANCH_NAME: develop + VALUES_FILE: dev + +jobs: + build: + runs-on: ubuntu-latest + + + if: github.event_name == 'push' + + steps: + - uses: actions/checkout@v4 + + - name: Set environment for branch + run: | + if [[ ${{ github.ref_name }} == 'main' ]]; then + echo "BRANCH_NAME=main" >> "$GITHUB_ENV" + echo "VALUES_FILE=prod" >> "$GITHUB_ENV" + fi + + if [[ ${{ github.ref_name }} == 'test' ]]; then + echo "BRANCH_NAME=test" >> "$GITHUB_ENV" + echo "VALUES_FILE=test" >> "$GITHUB_ENV" + fi + + if [[ ${{ github.ref_name }} == 'develop' ]]; then + echo "BRANCH_NAME=develop" >> "$GITHUB_ENV" + echo "VALUES_FILE=dev" >> "$GITHUB_ENV" + fi + + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + + - name: Branch name + run: echo running on branch ${GITHUB_REF##*/} + + - name: Login to Artifactory + uses: docker/login-action@v1 + with: + registry: artifacts.developer.gov.bc.ca + username: ${{ secrets.ARTIFACTORY_USERNAME }} + password: ${{ secrets.ARTIFACTORY_PASSWORD }} + + - name: Build Image + working-directory: ${{env.WORKING_DIRECTORY}} + run: | + docker build -t artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} -f Dockerfile.Common . + + - name: Docker Push to Artifactory + run: | + docker push artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} diff --git a/.github/workflows/build-push-commonconstants.yml b/.github/workflows/build-push-commonconstants.yml new file mode 100644 index 00000000..05f93671 --- /dev/null +++ b/.github/workflows/build-push-commonconstants.yml @@ -0,0 +1,65 @@ +name: diam-commonconstants + +on: + push: + branches: [jess-admin-tool] + paths: + - "backend/commonconstants/**" + - ".github/workflows/build-push-commonconstants.yml" + workflow_dispatch: +env: + IMAGE_NAME: commonconstants + WORKING_DIRECTORY: ./backend + BRANCH_NAME: develop + VALUES_FILE: dev + +jobs: + build: + runs-on: ubuntu-latest + + + if: github.event_name == 'push' + + steps: + - uses: actions/checkout@v4 + + - name: Set environment for branch + run: | + if [[ ${{ github.ref_name }} == 'main' ]]; then + echo "BRANCH_NAME=main" >> "$GITHUB_ENV" + echo "VALUES_FILE=prod" >> "$GITHUB_ENV" + fi + + if [[ ${{ github.ref_name }} == 'test' ]]; then + echo "BRANCH_NAME=test" >> "$GITHUB_ENV" + echo "VALUES_FILE=test" >> "$GITHUB_ENV" + fi + + if [[ ${{ github.ref_name }} == 'develop' ]]; then + echo "BRANCH_NAME=develop" >> "$GITHUB_ENV" + echo "VALUES_FILE=dev" >> "$GITHUB_ENV" + fi + + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + + - name: Branch name + run: echo running on branch ${GITHUB_REF##*/} + + - name: Login to Artifactory + uses: docker/login-action@v1 + with: + registry: artifacts.developer.gov.bc.ca + username: ${{ secrets.ARTIFACTORY_USERNAME }} + password: ${{ secrets.ARTIFACTORY_PASSWORD }} + + - name: Build Image + working-directory: ${{env.WORKING_DIRECTORY}} + run: | + docker build -t artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} -f Dockerfile.CommonConstants . + + - name: Docker Push to Artifactory + run: | + docker push artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} diff --git a/.github/workflows/build-push-commonmodels.yml b/.github/workflows/build-push-commonmodels.yml new file mode 100644 index 00000000..8bb1e9bd --- /dev/null +++ b/.github/workflows/build-push-commonmodels.yml @@ -0,0 +1,65 @@ +name: diam-commonmodels + +on: + push: + branches: [jess-admin-tool] + paths: + - "backend/commonmodels/**" + - ".github/workflows/build-push-commonmodels.yml" + workflow_dispatch: +env: + IMAGE_NAME: commonmodels + WORKING_DIRECTORY: ./backend + BRANCH_NAME: develop + VALUES_FILE: dev + +jobs: + build: + runs-on: ubuntu-latest + + + if: github.event_name == 'push' + + steps: + - uses: actions/checkout@v4 + + - name: Set environment for branch + run: | + if [[ ${{ github.ref_name }} == 'main' ]]; then + echo "BRANCH_NAME=main" >> "$GITHUB_ENV" + echo "VALUES_FILE=prod" >> "$GITHUB_ENV" + fi + + if [[ ${{ github.ref_name }} == 'test' ]]; then + echo "BRANCH_NAME=test" >> "$GITHUB_ENV" + echo "VALUES_FILE=test" >> "$GITHUB_ENV" + fi + + if [[ ${{ github.ref_name }} == 'develop' ]]; then + echo "BRANCH_NAME=develop" >> "$GITHUB_ENV" + echo "VALUES_FILE=dev" >> "$GITHUB_ENV" + fi + + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + + - name: Branch name + run: echo running on branch ${GITHUB_REF##*/} + + - name: Login to Artifactory + uses: docker/login-action@v1 + with: + registry: artifacts.developer.gov.bc.ca + username: ${{ secrets.ARTIFACTORY_USERNAME }} + password: ${{ secrets.ARTIFACTORY_PASSWORD }} + + - name: Build Image + working-directory: ${{env.WORKING_DIRECTORY}} + run: | + docker build -t artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} -f Dockerfile.CommonModels . + + - name: Docker Push to Artifactory + run: | + docker push artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} diff --git a/backend/Dockerfile.Common b/backend/Dockerfile.Common new file mode 100644 index 00000000..b907cb60 --- /dev/null +++ b/backend/Dockerfile.Common @@ -0,0 +1,38 @@ +#------------------------------------------------------------------------------------ +# WebAPI service Dockerfile +#------------------------------------------------------------------------------------ + + FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS base + WORKDIR /app + EXPOSE 8080 + ENV ASPNETCORE_URLS=http://*:8080 + ENV ASPNETCORE_ENVIRONMENT="Production" + ENV \ + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 + + RUN apk add --no-cache icu-libs + RUN apk add bash + + FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build + + WORKDIR /src + COPY ["common/Common.csproj", "common/Common.csproj"] + COPY ["CommonConstants/CommonConstants.csproj", "CommonConstants/CommonConstants.csproj"] + RUN dotnet restore -r linux-musl-x64 "common/Common.csproj" + COPY . . + RUN dotnet build -r linux-musl-x64 "common/Common.csproj" -c Release -o /app/build + + FROM build AS publish + RUN dotnet publish -r linux-musl-x64 "common/Common.csproj" -c Release -o /app/publish + USER root + + FROM base AS final + WORKDIR /app + COPY --from=publish /app/publish . + + USER 1001 + + ENTRYPOINT ["dotnet", "Common.dll"] + \ No newline at end of file diff --git a/backend/Dockerfile.CommonConstants b/backend/Dockerfile.CommonConstants new file mode 100644 index 00000000..6ba84ce8 --- /dev/null +++ b/backend/Dockerfile.CommonConstants @@ -0,0 +1,37 @@ +#------------------------------------------------------------------------------------ +# WebAPI service Dockerfile +#------------------------------------------------------------------------------------ + + FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS base + WORKDIR /app + EXPOSE 8080 + ENV ASPNETCORE_URLS=http://*:8080 + ENV ASPNETCORE_ENVIRONMENT="Production" + ENV \ + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 + + RUN apk add --no-cache icu-libs + RUN apk add bash + + FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build + + WORKDIR /src + COPY ["CommonConstants/CommonConstants.csproj", "CommonConstants/CommonConstants.csproj"] + RUN dotnet restore -r linux-musl-x64 "CommonConstants/CommonConstants.csproj" + COPY . . + RUN dotnet build -r linux-musl-x64 "CommonConstants/CommonConstants.csproj" -c Release -o /app/build + + FROM build AS publish + RUN dotnet publish -r linux-musl-x64 "CommonConstants/CommonConstants.csproj" -c Release -o /app/publish + USER root + + FROM base AS final + WORKDIR /app + COPY --from=publish /app/publish . + + USER 1001 + + ENTRYPOINT ["dotnet", "CommonConstants.dll"] + \ No newline at end of file diff --git a/backend/Dockerfile.CommonModels b/backend/Dockerfile.CommonModels new file mode 100644 index 00000000..f6afcae0 --- /dev/null +++ b/backend/Dockerfile.CommonModels @@ -0,0 +1,37 @@ +#------------------------------------------------------------------------------------ +# WebAPI service Dockerfile +#------------------------------------------------------------------------------------ + + FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS base + WORKDIR /app + EXPOSE 8080 + ENV ASPNETCORE_URLS=http://*:8080 + ENV ASPNETCORE_ENVIRONMENT="Production" + ENV \ + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 + + RUN apk add --no-cache icu-libs + RUN apk add bash + + FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build + + WORKDIR /src + COPY ["CommonModels/CommonModels.csproj", "CommonModels/CommonModels.csproj"] + RUN dotnet restore -r linux-musl-x64 "CommonModels/CommonModels.csproj" + COPY . . + RUN dotnet build -r linux-musl-x64 "CommonModels/CommonModels.csproj" -c Release -o /app/build + + FROM build AS publish + RUN dotnet publish -r linux-musl-x64 "CommonModels/CommonModels.csproj" -c Release -o /app/publish + USER root + + FROM base AS final + WORKDIR /app + COPY --from=publish /app/publish . + + USER 1001 + + ENTRYPOINT ["dotnet", "CommonModels.dll"] + \ No newline at end of file From 7fafdd4de27a623991db2ef2f9d58331755799ca Mon Sep 17 00:00:00 2001 From: jjstratton Date: Tue, 29 Oct 2024 14:32:40 -0700 Subject: [PATCH 02/18] dotnet build --- .github/workflows/build-push-common.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index ba0c180c..ee7cd538 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -60,6 +60,10 @@ jobs: run: | docker build -t artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} -f Dockerfile.Common . - - name: Docker Push to Artifactory + - name: Dotnet Pack run: | - docker push artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} + dotnet pack -c Release + + #- name: Docker Push to Artifactory + # run: | + # docker push artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} From 6831db7cfdd0e6a98b8053f48772c87c4b974795 Mon Sep 17 00:00:00 2001 From: jjstratton Date: Tue, 29 Oct 2024 14:32:57 -0700 Subject: [PATCH 03/18] dotnet --- .github/workflows/build-push-common.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index ee7cd538..db554aa5 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -54,16 +54,11 @@ jobs: registry: artifacts.developer.gov.bc.ca username: ${{ secrets.ARTIFACTORY_USERNAME }} password: ${{ secrets.ARTIFACTORY_PASSWORD }} - - - name: Build Image - working-directory: ${{env.WORKING_DIRECTORY}} - run: | - docker build -t artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} -f Dockerfile.Common . - + - name: Dotnet Pack run: | dotnet pack -c Release - + #- name: Docker Push to Artifactory # run: | # docker push artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} From 41f0bd68636856143b908b470d8658f7477bbc30 Mon Sep 17 00:00:00 2001 From: jjstratton Date: Tue, 29 Oct 2024 14:36:05 -0700 Subject: [PATCH 04/18] common --- .github/workflows/build-push-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index db554aa5..35e6ccd3 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -9,7 +9,7 @@ on: workflow_dispatch: env: IMAGE_NAME: common - WORKING_DIRECTORY: ./backend + WORKING_DIRECTORY: ./backend/common BRANCH_NAME: develop VALUES_FILE: dev From d39a7d1996e9bc1a11c05d21ec85517c5c246010 Mon Sep 17 00:00:00 2001 From: jjstratton Date: Tue, 29 Oct 2024 14:40:19 -0700 Subject: [PATCH 05/18] wd --- .github/workflows/build-push-common.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index 35e6ccd3..189d37b2 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -56,6 +56,7 @@ jobs: password: ${{ secrets.ARTIFACTORY_PASSWORD }} - name: Dotnet Pack + working-directory: ${{env.WORKING_DIRECTORY}} run: | dotnet pack -c Release From ff2f5cd939c8c4e57984d682687037e19a2032b0 Mon Sep 17 00:00:00 2001 From: jjstratton Date: Tue, 29 Oct 2024 14:56:03 -0700 Subject: [PATCH 06/18] dotnet build --- .github/workflows/build-push-common.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index 189d37b2..4c0c48a9 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -58,6 +58,7 @@ jobs: - name: Dotnet Pack working-directory: ${{env.WORKING_DIRECTORY}} run: | + dotnet build -c Release dotnet pack -c Release #- name: Docker Push to Artifactory From 738ef99e5de5c79c1778b268b530f7864dd65bfd Mon Sep 17 00:00:00 2001 From: jjstratton Date: Tue, 29 Oct 2024 15:01:06 -0700 Subject: [PATCH 07/18] push --- .github/workflows/build-push-common.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index 4c0c48a9..8fc21c41 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -60,7 +60,8 @@ jobs: run: | dotnet build -c Release dotnet pack -c Release + ls -lstra - #- name: Docker Push to Artifactory - # run: | - # docker push artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} + - name: Docker Push to Artifactory + run: | + nuget push bin/Release/Common.1.1.8.nupkg artifacts.developer.gov.bc.ca/de27-common From 6818b5ab015e9f414016b8efabd4c056366e2924 Mon Sep 17 00:00:00 2001 From: jjstratton Date: Tue, 29 Oct 2024 15:03:38 -0700 Subject: [PATCH 08/18] test --- .github/workflows/build-push-common.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index 8fc21c41..c571b0ef 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -63,5 +63,6 @@ jobs: ls -lstra - name: Docker Push to Artifactory + working-directory: ${{env.WORKING_DIRECTORY}}/bin/Release run: | - nuget push bin/Release/Common.1.1.8.nupkg artifacts.developer.gov.bc.ca/de27-common + nuget push Common.1.1.8.nupkg https://artifacts.developer.gov.bc.ca:443/artifactory/de27-common/ From 78213accd6a125a651fc2fa1db4af438f97ffae1 Mon Sep 17 00:00:00 2001 From: jjstratton Date: Tue, 29 Oct 2024 15:05:19 -0700 Subject: [PATCH 09/18] wd --- .github/workflows/build-push-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index c571b0ef..cc3b6557 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -63,6 +63,6 @@ jobs: ls -lstra - name: Docker Push to Artifactory - working-directory: ${{env.WORKING_DIRECTORY}}/bin/Release + working-directory: backend/common/bin/Release run: | nuget push Common.1.1.8.nupkg https://artifacts.developer.gov.bc.ca:443/artifactory/de27-common/ From e78d76828a651a095a2e262b37e82f1f24920c2b Mon Sep 17 00:00:00 2001 From: jjstratton Date: Tue, 29 Oct 2024 15:07:59 -0700 Subject: [PATCH 10/18] source --- .github/workflows/build-push-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index cc3b6557..4c0232b1 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -65,4 +65,4 @@ jobs: - name: Docker Push to Artifactory working-directory: backend/common/bin/Release run: | - nuget push Common.1.1.8.nupkg https://artifacts.developer.gov.bc.ca:443/artifactory/de27-common/ + nuget push Common.1.1.8.nupkg --Source https://artifacts.developer.gov.bc.ca:443/artifactory/de27-common/ From 276bef147e1935e7488f4208f81625587009f732 Mon Sep 17 00:00:00 2001 From: jjstratton Date: Tue, 29 Oct 2024 15:12:53 -0700 Subject: [PATCH 11/18] source --- .github/workflows/build-push-common.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index 4c0232b1..abfcb01c 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -65,4 +65,5 @@ jobs: - name: Docker Push to Artifactory working-directory: backend/common/bin/Release run: | - nuget push Common.1.1.8.nupkg --Source https://artifacts.developer.gov.bc.ca:443/artifactory/de27-common/ + nuget push Common.1.1.8.nupkg -Source https://artifacts.developer.gov.bc.ca:443/artifactory/de27-common + # nuget push Nuget.0.1.15.nupkg -Source http://arti.url/artifactory/api/nuget/nuget-repo-local/aFolder -apikey From 73bf794890d3808834f1fec20e8166777b7c58d9 Mon Sep 17 00:00:00 2001 From: jjstratton Date: Tue, 29 Oct 2024 15:15:06 -0700 Subject: [PATCH 12/18] apikey --- .github/workflows/build-push-common.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index abfcb01c..b6129651 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -65,5 +65,4 @@ jobs: - name: Docker Push to Artifactory working-directory: backend/common/bin/Release run: | - nuget push Common.1.1.8.nupkg -Source https://artifacts.developer.gov.bc.ca:443/artifactory/de27-common - # nuget push Nuget.0.1.15.nupkg -Source http://arti.url/artifactory/api/nuget/nuget-repo-local/aFolder -apikey + nuget push Common.1.1.8.nupkg -Source https://artifacts.developer.gov.bc.ca:443/artifactory/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} From 70f268efa9db14af70864ea8cffc2d510ae3680b Mon Sep 17 00:00:00 2001 From: jjstratton Date: Tue, 29 Oct 2024 15:22:39 -0700 Subject: [PATCH 13/18] url --- .github/workflows/build-push-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index b6129651..3ff9ca2b 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -65,4 +65,4 @@ jobs: - name: Docker Push to Artifactory working-directory: backend/common/bin/Release run: | - nuget push Common.1.1.8.nupkg -Source https://artifacts.developer.gov.bc.ca:443/artifactory/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} + nuget push Common.1.1.8.nupkg -Source https://artifacts.developer.gov.bc.ca/artifactory/api/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} From ead9cbc3605ad74278b1034ea0ff81ccf2feadda Mon Sep 17 00:00:00 2001 From: jjstratton Date: Wed, 30 Oct 2024 09:02:35 -0700 Subject: [PATCH 14/18] updated --- .github/workflows/build-push-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index 3ff9ca2b..e35bd73a 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -65,4 +65,4 @@ jobs: - name: Docker Push to Artifactory working-directory: backend/common/bin/Release run: | - nuget push Common.1.1.8.nupkg -Source https://artifacts.developer.gov.bc.ca/artifactory/api/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} + nuget push Common.1.1.8.nupkg -Source https://artifacts.developer.gov.bc.ca/artifactory/api/nuget/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} From cff63c33bc48d96d7f0cab7167564b4b442274d8 Mon Sep 17 00:00:00 2001 From: jjstratton Date: Wed, 30 Oct 2024 09:03:41 -0700 Subject: [PATCH 15/18] updated --- .../workflows/build-push-commonconstants.yml | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-push-commonconstants.yml b/.github/workflows/build-push-commonconstants.yml index 05f93671..7a99a5e9 100644 --- a/.github/workflows/build-push-commonconstants.yml +++ b/.github/workflows/build-push-commonconstants.yml @@ -1,15 +1,15 @@ -name: diam-commonconstants +name: diam-common on: push: branches: [jess-admin-tool] paths: - - "backend/commonconstants/**" + - "backend/CommonConstants/**" - ".github/workflows/build-push-commonconstants.yml" workflow_dispatch: env: - IMAGE_NAME: commonconstants - WORKING_DIRECTORY: ./backend + IMAGE_NAME: common + WORKING_DIRECTORY: ./backend/CommonConstants BRANCH_NAME: develop VALUES_FILE: dev @@ -54,12 +54,15 @@ jobs: registry: artifacts.developer.gov.bc.ca username: ${{ secrets.ARTIFACTORY_USERNAME }} password: ${{ secrets.ARTIFACTORY_PASSWORD }} - - - name: Build Image + + - name: Dotnet Pack working-directory: ${{env.WORKING_DIRECTORY}} run: | - docker build -t artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} -f Dockerfile.CommonConstants . - + dotnet build -c Release + dotnet pack -c Release + ls -lstra + - name: Docker Push to Artifactory + working-directory: backend/CommonConstants/bin/Release run: | - docker push artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} + nuget push CommonConstants.1.1.8.nupkg -Source https://artifacts.developer.gov.bc.ca/artifactory/api/nuget/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} From 9f474bb0783de2f0783a5e94492be31733aa96c0 Mon Sep 17 00:00:00 2001 From: jjstratton Date: Wed, 30 Oct 2024 09:06:54 -0700 Subject: [PATCH 16/18] updated --- .../workflows/build-push-commonconstants.yml | 2 +- .github/workflows/build-push-commonmodels.yml | 20 ++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-push-commonconstants.yml b/.github/workflows/build-push-commonconstants.yml index 7a99a5e9..eb7875e0 100644 --- a/.github/workflows/build-push-commonconstants.yml +++ b/.github/workflows/build-push-commonconstants.yml @@ -1,4 +1,4 @@ -name: diam-common +name: diam-common-constants on: push: diff --git a/.github/workflows/build-push-commonmodels.yml b/.github/workflows/build-push-commonmodels.yml index 8bb1e9bd..2c2d42eb 100644 --- a/.github/workflows/build-push-commonmodels.yml +++ b/.github/workflows/build-push-commonmodels.yml @@ -1,15 +1,14 @@ -name: diam-commonmodels +name: diam-common-models on: push: branches: [jess-admin-tool] paths: - - "backend/commonmodels/**" + - "backend/CommonModels/**" - ".github/workflows/build-push-commonmodels.yml" workflow_dispatch: env: - IMAGE_NAME: commonmodels - WORKING_DIRECTORY: ./backend + WORKING_DIRECTORY: ./backend/CommonModels BRANCH_NAME: develop VALUES_FILE: dev @@ -54,12 +53,15 @@ jobs: registry: artifacts.developer.gov.bc.ca username: ${{ secrets.ARTIFACTORY_USERNAME }} password: ${{ secrets.ARTIFACTORY_PASSWORD }} - - - name: Build Image + + - name: Dotnet Pack working-directory: ${{env.WORKING_DIRECTORY}} run: | - docker build -t artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} -f Dockerfile.CommonModels . - + dotnet build -c Release + dotnet pack -c Release + ls -lstra + - name: Docker Push to Artifactory + working-directory: backend/CommonModels/bin/Release run: | - docker push artifacts.developer.gov.bc.ca/de27-common/${{env.IMAGE_NAME}}:${GITHUB_REF##*/} + nuget push CommonModels.1.1.8.nupkg -Source https://artifacts.developer.gov.bc.ca/artifactory/api/nuget/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} From 0ebd13b134edcd087aad270c5b5ab8ed83b5282c Mon Sep 17 00:00:00 2001 From: jjstratton Date: Wed, 30 Oct 2024 09:10:53 -0700 Subject: [PATCH 17/18] trying out * --- .github/workflows/build-push-commonmodels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-commonmodels.yml b/.github/workflows/build-push-commonmodels.yml index 2c2d42eb..ddadbf32 100644 --- a/.github/workflows/build-push-commonmodels.yml +++ b/.github/workflows/build-push-commonmodels.yml @@ -64,4 +64,4 @@ jobs: - name: Docker Push to Artifactory working-directory: backend/CommonModels/bin/Release run: | - nuget push CommonModels.1.1.8.nupkg -Source https://artifacts.developer.gov.bc.ca/artifactory/api/nuget/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} + nuget push *.nupkg -Source https://artifacts.developer.gov.bc.ca/artifactory/api/nuget/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} From 474c6b5b7dc72ecbf378dd30d44fba2bbbb22294 Mon Sep 17 00:00:00 2001 From: jjstratton Date: Wed, 30 Oct 2024 09:21:46 -0700 Subject: [PATCH 18/18] updated common actions --- .github/workflows/build-push-common.yml | 4 ++-- .github/workflows/build-push-commonconstants.yml | 4 ++-- .github/workflows/build-push-commonmodels.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-push-common.yml b/.github/workflows/build-push-common.yml index e35bd73a..aac6727a 100644 --- a/.github/workflows/build-push-common.yml +++ b/.github/workflows/build-push-common.yml @@ -2,7 +2,7 @@ name: diam-common on: push: - branches: [jess-admin-tool] + branches: [develop] paths: - "backend/common/**" - ".github/workflows/build-push-common.yml" @@ -65,4 +65,4 @@ jobs: - name: Docker Push to Artifactory working-directory: backend/common/bin/Release run: | - nuget push Common.1.1.8.nupkg -Source https://artifacts.developer.gov.bc.ca/artifactory/api/nuget/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} + nuget push *.nupkg -Source https://artifacts.developer.gov.bc.ca/artifactory/api/nuget/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} diff --git a/.github/workflows/build-push-commonconstants.yml b/.github/workflows/build-push-commonconstants.yml index eb7875e0..e295e56a 100644 --- a/.github/workflows/build-push-commonconstants.yml +++ b/.github/workflows/build-push-commonconstants.yml @@ -2,7 +2,7 @@ name: diam-common-constants on: push: - branches: [jess-admin-tool] + branches: [develop] paths: - "backend/CommonConstants/**" - ".github/workflows/build-push-commonconstants.yml" @@ -65,4 +65,4 @@ jobs: - name: Docker Push to Artifactory working-directory: backend/CommonConstants/bin/Release run: | - nuget push CommonConstants.1.1.8.nupkg -Source https://artifacts.developer.gov.bc.ca/artifactory/api/nuget/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} + nuget push *.nupkg -Source https://artifacts.developer.gov.bc.ca/artifactory/api/nuget/de27-common -apikey ${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }} diff --git a/.github/workflows/build-push-commonmodels.yml b/.github/workflows/build-push-commonmodels.yml index ddadbf32..9ee8b659 100644 --- a/.github/workflows/build-push-commonmodels.yml +++ b/.github/workflows/build-push-commonmodels.yml @@ -2,7 +2,7 @@ name: diam-common-models on: push: - branches: [jess-admin-tool] + branches: [develop] paths: - "backend/CommonModels/**" - ".github/workflows/build-push-commonmodels.yml"