Skip to content

Commit

Permalink
release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe.caron committed Jun 13, 2024
1 parent 6f0bb71 commit 4f3d509
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 29 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG.md

## 1.0.1 (2024-06-13)

Validate Release workflows

## 1.0.0 (2023-08-17)

Initialisation of the project. V1
49 changes: 23 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ For everytime I want to quickly start a new ansible collection.

## What's for ?

AnsiColt allow you with few commands to start developping an Ansible Collection on Github or Gitlab.
AnsiColt allow you with few commands to start developping an Ansible Collection on Github or Gitlab.
It meant to be installed on WSL or any Linux developping server.

What it does on your computer ?
- It will install AnsiColt as classic ansible collection in your $HOME/.ansible/collections directory.
- Add an alias in $HOME/.config/aliases to use the AnsiColt collection.
- It will install Arkade, just, gh and glab.
What it does on your computer ?
- It will install AnsiColt as classic ansible collection in your `$HOME/.ansible/collections` directory.
- Add an alias in `$HOME/.config/aliases` to use the AnsiColt collection.
- It will install `Arkade`, `just`, `gh` and `glab`.

Why not use repository templates from Github ? Currently, I see four good reasons:
- Here, I can variabilize templates that I push
Why not use repository templates from Github ? Currently, I see four good reasons:
- Here, I can variabilize templates that I push
- This collection can be available in the Ansible-Galaxy Portal
- Handle projects in Github and Gitlab, private or public, but also local.
- Handle several project's workflow (local, remote, blank).
Expand All @@ -26,53 +26,53 @@ Why do I need it, there is an Ansible-galaxy command for this ? yes, but it does
- Initialize a project in your Github, then init your collection, and push it on Github.
- Fullfill a maximum of values in the galaxy.yml and other meta data in roles.
- Bring a structure to handles dependencies of your collection and scripts to resolv them.
- It also add somes extras customs scripts, linter, .gitignore and other tricks...
- It also add somes extras customs scripts, linter, `.gitignore` and other tricks...
- By default set your project with a License Apache-2.0 (to come later a menu with diverse type of license)
- When cloning or creating projects, some good pratices are applied, like git config user in each project directory.
Which avoid to push later on with the global email which can be different for each repositories.
- When cloning or creating projects, some good pratices are applied, like git config user in each project directory.
Which avoid to push later on with the global email which can be different for each repositories.

Yes, You got it... It's an Ansible Collection to create an Ansible Collection, make sense!
Yes, You got it... It's an Ansible Collection to create an Ansible Collection, make sense!


# Getting started 🚀
# Getting started 🚀

## Prerequisites

Linux Host debian or RHEL (can be a VM or your WSL).

- [✅ curl](#curl-)
- [✅ curl](#curl-)

the installer script will install:
the installer script will install:
- arkade
- just
- gh / glab-cli
- ansible-core
- this collection and alias...
- this collection
- one alias to rule them all...

## Basic installation

- Install AnsiColt
```sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/MozeBaltyk/AnsiColt/main/scripts/install.sh)"
bash -c "$(curl -fsSL https://raw.githubusercontent.com/MozeBaltyk/AnsiColt/main/scripts/install.sh)"
```

## Use it to create and build new projects:
## Use it to create and build new projects

By default, *github.com* is configured as default repository and project are *private*.

Those value can be adapted on the run:
- redefine env var with `export REPOSITORY=gitlab.example.com` in your terminal or inside ` ~/.config/aliases/AnsiColt`
- inside the command `colt REPOSITORY=gitlab.example.com install AnsiColt`

Manual below was autogenerated with : `colt`
Manual below was autogenerated with : `colt`

<!-- Autogenerated -->
```
NAME
AnsiColt - kickstart Ansible Collection
SYNOPSIS
colt [vars=value] recipe [arguments]...
colt [vars=value] recipe [arguments]...
DESCRIPTION
'colt' allow you to trigger recipes which are describes below. The arguments need to follow the order as described below.
Expand All @@ -99,7 +99,6 @@ EXAMPLE
```
<!-- END -->


Workflow with a remote repository :

- `colt init` start a new Ansible collection - private project on remote repository (by default Github).
Expand All @@ -114,7 +113,6 @@ Workflow with a remote repository :

- `colt install` install collection from your remote repository in your current homedir.


Workflow on local computer:

- `colt local` start a new Ansible collection project on your local computer (no git).
Expand All @@ -129,7 +127,6 @@ Extras:

- `colt blank` start a blank project on remote repository.


## Verify

Check if AnsiColt is available:
Expand All @@ -149,7 +146,7 @@ Ansible collection templates were design following Redhat documentation:
- https://docs.ansible.com/ansible/latest/user_guide/collections_using.html
- https://www.ansible.com/blog/hands-on-with-ansible-collections

Using Ansible Collections:
Using Ansible Collections:
- https://docs.ansible.com/ansible/latest/collections_guide/collections_using_playbooks.html#simplifying-module-names-with-the-collections-keyword

Linter:
Expand All @@ -163,7 +160,7 @@ Pre-commit:
# Special thanks 📢

* Alex Ellis, for its [Arkade project](https://github.com/alexellis/arkade). I cannot live without anymore.
* Casey Rodarmor, for the command runner [Justfile](https://github.com/casey/just).
* Casey Rodarmor, for the command runner [Justfile](https://github.com/casey/just).
* Deniz, an anonymous celibrity in his country. 😸

# Roadmaps
Expand All @@ -182,4 +179,4 @@ Some ideas:
o _____ _______________ ___=====__T___
.][__n_n_|DD[ ====_____ | |.\/.| | | |_| |_
(________|__|_[_________]_|____|_/\_|___|_|___________|_|
_/oo OOOOO oo` ooo ooo o^o o^o o^o o^o
_/oo OOOOO oo` ooo ooo o^o o^o o^o o^o
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace: mozebaltyk

name: ansicolt

version: 1.0.0
version: 1.0.1

readme: README.md

Expand Down
4 changes: 2 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/bash
#
# For the README.md
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/MozeBaltyk/AnsiColt/main/scripts/install.sh)"
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/MozeBaltyk/AnsiColt/main/scripts/install.sh)"
#

aliases='
Expand Down Expand Up @@ -291,7 +291,7 @@ install_gh(){
install_ansicolt() {
printf "\e[1;33m[CHANGE]\e[m Installing ansiColt...\n"
ansible-galaxy collection install git+https://github.com/MozeBaltyk/AnsiColt.git > /dev/null 2>&1
printf "\e[1;32m[OK]\e[m AnsiColt collection was installed."
printf "\e[1;32m[OK]\e[m AnsiColt collection was installed.\n"
ansible-galaxy collection list MozeBaltyk.AnsiColt
}

Expand Down

0 comments on commit 4f3d509

Please sign in to comment.