-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #427 from sean-m-sullivan/devel
Fix Release and add automated releases
- Loading branch information
Showing
6 changed files
with
107 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
- name: release collection | ||
hosts: localhost | ||
gather_facts: False | ||
connection: local | ||
vars: | ||
collection_namespace: "{{ namespace | lower | regex_replace('-','_') }}" | ||
collection_name: controller_configuration | ||
collection_version: "{{ github_tag | regex_search('(\\d.\\d.\\d.*)') }}" | ||
collection_repo: undef | ||
api_key: undef | ||
repo_base_dir: "{{ playbook_dir }}/../.." | ||
|
||
tasks: | ||
- name: create galaxy.yml | ||
template: | ||
src: "{{ repo_base_dir }}/galaxy.yml.j2" | ||
dest: "{{ repo_base_dir }}/galaxy.yml" | ||
mode: '0644' | ||
|
||
- name: Update changelog | ||
command: | ||
cmd: antsibull-changelog release --verbose --version {{ collection_version }} | ||
chdir: "{{ repo_base_dir }}" | ||
register: update_changelog | ||
changed_when: "update_changelog.rc != 2" | ||
|
||
- name: remove galaxy.yml | ||
file: | ||
path: "{{ repo_base_dir }}/galaxy.yml" | ||
state: absent | ||
tags: cleanup | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
name: cop-galaxy-release | ||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
env: | ||
ANSIBLE_FORCE_COLOR: 1 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v1 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Publish to galaxy | ||
run: ansible-playbook .github/workflow-config/release.yml | ||
-e namespace=${{ github.repository_owner }} | ||
-e github_tag=${{ github.ref_name }} | ||
-e api_key=${{ secrets.ANSIBLE_GALAXY_APIKEY }} | ||
-e collection_repo=https://github.com/${{ github.repository }} | ||
--verbose --skip-tags=install,cleanup | ||
|
||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
name: infra-galaxy-release | ||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
env: | ||
ANSIBLE_FORCE_COLOR: 1 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v1 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Publish to galaxy | ||
run: ansible-playbook .github/workflow-config/release.yml | ||
-e namespace='infra' | ||
-e github_tag=${{ github.ref_name }} | ||
-e api_key=${{ secrets.GALAXY_INFRA_KEY }} | ||
-e collection_repo=https://github.com/${{ github.repository }} | ||
--verbose --skip-tags=install,cleanup | ||
|
||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
breaking_changes: | ||
- infra.controller_configuration 2.2.3 is broken, it is aap_utilities release. We are bumping the version to minimize the issues. | ||
minor_changes: | ||
- Update release process to avoid problems that have happened and automate it. |