IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Преглед на файлове

Final fixes for new gateway, add --tagged-only switch to focker image list.

master
Stanislaw Adaszewski преди 4 години
родител
ревизия
6580575cc1
променени са 4 файла, в които са добавени 20 реда и са изтрити 13 реда
  1. +1
    -2
      example/gateway/gateway-cookiecutter/Fockerfile
  2. +14
    -10
      example/gateway/gateway-cookiecutter/files/run.sh
  3. +1
    -0
      focker/focker.py
  4. +4
    -1
      focker/image.py

+ 1
- 2
example/gateway/gateway-cookiecutter/Fockerfile Целия файл

@@ -8,8 +8,7 @@ steps:
- mkdir -p /cookiecutter/input/nginx-https
- mkdir -p /cookiecutter/templates/nginx-http/\{\{cookiecutter.directory_name\}\}
- mkdir -p /cookiecutter/templates/nginx-https/\{\{cookiecutter.directory_name\}\}
- mkdir -p /cookiecutter/output/nginx-http
- mkdir -p /cookiecutter/output/nginx-https
- mkdir -p /cookiecutter/output
- mkdir -p /cookiecutter/scripts
- copy:
- [ files/run.sh,


+ 14
- 10
example/gateway/gateway-cookiecutter/files/run.sh Целия файл

@@ -1,17 +1,21 @@
#!/bin/sh

mkdir -p /cookiecutter/output/meta && \
cp -v /cookiecutter/input/meta/cookiecutter.json \
/cookiecutter/output/meta/cookiecutter.json && \
\
cp -v /cookiecutter/input/nginx-http/nginx.conf \
/cookiecutter/templates/nginx-http/\{\{cookiecutter.directory_name\}\}/nginx.conf
/cookiecutter/templates/nginx-http/\{\{cookiecutter.directory_name\}\}/nginx.conf && \
cp -v /cookiecutter/input/meta/cookiecutter.json \
/cookiecutter/templates/nginx-http/cookiecutter.json
/cookiecutter/templates/nginx-http/cookiecutter.json && \
\
cp -v /cookiecutter/input/nginx-https/nginx.conf \
/cookiecutter/templates/nginx-https/\{\{cookiecutter.directory_name\}\}/nginx.conf
/cookiecutter/templates/nginx-https/\{\{cookiecutter.directory_name\}\}/nginx.conf && \
cp -v /cookiecutter/input/meta/cookiecutter.json \
/cookiecutter/templates/nginx-https/cookiecutter.json
cd /cookiecutter/output
cookiecutter --no-input /cookiecutter/templates/nginx-http directory_name=nginx-http
cd /cookiecutter/output
/cookiecutter/templates/nginx-https/cookiecutter.json && \
\
cd /cookiecutter/output && \
cookiecutter --no-input /cookiecutter/templates/nginx-http directory_name=nginx-http && \
\
cd /cookiecutter/output && \
cookiecutter --no-input /cookiecutter/templates/nginx-https directory_name=nginx-https

+ 1
- 0
focker/focker.py Целия файл

@@ -99,6 +99,7 @@ def create_parser():
parser = ListForwarder([subparsers.add_parser(cmd) for cmd in ['list', 'ls', 'l']])
parser.set_defaults(func=command_image_list)
parser.add_argument('--full-sha256', '-f', action='store_true')
parser.add_argument('--tagged-only', '-t', action='store_true')
parser = ListForwarder([subparsers.add_parser(cmd) for cmd in ['prune', 'pru', 'p']])
parser.set_defaults(func=command_image_prune)


+ 4
- 1
focker/image.py Целия файл

@@ -127,7 +127,10 @@ def command_image_list(args):
lst = zfs_list(fields=['name', 'refer', 'focker:sha256', 'focker:tags', 'origin'],
focker_type='image')
# zfs_parse_output(['zfs', 'list', '-o', 'name,refer,focker:sha256,focker:tags,origin', '-H'])
lst = list(filter(lambda a: a[2] != '-', lst))
lst = filter(lambda a: a[2] != '-', lst)
if args.tagged_only:
lst = filter(lambda a: a[3] != '-', lst)
lst = list(lst)
lst = list(map(lambda a: [ a[3], a[1],
a[2] if args.full_sha256 else a[2][:7],
a[4].split('/')[-1].split('@')[0] ], lst))


Loading…
Отказ
Запис