-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from BenjaminFourmaux/Doc-V1
Prepare Doc for V1
- Loading branch information
Showing
10 changed files
with
640 additions
and
113 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 |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#!/bin/bash | ||
|
||
# Usage | ||
# run this command at the root of the project | ||
|
||
# Welcome message | ||
echo "Pipeline build packages" | ||
|
||
# Get args | ||
if [ -z "$1" ]; then | ||
release_version="1.0.0" | ||
else | ||
release_version=$1 | ||
fi | ||
|
||
if [ -z "$2" ]; then | ||
build_dir="../.build" | ||
else | ||
build_dir=$2 | ||
fi | ||
|
||
if [ -z "$3" ]; then | ||
release_name="Helm-Registry" | ||
else | ||
release_name=$3 | ||
fi | ||
|
||
# Release prefix | ||
release_prefix="${release_name}-${release_version}" | ||
echo "Release prefix: ${release_prefix}" | ||
|
||
# Set location to the backend file | ||
cd backend | ||
|
||
# Build for Windows | ||
echo "Building for Windows..." | ||
GOOS=windows GOARCH=amd64 go build -o "${build_dir}/${release_prefix}_windows.exe" | ||
if [ $? -eq 0 ]; then | ||
echo "Build for Windows successful" | ||
echo "> Artifact build in ${build_dir}/${release_prefix}_windows.exe" | ||
else | ||
echo "Failed to build for Windows" | ||
exit 1 | ||
fi | ||
|
||
# Build for Linux | ||
echo "Building for Linux..." | ||
set CGO_ENABLED=1 | ||
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -o "${build_dir}/${release_name,,}" | ||
if [ $? -eq 0 ]; then | ||
echo "Build for Linux successful" | ||
echo "> Artifact build in ${build_dir}/${release_name,,}" | ||
|
||
# Zip | ||
tar -czvf "${build_dir}/${release_prefix}_linux.tar.gz" -C "${build_dir}" "${release_name,,}" | ||
else | ||
echo "Failed to build for Linux" | ||
exit 1 | ||
fi | ||
|
||
# Build for Docker | ||
echo "Building Docker image..." | ||
docker build -t "${release_name,,}:${release_version}" . | ||
if [ $? -eq 0 ]; then | ||
echo "Docker image build successful" | ||
|
||
# Save Docker image | ||
echo "Save Docker image..." | ||
docker save "${release_name,,}:${release_version}" -o "${build_dir}/${release_prefix}_docker.tar" | ||
|
||
if [ $? -eq 0 ]; then | ||
echo "Docker image saved" | ||
echo "> Artifact build in ${build_dir}/${release_prefix}_docker.tar" | ||
exit 0 | ||
else | ||
echo "Failed to save Docker image" | ||
exit 1 | ||
fi | ||
|
||
else | ||
echo "Failed to build Docker image" | ||
exit 1 | ||
fi | ||
|
||
echo "All builds completed successfully" |
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 |
---|---|---|
@@ -1 +1,8 @@ | ||
.idea | ||
# JetBrain IDE config | ||
.idea | ||
|
||
# Obsidia IDE config | ||
.obsidian | ||
|
||
# Build articfacts directory | ||
.build |
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 |
---|---|---|
@@ -1,7 +1,31 @@ | ||
# Changelog | ||
[![](https://badgen.net/github/tag/BenjaminFourmaux/{{repository.name}}?cache=600)]() [![](https://badgen.net/github/release/BenjaminFourmaux/{{repository.name}}?cache=600)]() [![](https://badgen.net/github/tags/BenjaminFourmaux/{{repository.name}})]() | ||
-- | ||
## V.1.0 - First one | ||
[![](https://badgen.net/github/tag/BenjaminFourmaux/Helm-Registry?cache=600)]() [![](https://badgen.net/github/release/BenjaminFourmaux/Helm-Registry?cache=600)]() [![](https://badgen.net/github/tags/BenjaminFourmaux/Helm-Registry)]() | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
--- | ||
|
||
## V.1.0 - Basics features requirement | ||
### Added | ||
### Changed | ||
### Removed | ||
- **Charts Discovery** | ||
- The Charts Directory is the Single Source of Truth (SSoT) ! | ||
- Implement Charts Directory Watcher, that listen when a action (create a file, remove file, modified file...) is dispense. | ||
- **API** | ||
- Endpoint `/`, the home page to get this registry informations (in YAML output format). | ||
- Endpoint `/index.yaml`, the index of charts in this registry. Is a Helm requirement. | ||
- Endpoint `/charts/`, bind with the Charts Directory. Able to get charts archives. | ||
- **Database** | ||
- SQLite Database to store registered Helm Charts and registry about the registry. | ||
- Database management class `Class/Database/Database/Database.go`. | ||
- Classes for `SELECT`, `INSERT`, `UPDATE` and `DELETE` queries. | ||
- Table `registry` which contains all informations about this registry (name, version, maintainer, tags...). | ||
- Table `charts` which contains all informations about all registered charts (in charts directory). | ||
- **Docker** | ||
- Dockerfile : For build a Docker image of the app. | ||
- Docker compose file : For deploying a registry container with compose. | ||
- **Env** | ||
- Manage env var | ||
- **Misc** | ||
- Get OS environment that run this app (Windows, Linux or Docker) and adapte the comportement |
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
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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