-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into minilcm-diff-apis
- Loading branch information
Showing
88 changed files
with
2,858 additions
and
464 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
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Develop FwHeadless CI/CD | ||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- 'backend/FwHeadless/**' | ||
- 'backend/FixFwData/**' | ||
- 'backend/FwLite/FwDataMiniLcmBridge/**' | ||
- 'backend/FwLite/LcmCrdt/**' | ||
- 'backend/FwLite/MiniLcm/**' | ||
- 'backend/FwLiteProjectSync/FwLiteProjectSync/**' | ||
- 'backend/LexCore/**' | ||
- 'backend/LexData/**' | ||
- '.github/workflows/lexbox-fw-headless.yaml' | ||
- '.github/workflows/deploy.yaml' | ||
- 'deployment/base/fw-headless-deployment.yaml' | ||
branches: | ||
- develop | ||
pull_request: | ||
paths: | ||
- 'backend/FwHeadless/**' | ||
- 'backend/FixFwData/**' | ||
- 'backend/FwLite/FwDataMiniLcmBridge/**' | ||
- 'backend/FwLite/LcmCrdt/**' | ||
- 'backend/FwLite/MiniLcm/**' | ||
- 'backend/FwLiteProjectSync/FwLiteProjectSync/**' | ||
- 'backend/LexCore/**' | ||
- 'backend/LexData/**' | ||
- '.github/workflows/lexbox-fw-headless.yaml' | ||
- '.github/workflows/deploy.yaml' | ||
- 'deployment/base/fw-headless-deployment.yaml' | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
set-version: | ||
name: Set Version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.setVersion.outputs.VERSION }} | ||
steps: | ||
- name: Set Version | ||
id: setVersion | ||
# set version to date in vYYYY-MM-DD-commitSha format | ||
run: | | ||
shortSha=$(echo ${{ github.sha }} | cut -c1-8) | ||
echo "VERSION=v$(date --rfc-3339=date)-$shortSha" >> ${GITHUB_OUTPUT} | ||
build-fw-headless: | ||
name: Build FwHeadless | ||
needs: set-version | ||
uses: ./.github/workflows/lexbox-fw-headless.yaml | ||
with: | ||
version: ${{ needs.set-version.outputs.version }} | ||
deploy-fw-headless: | ||
name: Deploy FwHeadless | ||
if: ${{github.ref == 'refs/heads/develop'}} | ||
needs: [ build-fw-headless, set-version ] | ||
uses: ./.github/workflows/deploy.yaml | ||
secrets: inherit | ||
with: | ||
version: ${{ needs.set-version.outputs.version }} | ||
image: 'ghcr.io/sillsdev/lexbox-fw-headless' | ||
k8s-environment: develop | ||
deploy-domain: lexbox.dev.languagetechnology.org | ||
|
||
# TODO: Run FwHeadless tests once we have developed them, but we don't need to run the whole integration test suite if only FwHeadless changes are being pushed | ||
# integration-test-gha: | ||
# name: GHA integration tests | ||
# needs: [build-fw-headless, set-version] | ||
# uses: ./.github/workflows/integration-test-gha.yaml | ||
# with: | ||
# lexbox-fw-headless-tag: ${{ needs.set-version.outputs.version }} |
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,99 @@ | ||
name: Build FwHeadless | ||
|
||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on | ||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: 'The version of the image to build' | ||
required: true | ||
type: string | ||
label-latest: | ||
description: 'The label to apply to the latest image' | ||
type: boolean | ||
default: false | ||
|
||
env: | ||
IMAGE_NAME: ghcr.io/sillsdev/lexbox-fw-headless | ||
|
||
|
||
jobs: | ||
publish-fw-headless: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
|
||
# postgres db is for automated tests | ||
# services: | ||
# postgres: | ||
# image: postgres:15-alpine | ||
# env: | ||
# POSTGRES_PASSWORD: 972b722e63f549938d07bd8c4ee5086c | ||
# POSTGRES_DB: lexbox-tests | ||
# # Set health checks to wait until postgres has started | ||
# options: >- | ||
# --health-cmd pg_isready | ||
# --health-interval 10s | ||
# --health-timeout 5s | ||
# --health-retries 5 | ||
# ports: | ||
# # Maps tcp port 5432 on service container to the host | ||
# - 5433:5432 | ||
|
||
env: | ||
# https://docs.docker.com/develop/develop-images/build_enhancements/ | ||
DOCKER_BUILDKIT: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '9.x' | ||
- name: Dotnet build | ||
run: dotnet build backend/FwHeadless/FwHeadless.csproj | ||
# TODO: Write FwHeadless unit tests, probably based on existing sync tests | ||
# - name: Unit tests | ||
# run: dotnet test backend/FwHeadless/FwHeadless.csproj --logger:"xunit;LogFileName={assembly}.results.xml" --results-directory ./test-results --filter "Category!=Integration&Category!=FlakyIntegration" --blame-hang-timeout 10m | ||
# - name: Publish unit test results | ||
# uses: EnricoMi/publish-unit-test-result-action@8885e273a4343cd7b48eaa72428dea0c3067ea98 # v2.14.0 | ||
# if: always() | ||
# with: | ||
# check_name: C# Unit Tests | ||
# files: ./test-results/*.xml | ||
# - name: Upload test results | ||
# if: always() | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: dotnet-unit-test-results | ||
# path: ./test-results | ||
|
||
- name: Docker meta | ||
id: meta | ||
if: ${{ !env.ACT }} | ||
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 | ||
with: | ||
images: ${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=raw,enable=${{ inputs.label-latest }},value=latest | ||
type=raw,value=${{ inputs.version }} | ||
- name: ghcr.io login | ||
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 | ||
if: ${{ !env.ACT }} | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 | ||
with: | ||
context: backend | ||
file: backend/FwHeadless/Dockerfile | ||
build-args: | | ||
APP_VERSION=${{ inputs.version }} | ||
push: ${{ !env.ACT && github.repository == 'sillsdev/languageforge-lexbox' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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.