Skip to content
This repository was archived by the owner on Aug 21, 2022. It is now read-only.
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
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Ansible v2.10 alpha (GH actions currently uses 2.9)
run: ANSIBLE_SKIP_CONFLICT_CHECK=1 pip install --user ansible==2.10.0a9 && ansible --version
- name: Get latest StackHead version
run: git clone --depth 1 --branch master https://github.com/getstackhead/stackhead.git stackhead-repo
run: ansible-galaxy collection install git+https://github.com/getstackhead/stackhead.git,next -f
- run: ansible-playbook ./__tests__/test-tf-generation.yml

checkLabel:
Expand All @@ -37,6 +39,8 @@ jobs:
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v2
- name: Install Ansible v2.10 alpha (GH actions currently uses 2.9)
run: ANSIBLE_SKIP_CONFLICT_CHECK=1 pip install --user ansible==2.10.0a9 && ansible --version
- name: Print Ansible version
run: ansible --version
- uses: webfactory/ssh-agent@v0.2.0
Expand Down Expand Up @@ -74,7 +78,7 @@ jobs:
proxied: 0
token: "${{ secrets.CLOUDFLARE_TOKEN }}"
zone: "${{ secrets.CLOUDFLARE_ZONE }}"
- uses: "getstackhead/stackhead@master"
- uses: getstackhead/stackhead@next
with:
ipaddress: ${{ steps.setup_server.outputs.hcloud_server_created_ipv4 }}
domain: '${{ env.DOMAIN_NAME }}.${{ env.DOMAIN_SUFFIX }}'
Expand Down
1 change: 0 additions & 1 deletion __tests__/filter_plugins

This file was deleted.

4 changes: 3 additions & 1 deletion __tests__/test-tf-generation.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
- hosts: localhost
connection: local
vars:
stackhead__roles: "~/.ansible/collections/ansible_collections/getstackhead/stackhead/roles"
tasks:
- include_vars: "../stackhead-repo/ansible/__tests__/variables.yml"
- include_vars: "{{ stackhead__roles }}/stackhead_module_api/testdata/variables.yml"
- set_fact:
containerapp__expose: "{{ containerapp__expose|default([]) + item.expose }}"
when: item.expose is defined and item.expose not in containerapp__expose|default([])
Expand Down
2 changes: 1 addition & 1 deletion tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
- include_tasks: "{{ role_path }}/tasks/steps/generate-serverblock-tf.yml"

# Generate SSL certificate configurations
- include_tasks: "roles/stackhead_project/tasks/ssl/ssl-config.yml"
- include_tasks: "{{ stackhead__roles }}/stackhead_module_api/tasks/ssl-certificate.yml"
4 changes: 2 additions & 2 deletions templates/terraform/nginx_server_block_docker.tf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resource "nginx_server_block" "nginx-{{ project_name }}" {
filename = "{{ project_name }}.conf"
enable = true

{%- set all_ports = containerapp__expose|containerPorts(project_name) %}
{%- set all_ports = containerapp__expose|getstackhead.stackhead.containerPorts(project_name) %}
markers = {
docker_ports = "{{ all_ports|map(attribute='tfstring')|join(',') }}"
}
Expand Down Expand Up @@ -47,4 +47,4 @@ EOT
when = destroy
command = "sudo systemctl reload nginx"
}
}
}