Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent running of states deprecated in v1.0.0 #236

Merged
merged 1 commit into from
May 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nginx/common.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
32 changes: 32 additions & 0 deletions nginx/deprecated.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

nginx-deprecated-in-v1.0.0-test-fail:
test.fail_without_changes:
- name: |


################################################################################
# #
# WARNING: BREAKING CHANGES SINCE `v1.0.0` #
# #
################################################################################
# #
# Prior to `v1.0.0`, this formula provided two methods for managing NGINX; the #
# old method under `nginx` and the new method under `nginx.ng`. The old method #
# has now been removed and `nginx.ng` has been promoted to be `nginx` in its #
# place. #
# #
# If you are not in a position to migrate, please pin your repo to the final #
# release tag before `v1.0.0`, i.e. `v0.56.1`. #
# #
# To migrate from `nginx.ng`, simply modify your pillar to promote the entire #
# section under `nginx:ng` so that it is under `nginx` instead. So with the #
# editor of your choice, highlight the entire section and then unindent one #
# level. Finish by removing the `ng:` line. #
# #
# To migrate from the old `nginx`, first convert to `nginx.ng` under `v0.56.1` #
# and then follow the steps laid out in the paragraph directly above. #
# #
################################################################################
- failhard: True
15 changes: 9 additions & 6 deletions nginx/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
#
# Meta-state to fully install nginx.

{% from 'nginx/map.jinja' import nginx, sls_block with context %}
{%- from 'nginx/map.jinja' import nginx, sls_block with context %}

include:
{%- if nginx.ng is defined %}
- nginx.deprecated
{%- endif %}
- nginx.config
- nginx.service
{% if nginx.snippets is defined %}
{%- if nginx.snippets is defined %}
- nginx.snippets
{% endif %}
{%- endif %}
- nginx.servers
- nginx.certificates

Expand All @@ -23,8 +26,8 @@ extend:
nginx_config:
file:
- require:
{% if nginx.install_from_source %}
{%- if nginx.install_from_source %}
- cmd: nginx_install
{% else %}
{%- else %}
- pkg: nginx_install
{% endif %}
{%- endif %}
2 changes: 2 additions & 0 deletions nginx/luajit2.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/ng/certificates.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/ng/config.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/ng/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/ng/passenger.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/ng/pkg.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/ng/servers.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/ng/servers_config.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/ng/service.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/ng/snippets.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/ng/src.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/openresty.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/package.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/source.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/sysvinit.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/upstart.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated
2 changes: 2 additions & 0 deletions nginx/users.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- nginx.deprecated