-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add just Recipies, Playbooks, & Zuul Jobs
just recepies (prelimiary): - Apply Cluster Stack to K8s-Cluster - Check for ClusterStack being created (Draft) - Apply Test Cluster Ressource to K8s Cluster Playbooks and Zuul Jobs for: - Uploading Assets for PR and Post-Merge Runs - Creating Chore Branches based on changes to versions.yaml at al. Signed-off-by: Oliver Kautz <oliver.kautz@gonicus.de>
- Loading branch information
Showing
4 changed files
with
124 additions
and
19 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
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,27 @@ | ||
--- | ||
# This Play should be used on PRs against release branches to upload Release Assets to SCS Registry | ||
- name: "Create Chore Branches and PRs" | ||
hosts: "all" | ||
vars: | ||
install_dir: "{{ ansible_user_dir }}/.local/bin" | ||
github_token: "" | ||
environment: | ||
PATH: "{{ install_dir }}:{{ ansible_env.PATH }}" | ||
tasks: | ||
- name: "Install Just" | ||
ansible.builtin.command: | ||
cmd: "curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to {{ ansible_user_dir }}/.local/bin/" | ||
creates: "{{ ansible_user_dir }}/.local/bin/just" | ||
- name: "Ensure just env file" | ||
ansible.builtin.copy: | ||
src: "{{ zuul.project.src_dir}}/just.env.example" | ||
dest: "{{ zuul.project.src_dir}}/just.env" | ||
- name: "Set Enviroments variables for just" | ||
ansible.builtin.lineinfile: | ||
path: "{{ zuul.project.src_dir}}/just.env" | ||
regexp: '^GH_TOKEN=' | ||
line: "GH_TOKEN={{ github_token }}" | ||
- name: "Build Versions" | ||
ansible.builtin.command: "just --working-directory {{ zuul.project.src_dir}} --just-file {{ zuul.project.src_dir}}/justfile build-versions" | ||
- name: "Create Chore PRs" | ||
ansible.builtin.command: "just --working-directory {{ zuul.project.src_dir}} --just-file {{ zuul.project.src_dir}}/justfile git-chore-branches-all" |
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,37 @@ | ||
--- | ||
# This Play should be used on PRs against release branches to upload Release Assets to SCS Registry | ||
- name: "Upload Assets" | ||
hosts: "all" | ||
vars: | ||
install_dir: "{{ ansible_user_dir }}/.local/bin" | ||
is_pr: True # Set to False for Runs after merge. | ||
Check warning on line 7 in playbooks/upload_assets.yaml GitHub Actions / check-yaml-syntax
|
||
registry_credentials: | ||
OCI_REGISTRY: "registry.scs.community" | ||
OCI_REPOSITORY: "registry.scs.community/cluster-stacks/scs" | ||
OCI_USERNAME: "" | ||
OCI_PASSWORD: "" | ||
environment: | ||
PATH: "{{ install_dir }}:{{ ansible_env.PATH }}" | ||
tasks: | ||
- name: "Install Just" | ||
ansible.builtin.command: | ||
cmd: "curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to {{ ansible_user_dir }}/.local/bin/" | ||
creates: "{{ ansible_user_dir }}/.local/bin/just" | ||
- name: "Ensure just env file" | ||
ansible.builtin.copy: | ||
src: "{{ zuul.project.src_dir}}/just.env.example" | ||
dest: "{{ zuul.project.src_dir}}/just.env" | ||
- name: "Set Enviroments variables for just" | ||
ansible.builtin.lineinfile: | ||
path: "{{ zuul.project.src_dir}}/just.env" | ||
regexp: '^{{ item.key }}=' | ||
line: "{{ item.key }}={{ item.value }}" | ||
loop: "{{registry_credentials | dict2items }}" | ||
- name: "Upload Preliminary Assets" | ||
ansible.builtin.cmd: | ||
cmd: "just --working-directory {{ zuul.project.src_dir}} --just-file {{ zuul.project.src_dir}}/justfile publish-test-release" | ||
when: is_pr | ||
- name: "Upload Release Assets" | ||
ansible.builtin.cmd: | ||
cmd: "just --yes --working-directory {{ zuul.project.src_dir}} --just-file {{ zuul.project.src_dir}}/justfile publish-release" | ||
when: not is_pr |