Skip to content

Commit

Permalink
Merge pull request #30 from truenas/test-app
Browse files Browse the repository at this point in the history
Test app
  • Loading branch information
sonicaj authored Jun 22, 2024
2 parents eb03e6b + 8fd898e commit 56749a0
Show file tree
Hide file tree
Showing 14 changed files with 147 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/dev_apps_validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: dev_catalog_validation

on:
push:
workflow_dispatch:

jobs:
ix-dev-validate:
runs-on: ubuntu-latest

container:
image: ghcr.io/truenas/apps_validation:latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Adding git directory to safe path
run: git config --global --add safe.directory "$(pwd)"
- name: Fetch base branch history
run: git fetch -u origin master:master
- name: validate dev catalog
run: /bin/bash -c "/usr/local/bin/apps_dev_charts_validate validate --path $(pwd)"
40 changes: 40 additions & 0 deletions .github/workflows/update_catalog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: catalog_update

on:
push:
branches:
- 'master'
workflow_dispatch:

jobs:
validate:
runs-on: ubuntu-latest

container:
image: ghcr.io/truenas/apps_validation:latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add catalog json as a safe directory
run: |
/bin/bash -c "PWD=${pwd}; git config --global --add safe.directory $PWD"
- name: Publish catalog
run: |
/bin/bash -c "PWD=${pwd}; /usr/local/bin/apps_catalog_update publish --path $PWD"
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Publish new changes in catalog
commit_user_name: sonicaj
commit_user_email: waqarsonic1@gmail.com
commit_author: sonicaj <waqarsonic1@gmail.com>
- name: Update catalog
run: |
/bin/bash -c "PWD=${pwd}; /usr/local/bin/apps_catalog_update update --path $PWD"
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update catalog changes
commit_user_name: sonicaj
commit_user_email: waqarsonic1@gmail.com
commit_author: sonicaj <waqarsonic1@gmail.com>
1 change: 1 addition & 0 deletions features_capability.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions ix-dev/test/nginx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Nginx

It is a test app
37 changes: 37 additions & 0 deletions ix-dev/test/nginx/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
app_version: v1
capabilities:
- description: Just here as an example
name: NET_RAW
categories:
- networking
containerVersion: 1.0.0
description: Nginx description
home: https://github.com/AdguardTeam/AdGuardHome
host_mounts: []
icon: https://media.sys.truenas.net/apps/adguard-home/icons/icon.svg
keywords:
- dns
- adblock
lib_version: 0.0.1
lib_version_hash: f074617a82a86d2a6cc78a4c8a4296fc9d168e456f12713e50c696557b302133
maintainers:
- email: dev@ixsystems.com
name: truenas
url: https://www.truenas.com/
name: nginx
run_as_context:
- description: Test app.
gid: 0
groupName: root
uid: 0
userName: root
screenshots:
- https://media.sys.truenas.net/apps/adguard-home/screenshots/screenshot1.png
- https://media.sys.truenas.net/apps/adguard-home/screenshots/screenshot2.png
sources:
- https://github.com/AdguardTeam/AdGuardHome
- https://github.com/truenas/charts/tree/master/community/adguard-home
- https://hub.docker.com/r/adguard/adguardhome
title: Nginx
train: test
version: 1.0.0
5 changes: 5 additions & 0 deletions ix-dev/test/nginx/item.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
icon_url: https://seeklogo.com/images/N/nginx-logo-B38DADE410-seeklogo.com.png
categories:
- networking
screenshots: []
tags: []
18 changes: 18 additions & 0 deletions ix-dev/test/nginx/questions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
groups:
- name: Network Configuration
description: Configure Network for Nginx

questions:
- variable: network
label: ""
group: Network Configuration
schema:
type: dict
attrs:
- variable: web_port
label: WebUI Port
description: The port for Nginx WebUI
schema:
type: int
default: 8080
required: true
12 changes: 12 additions & 0 deletions ix-dev/test/nginx/templates/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
x-values: {{ values.some_key | tojson }}
services:
{{ ix_lib.base.test.container_name() }}:
image: nginx
ports:
- {{ values.network.web_port }}:80
healthcheck:
test: {{ "curl -f http://localhost:%s" | format(values.network.web_port) }}
interval: 10s
timeout: 10s
retries: 5
start_period: 30s
Empty file.
2 changes: 2 additions & 0 deletions ix-dev/test/nginx/templates/library/base_v0_0_1/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def container_name():
return "nginx"
3 changes: 3 additions & 0 deletions ix-dev/test/nginx/templates/test_values/basic-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
some_key: some_value
network:
web_port: 8080
Empty file added library/0.0.1/__init__.py
Empty file.
2 changes: 2 additions & 0 deletions library/0.0.1/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def container_name():
return "nginx"
1 change: 1 addition & 0 deletions library/hashes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1: f074617a82a86d2a6cc78a4c8a4296fc9d168e456f12713e50c696557b302133

0 comments on commit 56749a0

Please sign in to comment.