forked from loic-sharma/BaGet
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
1,635 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,17 @@ jobs: | |
run: | | ||
export GITHUB_REF_NAME="${{ github.ref_name }}" | ||
export RELEASE_VERSION="${GITHUB_REF_NAME#v}" | ||
export RELEASE_MAJOR_VERSION="${RELEASE_VERSION%%.*}" | ||
export remaining_version="${RELEASE_VERSION#*.}" | ||
export RELEASE_MINOR_VERSION="${RELEASE_MAJOR_VERSION}.${remaining_version%%.*}" | ||
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_OUTPUT | ||
echo "RELEASE_MINOR_VERSION=$RELEASE_MINOR_VERSION" >> $GITHUB_OUTPUT | ||
echo "RELEASE_MAJOR_VERSION=$RELEASE_MAJOR_VERSION" >> $GITHUB_OUTPUT | ||
outputs: | ||
RELEASE_VERSION: ${{ steps.get-version-tag.outputs.RELEASE_VERSION }} | ||
RELEASE_MINOR_VERSION: ${{ steps.get-version-tag.outputs.RELEASE_MINOR_VERSION }} | ||
RELEASE_MAJOR_VERSION: ${{ steps.get-version-tag.outputs.RELEASE_MAJOR_VERSION }} | ||
|
||
verify: | ||
name: Run tests | ||
|
@@ -111,5 +119,28 @@ jobs: | |
tags: | | ||
bagetter/bagetter:latest | ||
bagetter/bagetter:${{ needs.version.outputs.RELEASE_VERSION }} | ||
bagetter/bagetter:${{ needs.version.outputs.RELEASE_MINOR_VERSION }} | ||
bagetter/bagetter:${{ needs.version.outputs.RELEASE_MAJOR_VERSION }} | ||
build-args: | | ||
Version=${{ needs.version.outputs.RELEASE_VERSION }} | ||
release_helm_chart: | ||
if: ${{ github.ref_type == 'tag' }} | ||
needs: [version, verify] | ||
name: Release Helm chart to GitHub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Update version in helm chart | ||
run: | | ||
sed -i "s/version: \".*\"/version: \"${{ needs.version.outputs.RELEASE_VERSION }}\"/" "deployment templates/chart/bagetter/Chart.yaml" | ||
sed -i "s/appVersion: \".*\"/appVersion: \"${{ needs.version.outputs.RELEASE_VERSION }}\"/" "deployment templates/chart/bagetter/Chart.yaml" | ||
- name: Generate helm docs | ||
uses: losisin/helm-docs-github-action@v1 | ||
with: | ||
chart-search-root: "deployment templates" | ||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "Release helm chart version ${{ needs.version.outputs.RELEASE_VERSION }}" | ||
file_pattern: 'deployment\ templates/chart/bagetter/Chart.yaml deployment\ templates/chart/bagetter/README.md' |
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 |
---|---|---|
|
@@ -274,3 +274,7 @@ __pycache__/ | |
**/bagetter.db-wal | ||
|
||
.vscode/ | ||
|
||
# Chart dependencies | ||
charts/ | ||
Chart.lock |
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,27 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ | ||
# OWNERS file for Kubernetes | ||
OWNERS | ||
# helm-docs templates | ||
*.gotmpl |
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,32 @@ | ||
apiVersion: v2 | ||
name: bagetter | ||
description: A Helm chart for BaGetter nuget package server | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "1.0.4" | ||
|
||
keywords: | ||
- nuget | ||
- baget | ||
- bagetter | ||
|
||
home: https://github.com/bagetter/BaGetter/tree/master/charts/BaGetter | ||
# icon: | ||
|
||
sources: | ||
- https://github.com/bagetter/BaGetter | ||
- https://hub.docker.com/r/bagetter/bagetter | ||
|
||
dependencies: | ||
- name: common | ||
repository: http://bjw-s.github.io/helm-charts/ | ||
version: 3.0.3 |
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,36 @@ | ||
# bagetter | ||
|
||
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.4](https://img.shields.io/badge/AppVersion-1.0.4-informational?style=flat-square) | ||
|
||
A Helm chart for BaGetter nuget package server | ||
|
||
**Homepage:** <https://github.com/bagetter/BaGetter/tree/master/charts/BaGetter> | ||
|
||
## Source Code | ||
|
||
* <https://github.com/bagetter/BaGetter> | ||
* <https://hub.docker.com/r/bagetter/bagetter> | ||
|
||
## Requirements | ||
|
||
| Repository | Name | Version | | ||
|------------|------|---------| | ||
| http://bjw-s.github.io/helm-charts/ | common | 3.0.3 | | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| configMaps | object | See below | environment variables. See more environment variables in the [BaGetter documentation](https://www.bagetter.com/docs/Installation/docker). | | ||
| configMaps.bagetter-env.data.ApiKey | string | `"ChangeMe"` | Set the Nuget API key | | ||
| configMaps.bagetter-env.data.Storage__Type | string | `"FileSystem"` | Set database and storage settings | | ||
| controllers | object | See values.yaml | Configures containers for the chart. | | ||
| controllers.bagetter.containers.bagetter.image.pullPolicy | string | `"IfNotPresent"` | image pull policy | | ||
| controllers.bagetter.containers.bagetter.image.repository | string | `"bagetter/bagetter"` | image repository | | ||
| controllers.bagetter.containers.bagetter.image.tag | string | `"latest"` | image tag | | ||
| ingress | object | See values.yaml | Enable and configure ingress settings for the chart under this key. | | ||
| persistence | object | See values.yaml | Configure persistence settings for the chart under this key. | | ||
| service | object | See values.yaml | Configures service settings for the chart. | | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) |
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,5 @@ | ||
--- | ||
{{- include "bjw-s.common.loader.init" . }} | ||
|
||
{{/* Render the templates */}} | ||
{{ include "bjw-s.common.loader.generate" . }} |
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,97 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/app-template-3.0.1/charts/other/app-template/values.schema.json | ||
|
||
# | ||
# IMPORTANT NOTE | ||
# | ||
# This chart inherits from the common library chart. You can check the default values/options here: | ||
# https://github.com/bjw-s/helm-charts/tree/main/charts/library/common/values.yaml | ||
# | ||
|
||
# -- environment variables. See more environment variables in the [BaGetter documentation](https://www.bagetter.com/docs/Installation/docker). | ||
# @default -- See below | ||
configMaps: | ||
bagetter-env: | ||
data: | ||
# -- Set the Nuget API key | ||
ApiKey: "ChangeMe" | ||
# -- Set database and storage settings | ||
Storage__Type: "FileSystem" | ||
Storage__Path: "/data" | ||
Database__Type: "Sqlite" | ||
Database__ConnectionString: "Data Source=/data/bagetter.db" | ||
# -- Additional settings. See [BaGetter configuration](https://www.bagetter.com/docs/configuration) | ||
#Mirror__Enabled: "true" | ||
#Mirror__PackageSource: "https://api.nuget.org/v3/index.json" | ||
#PackageDeletionBehavior: "HardDelete" | ||
|
||
# -- Configures containers for the chart. | ||
# @default -- See values.yaml | ||
controllers: | ||
bagetter: | ||
containers: | ||
bagetter: | ||
image: | ||
# -- image repository | ||
repository: bagetter/bagetter | ||
# -- image tag | ||
tag: latest | ||
# -- image pull policy | ||
pullPolicy: IfNotPresent | ||
envFrom: | ||
- configMapRef: | ||
name: bagetter-bagetter-env | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 256Mi | ||
limits: | ||
cpu: 500m | ||
memory: 512Mi | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: false | ||
# probes: # comming with v1.0.5 | ||
# liveness: | ||
# enabled: true | ||
# type: HTTP | ||
# path: /health | ||
# readiness: | ||
# enabled: true | ||
|
||
# -- Configures service settings for the chart. | ||
# @default -- See values.yaml | ||
service: | ||
bagetter-srv: | ||
controller: bagetter | ||
ports: | ||
http: | ||
port: 8080 | ||
|
||
# -- Enable and configure ingress settings for the chart under this key. | ||
# @default -- See values.yaml | ||
ingress: | ||
bagetter-ingress: | ||
enabled: false | ||
# className: "ingress-nginx" | ||
hosts: [] | ||
# - host: bagetter.mydomain.com | ||
# paths: | ||
# - path: / | ||
# service: | ||
# identifier: bagetter | ||
# port: 8080 | ||
|
||
# -- Configure persistence settings for the chart under this key. | ||
# @default -- See values.yaml | ||
persistence: | ||
bagetter-data: | ||
enabled: true | ||
accessMode: "ReadWriteOnce" | ||
size: "10Gi" | ||
globalMounts: | ||
- path: "/data" |
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,28 @@ | ||
# Use Tencent Cloud COS | ||
|
||
You can store packages to [Tencent Cloud Object Storage Service](https://cloud.tencent.com/document/product/436/6222). | ||
|
||
## Configure BaGetter | ||
|
||
You can modify BaGetter's configurations by editing the `appsettings.json` file. For the full list of configurations, please refer to [BaGetter's configuration](../configuration.md) guide. | ||
|
||
### Tencent Cloud Object Storage Service | ||
|
||
Update the `appsettings.json` file: | ||
|
||
```json | ||
{ | ||
... | ||
|
||
"Storage": { | ||
"Type": "TencentCos", | ||
"AppId": "", | ||
"SecretId": "", | ||
"SecretKey": "", | ||
"BucketName": "bagetter", | ||
"Region": "ap-guangzhou" | ||
}, | ||
|
||
... | ||
} | ||
``` |
Oops, something went wrong.