Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
676449c
Initial dev commit
matty Apr 24, 2025
22d5cd6
Add the native AOT dependencies
matty Apr 24, 2025
782ba62
Disable AOT + Dockerfile cleanup
matty Apr 24, 2025
b1d1ffe
Refactor services and improve logging.
matty Apr 30, 2025
31c1c83
Add TerraformRegistry.Tests project to Docker build context
matty Apr 30, 2025
1de2da6
Add middleware, services, tests, and Docker setup for Terraform Registry
matty Apr 30, 2025
21d9c28
Bug fixes and improvements
matty May 8, 2025
1854ee0
Fixes & adding tests
matty May 10, 2025
84b91d3
Code coverage tests
matty May 10, 2025
cd9fbee
Add configurable port
matty May 10, 2025
3040510
Update README.md and default port
matty May 10, 2025
6609d27
Add missing Azure account name to README
matty May 10, 2025
618661d
Run release only on code changes
matty May 10, 2025
fd23b77
Project cleanup
matty May 21, 2025
d7b9d09
Update serialization to use reflection based
matty May 29, 2025
0d95cd9
Fix service discovery for modules
matty May 29, 2025
40ea476
Fix module versions endpoint
matty May 29, 2025
fe8330b
Fix test to match changes to well-known endpoint
matty May 29, 2025
375db11
Add nuxtjs based frontend
matty Jun 1, 2025
6a3da78
Update README.md
matty Jun 7, 2025
08001c0
Fix README.md for Azure auth
matty Jun 7, 2025
7f45f56
Improve error handling
matty Aug 3, 2025
adf4d3e
Simplify build process
matty Aug 21, 2025
aad9031
Removed inmemory database for sqlite, added option to replace existin…
matty Aug 22, 2025
6efabbd
Frontend is updated with a new UI, OIDC support, API key management s…
matty Dec 7, 2025
cc876df
Fixes to Azure AD auth
matty Dec 8, 2025
0b0fa47
Update README.md for additional info for Azure AD
matty Dec 8, 2025
d7be482
Preparation for first release
matty Dec 20, 2025
346a143
Update README.md
matty Dec 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Build and Publish Docker Image

on:
push:
branches:
- main
- develop
- "release/**"
- "hotfix/**"
tags:
- "v*.*.*"
pull_request:
branches:
- main
- develop
workflow_dispatch:
inputs:
version:
description: "Optional version override"
required: false
type: string
push_image:
description: "Push image to GHCR"
required: false
default: false
type: boolean

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for GitVersion

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"

- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.x"

- name: Determine Version
id: set-version
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true

- name: Resolve Version
id: resolved-version
run: |
VERSION="${{ inputs.version }}"
if [ -z "$VERSION" ]; then
VERSION="${{ steps.set-version.outputs.semVer }}"
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "VERSION=$VERSION" >> "$GITHUB_ENV"

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_image)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the Docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_image) }}
tags: |
ghcr.io/${{ github.repository_owner }}/terraform-registry:${{ env.VERSION }}
${{ github.ref == 'refs/heads/main' && format('ghcr.io/{0}/terraform-registry:latest', github.repository_owner) || '' }}
${{ startsWith(github.ref, 'refs/heads/develop') && format('ghcr.io/{0}/terraform-registry:develop', github.repository_owner) || '' }}
${{ startsWith(github.ref, 'refs/heads/release/') && format('ghcr.io/{0}/terraform-registry:release', github.repository_owner) || '' }}
49 changes: 49 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Run Tests

on:
push:
branches:
- main
- develop
- "release/**"
- "hotfix/**"
pull_request:
branches:
- main
- develop
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.0.x"

- name: Restore dependencies
run: dotnet restore

- name: Build solution
run: dotnet build --no-restore --configuration Release

- name: Run tests with coverage
run: dotnet test TerraformRegistry.Tests/TerraformRegistry.Tests.csproj --no-build --configuration Release --logger "trx;LogFileName=test_results.trx" /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=./TestResults/coverage.cobertura.xml
env:
ASPNETCORE_ENVIRONMENT: Test

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: TerraformRegistry.Tests/TestResults/coverage.cobertura.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: TerraformRegistry.Tests/TestResults/coverage.cobertura.xml
token: ${{ secrets.CODECOV_TOKEN }} # Not required for public repos
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,24 @@ npm-debug.log
yarn-error.log

# End of https://www.toptal.com/developers/gitignore/api/dotnetcore,aspnetcore,dotenv,vuejs

# Created by https://www.toptal.com/developers/gitignore/api/nuxtjs
# Edit at https://www.toptal.com/developers/gitignore?templates=nuxtjs

### NuxtJS ###
# Generated dirs
dist
.nuxt
.nuxt-*
.output
.gen

# Node dependencies
node_modules

# System files
*.log

# End of https://www.toptal.com/developers/gitignore/api/nuxtjs

run-dev.ps1
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
WORKDIR /app


# Copy solution and project files
COPY terraform-registry.sln ./
COPY TerraformRegistry/TerraformRegistry.csproj TerraformRegistry/
COPY TerraformRegistry.API/TerraformRegistry.API.csproj TerraformRegistry.API/
COPY TerraformRegistry.AzureBlob/TerraformRegistry.AzureBlob.csproj TerraformRegistry.AzureBlob/
COPY TerraformRegistry.Models/TerraformRegistry.Models.csproj TerraformRegistry.Models/
COPY TerraformRegistry.PostgreSQL/TerraformRegistry.PostgreSQL.csproj TerraformRegistry.PostgreSQL/
COPY TerraformRegistry.Tests/TerraformRegistry.Tests.csproj TerraformRegistry.Tests/

# Restore using the solution file
RUN dotnet restore terraform-registry.sln

# Copy the rest of the source code
COPY . .

WORKDIR /app/TerraformRegistry
RUN dotnet build TerraformRegistry.csproj -c Release -o /app/build

FROM build AS publish
RUN dotnet publish TerraformRegistry.csproj -c Release -o /app/publish /p:UseAppHost=false

FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS final
WORKDIR /app
COPY --from=publish /app/publish .
# Create modules directory
RUN mkdir -p /app/modules
# Create web directory and copy static files
COPY TerraformRegistry/web /app/web
ENTRYPOINT ["dotnet", "TerraformRegistry.dll"]
25 changes: 25 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build-env
WORKDIR /app

# Copy csproj and restore dependencies
COPY ["TerraformRegistry/TerraformRegistry.csproj", "TerraformRegistry/"]
RUN dotnet restore "TerraformRegistry/TerraformRegistry.csproj"

# Copy everything else
COPY . ./

# Set up for development
WORKDIR /app/TerraformRegistry
EXPOSE 80
EXPOSE 443

# Create modules directory
RUN mkdir -p /app/modules

# Use environment variables for configuration
ENV ASPNETCORE_ENVIRONMENT=Development
ENV DOTNET_USE_POLLING_FILE_WATCHER=1
ENV ASPNETCORE_URLS=http://+:80;https://+:443

# Run in development mode with hot reload
ENTRYPOINT ["dotnet", "watch", "run", "--no-restore", "--urls", "http://+:80;https://+:443"]
26 changes: 26 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
mode: ContinuousDeployment
branches:
main:
tag: ""
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
develop:
tag: beta
increment: Minor
prevent-increment-of-merged-branch-version: false
track-merge-target: true
release:
tag: rc
increment: None
prevent-increment-of-merged-branch-version: true
hotfix:
tag: fix
increment: Patch
prevent-increment-of-merged-branch-version: false
feature:
tag: feature-{BranchName}
increment: Inherit
ignore:
sha: []
merge-message-formats: {}
Loading
Loading