7 Commits

Author SHA1 Message Date
445b33f852 Fixed wrong path for dotnet test
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2024-03-21 23:15:55 -05:00
433a8d78a4 Temporarily removed deployment of Docker image
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2024-03-21 23:13:50 -05:00
fd2246391c Add sample pipeline for building API project 2024-03-21 23:12:23 -05:00
95ddb3236c Fixed issue with Web Docker image not getting proper environment variable substitution
As ReactJS does not seem to support reading environment variables from Docker runtime variables, we'll pull it instead from buildtime.
Also added copying of nginx config file in the Dockerfile
Modified API Dockerfile to accept WebUri for CORS, also removed duplicate setting of CORS in Program.cs
2024-03-21 21:01:58 -05:00
f1144d2cb9 Committing work for creating docker images of Web and API apps
Outstanding work include:
- Adding CI/CD workflow compatible with Woodpecker CI
- Figure out how to load runtime environment variables onto the API docker build process
2024-03-19 20:56:56 -05:00
0ca2a0e38c Added Dockerfile for API and Web apps 2023-03-29 22:56:42 -05:00
9b590bb4fa Moved projects to their own separate subdirectories 2023-03-27 21:48:25 -05:00
5 changed files with 7 additions and 80 deletions

6
.woodpecker.yaml Normal file
View File

@ -0,0 +1,6 @@
steps:
- name: BuildAPI
image: mcr.microsoft.com/dotnet/sdk:6.0
commands:
- dotnet build ./API
- dotnet test ./API

View File

@ -1,12 +0,0 @@
when:
- event: [push, pull_request, tag]
ref: [refs/tags/APIDEV-*, refs/tags/API-*, refs/heads/api/*]
steps:
- name: (YABA.API) Build and run tests
when:
- event: [push, pull_request, tag]
branch: [api/*]
image: mcr.microsoft.com/dotnet/sdk:6.0
commands:
- dotnet build ./API
- dotnet test ./API

View File

@ -1,34 +0,0 @@
when:
- event: tag
ref: [refs/tags/APIDEV-*, refs/tags/API-*]
steps:
- name: (YABA.API) Determining Docker image version number (dev)
when:
- ref: refs/tags/APIDEV-*
image: alpine:latest
commands:
- rm -f tags.txt
- echo ${CI_COMMIT_TAG} | sed -e "s/^APIDEV-//" >> tags.txt
- echo "latest-dev" >> tags.txt
- name: (YABA.API) Determining Docker image version number (prod)
image: alpine:latest
when:
- ref: refs/tags/API-*
commands:
- rm -f tags.txt
- echo ${CI_COMMIT_TAG} | sed -e "s/^API-//" >> tags.txt
- echo "latest" >> tags.txt
- name: (YABA.API) Package and Upload Docker Image
image: woodpeckerci/plugin-docker-buildx
settings:
repo: gitea.iwanaga.moe/cjtibule/yaba/api
context: ./API
dockerfile: ./API/YABA.API/Dockerfile
tags_file: tags.txt
username:
from_secret: gitea_yaba_registry_username
password:
from_secret: gitea_yaba_registry_password
registry: gitea.iwanaga.moe
depends_on:
- api_build

View File

@ -1,34 +0,0 @@
when:
- event: tag
ref: [refs/tags/WEBDEV-*, refs/tags/WEB-*]
steps:
- name: (YABA.Web) Determining Docker image version number (dev)
when:
- ref: refs/tags/WEBDEV-*
image: alpine:latest
commands:
- rm -f tags.txt
- echo ${CI_COMMIT_TAG} | sed -e "s/^WEBDEV-//" >> tags.txt
- echo "latest-dev" >> tags.txt
- name: (YABA.Web) Determining Docker image version number (prod)
when:
- ref: refs/tags/WEB-*
image: alpine:latest
commands:
- rm -f tags.txt
- echo ${CI_COMMIT_TAG} | sed -e "s/^WEB-//" >> tags.txt
- echo "latest" >> tags.txt
- name: (YABA.Web) Package and Upload Docker Image
image: woodpeckerci/plugin-docker-buildx
settings:
repo: gitea.iwanaga.moe/cjtibule/yaba/web
context: ./Web
dockerfile: ./Web/Dockerfile
tags_file: tags.txt
username:
from_secret: gitea_yaba_registry_username
password:
from_secret: gitea_yaba_registry_password
registry: gitea.iwanaga.moe
build_args:
from_secret: DEV1_BUILDARGS

View File

@ -1,5 +1,6 @@
server { server {
listen 80; listen 80;
server_name localhost;
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html; index index.html;
location / { location / {