Skip to content

Commit

Permalink
Merge pull request #1 from CodethinkLabs/scott/add-release-workflow
Browse files Browse the repository at this point in the history
Add release workflow
  • Loading branch information
sdclarke authored Aug 13, 2024
2 parents 9e7c5a1 + 60c1caa commit 542d7b1
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 5 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Check ansible
on:
pull_request:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install ansible-lint
run: pip3 install ansible-lint==24.7.*
- name: Install ansible docker collection
run: ansible-galaxy collection install 'community.docker<3.13'
- name: Run ansible-lint
run: ansible-lint .
23 changes: 23 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Release role
on:
push:
tags:
- '*'

jobs:
import_role:
name: Import role to Ansible Galaxy
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Ansible.
run: pip3 install ansible-core==2.17.*
- name: Start import on Ansible Galaxy
run: >
ansible-galaxy role import
--token ${{ secrets.ANSIBLE_GALAXY_API_TOKEN }}
$(echo ${{ github.repository }} | cut -d/ -f1)
$(echo ${{ github.repository }} | cut -d/ -f2)
17 changes: 13 additions & 4 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ casd_bind: "{{ 'unix:' ~ casd_bind_path if casd_bind_path else casd_bind_address
casd_quota_high: "200G"
casd_cache_mnt: "/srv"
casd_certs_mnt: "/certs"
casd_cmd: "--verbose --bind {{ casd_bind }} --quota-high {{ casd_quota_high }} {{ casd_metrics_args }} {{ casd_proxy_cas_args }} {{ casd_proxy_ac_args }} {{ casd_proxy_asset_args }} {{ casd_proxy_execution_args }} {{ casd_cache_mnt }}"
casd_cmd: >
"--verbose --bind {{ casd_bind }} --quota-high {{ casd_quota_high }}
{{ casd_metrics_args }} {{ casd_proxy_cas_args }} {{ casd_proxy_ac_args }}
{{ casd_proxy_asset_args }} {{ casd_proxy_execution_args }} {{ casd_cache_mnt }}"
casd_default_mounts:
- "{{ casd_cache }}:{{ casd_cache_mnt }}"
casd_certdir_mount:
Expand All @@ -45,7 +48,9 @@ casd_proxy_cas_url_arg: "{% if casd_proxy_cas_url %}--cas-remote {{ casd_proxy_c
casd_proxy_cas_server_cert_arg: "{% if casd_proxy_cas_server_cert %}--cas-server-cert {{ casd_certs_mnt }}/cas_server.crt{% endif %}"
casd_proxy_cas_client_cert_arg: "{% if casd_proxy_cas_client_cert %}--cas-client-cert {{ casd_certs_mnt }}/cas_client.crt{% endif %}"
casd_proxy_cas_client_key_arg: "{% if casd_proxy_cas_client_key %}--cas-client-key {{ casd_certs_mnt }}/cas_client.key{% endif %}"
casd_proxy_cas_args: "{{ casd_proxy_cas_url_arg }} {{ casd_proxy_cas_server_cert_arg }} {{ casd_proxy_cas_client_cert_arg }} {{ casd_proxy_cas_client_key_arg }}"
casd_proxy_cas_args: >
"{{ casd_proxy_cas_url_arg }} {{ casd_proxy_cas_server_cert_arg }}
{{ casd_proxy_cas_client_cert_arg }} {{ casd_proxy_cas_client_key_arg }}"
# AC proxy configuration
casd_proxy_ac_url: ""
Expand All @@ -67,7 +72,9 @@ casd_proxy_asset_url_arg: "{% if casd_proxy_asset_url %}--ra-remote {{ casd_prox
casd_proxy_asset_server_cert_arg: "{% if casd_proxy_asset_server_cert %}--ra-server-cert {{ casd_certs_mnt }}/asset_server.crt{% endif %}"
casd_proxy_asset_client_cert_arg: "{% if casd_proxy_asset_client_cert %}--ra-client-cert {{ casd_certs_mnt }}/asset_client.crt{% endif %}"
casd_proxy_asset_client_key_arg: "{% if casd_proxy_asset_client_key %}--ra-client-key {{ casd_certs_mnt }}/asset_client.key{% endif %}"
casd_proxy_asset_args: "{{ casd_proxy_asset_url_arg }} {{ casd_proxy_asset_server_cert_arg }} {{ casd_proxy_asset_client_cert_arg }} {{ casd_proxy_asset_client_key_arg }}"
casd_proxy_asset_args: >
"{{ casd_proxy_asset_url_arg }} {{ casd_proxy_asset_server_cert_arg }}
{{ casd_proxy_asset_client_cert_arg }} {{ casd_proxy_asset_client_key_arg }}"
# Execution proxy configuration
casd_proxy_execution_url: ""
Expand All @@ -78,4 +85,6 @@ casd_proxy_execution_url_arg: "{% if casd_proxy_asset_url %}--exec-remote {{ cas
casd_proxy_execution_server_cert_arg: "{% if casd_proxy_asset_server_cert %}--exec-server-cert {{ casd_certs_mnt }}/asset_server.crt{% endif %}"
casd_proxy_execution_client_cert_arg: "{% if casd_proxy_asset_client_cert %}--exec-client-cert {{ casd_certs_mnt }}/asset_client.crt{% endif %}"
casd_proxy_execution_client_key_arg: "{% if casd_proxy_asset_client_key %}--exec-client-key {{ casd_certs_mnt }}/asset_client.key{% endif %}"
casd_proxy_execution_args: "{{ casd_proxy_asset_url_arg }} {{ casd_proxy_asset_server_cert_arg }} {{ casd_proxy_asset_client_cert_arg }} {{ casd_proxy_asset_client_key_arg }}"
casd_proxy_execution_args: >
"{{ casd_proxy_asset_url_arg }} {{ casd_proxy_asset_server_cert_arg }}
{{ casd_proxy_asset_client_cert_arg }} {{ casd_proxy_asset_client_key_arg }}"
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
galaxy_info:
role_name: buildbox_casd
namespace: codethinklabs
author: Scott Clarke
description: Deploy buildbox-casd in a docker container
company: Codethink Limited
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
community.docker.docker_network:
name: "{{ casd_network }}"
connected: "{{ [] if casd_bind_path else casd_network_connected_containers }}"
appends: yes
appends: true

- name: Bring up buildbox-casd
community.docker.docker_container:
Expand Down

0 comments on commit 542d7b1

Please sign in to comment.