Merge "Use new image for kitchen tests"
diff --git a/Makefile b/Makefile
index 1043fbe..d166862 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,7 @@
all:
@echo "make install - Install into DESTDIR"
+ @echo "make lint - Run lint tests"
@echo "make test - Run tests"
@echo "make kitchen - Run Kitchen CI tests (create, converge, verify)"
@echo "make clean - Cleanup after tests run"
@@ -45,6 +46,9 @@
[ -d $(DESTDIR)/$(RECLASSDIR)/service/$(FORMULANAME) ] || mkdir -p $(DESTDIR)/$(RECLASSDIR)/service/$(FORMULANAME)
cp -a metadata/service/* $(DESTDIR)/$(RECLASSDIR)/service/$(FORMULANAME)
+lint:
+ [ ! -d tests ] || (cd tests; ./run_tests.sh lint)
+
test:
[ ! -d tests ] || (cd tests; ./run_tests.sh)
@@ -65,7 +69,7 @@
[ ! -f debian/changelog ] || dch -v $(VERSION_MAJOR).$(NEW_MINOR_VERSION) -m --force-distribution -D `dpkg-parsechangelog -S Distribution` "New version"
make genchangelog-$(VERSION_MAJOR).$(NEW_MINOR_VERSION)
(git add -u; git commit -m "Version $(VERSION_MAJOR).$(NEW_MINOR_VERSION)")
- git tag -s -m $(NEW_MAJOR_VERSION) $(VERSION_MAJOR).$(NEW_MINOR_VERSION)
+ git tag -s -m $(VERSION_MAJOR).$(NEW_MINOR_VERSION) $(VERSION_MAJOR).$(NEW_MINOR_VERSION)
check-changes:
@git log --pretty=oneline --decorate $(VERSION)..HEAD | grep -Eqc '.*' || (echo "No new changes since version $(VERSION)"; exit 1)
diff --git a/README.rst b/README.rst
index 0223a14..b179bec 100644
--- a/README.rst
+++ b/README.rst
@@ -115,6 +115,7 @@
architectures: amd64
gpgkeys: 460F3999
filter: "!(Name (% *-dbg))"
+ filter_with_deps: true
publisher:
component: example
distributions:
diff --git a/aptly/server/mirrors.sls b/aptly/server/mirrors.sls
index 24ad6f9..24be665 100644
--- a/aptly/server/mirrors.sls
+++ b/aptly/server/mirrors.sls
@@ -77,7 +77,7 @@
aptly_{{ mirror_name }}_mirror:
cmd.run:
- - name: aptly mirror create {% if mirror.get('udebs', False) %}-with-udebs=true {% endif %}{% if mirror.get('sources', False) %}-with-sources=true {% endif %}{% if mirror.get('filter') %}-filter="{{ mirror.filter }}" {% endif %}-architectures={{ mirror.architectures }} {{ mirror_name }} {{ mirror.source }} {{ mirror.distribution }} {{ mirror.components }}
+ - name: aptly mirror create {% if mirror.get('udebs', False) %}-with-udebs=true {% endif %}{% if mirror.get('sources', False) %}-with-sources=true {% endif %}{% if mirror.get('filter') %}-filter="{{ mirror.filter }}" {% endif %}{% if mirror.get('filter_with_deps') %}-filter-with-deps {% endif %}-architectures={{ mirror.architectures }} {{ mirror_name }} {{ mirror.source }} {{ mirror.distribution }} {{ mirror.components }}
{%- if server.source.engine != "docker" %}
- user: {{ server.user.name }}
{%- endif %}
@@ -87,6 +87,19 @@
- file: aptly_wrapper
{%- endif %}
+aptly_{{ mirror_name }}_mirror_edit:
+ cmd.run:
+ - name: aptly mirror edit {% if mirror.get('udebs', False) %}-with-udebs=true {% endif %}{% if mirror.get('sources', False) %}-with-sources=true {% endif %}{% if mirror.get('filter') %}-filter="{{ mirror.filter }}" {% endif %}{% if mirror.get('filter_with_deps') %}-filter-with-deps {% endif %}-architectures={{ mirror.architectures }} {{ mirror_name }}
+ {%- if server.source.engine != "docker" %}
+ - user: {{ server.user.name }}
+ {%- endif %}
+ - onlyif: 'aptly mirror show {{ mirror_name }} | grep -v "^Filter: {{ mirror.get('filter', '') }}$" | grep -q "^Filter: "'
+ {%- if server.source.engine == "docker" %}
+ - require:
+ - file: aptly_wrapper
+ - cmd: aptly_{{ mirror_name }}_mirror
+ {%- endif %}
+
{%- if mirror.get('update', False) == True %}
aptly_{{ mirror_name }}_update:
cmd.run:
@@ -96,6 +109,7 @@
{%- endif %}
- require:
- cmd: aptly_{{ mirror_name }}_mirror
+ - cmd: aptly_{{ mirror_name }}_mirror_edit
{%- if server.source.engine == "docker" %}
- file: aptly_wrapper
{%- endif %}