Skip to content
Snippets Groups Projects
Commit 07c55acc authored by Emmanuel Bruno's avatar Emmanuel Bruno
Browse files

adds a README and generify get.

parent 6984c664
No related branches found
No related tags found
No related merge requests found
# C.I. Wrappers
A sets a utility bash functions for Continuous Integration C.I.
## Installation
Install with :
```bash
curl -s https://bruno.univ-tln.fr/get-ci-wrapper.sh | bash
```
To use it in the current shell :
```bash
source ~/.ci-wrappers/ci-wrappers.sh
```
You can add it to .bashrc or .zshrc :
```bash
export CI_WRAPPER_HOME=${HOME}/.ci-wrappers
[[ -f "${CI_WRAPPER_HOME}/ci-wrappers.sh" ]] && \
source "${CI_WRAPPER_HOME}/ci-wrappers.sh"
```
## Usage
- `install-ci-software` <br/>
Installs GitHub CLI, Docker client, docker compose plugin, vagrant and terraform in $CI_WRAPPERS_HOME
- `new-java-project testci fr.univtln.bruno.tests` <br/>
Creates a new maven projects ready for C.I.
- `docker-mvn` <br/>
Wraps maven in a container (docker needed see beelow).<br/>
For example to build a C.I. project: `docker-mvn clean verify`
- `github-runner-repo` or `github-runner-org` <br/>
Creates and register a new GitHub runner in a docker container for the current repository
or the organisation (account).
- A docker engine with http proxy support in VM :
- `docker-vagrant` is a wrapper for a specific Docker vagrant Box (Docker in a VBox VM).
- `docker-vagrant up` and `docker-vagrant halt` to create/start and stop the vm.
- `docker-vagrant ssh` to log in the VM.
- `docker-vagrant suspend`, `docker-vagrant resume` and `docker-vagrant status` to suspend, resume and get VM
status.
- `docker-vagrant destroy` to destroy it (**docker named volumes will be lost**).
- `use-vagrant-docker` to sets docker client to used in the current shell (sets $DOCKER_HOST).
- `vagrant destroy` to destroy it.
#!/usr/bin/env bash
CI_WRAPPERS_HOME="\${CI_WRAPPERS_HOME:-\${HOME}/.ci-wrappers}"
_create_config() (
echo HOME: "${HOME}"
# Create or update default config file
mkdir -p "${HOME}/.ci-wrappers/"
cat >"${HOME}/.ci-wrappers/config" <<END
mkdir -p "${CI_WRAPPERS_HOME}"
cat >"${CI_WRAPPERS_HOME}/config" <<END
CI_VAGRANT_VERSION=2.3.4
CI_TERRAFORM_VERSION=1.3.6
CI_DOCKER_CLIENT_VERSION=20.10.19
......@@ -25,7 +26,7 @@ END
_create_config
# Load the config
source "${HOME}/.ci-wrappers/config"
source "${CI_WRAPPERS_HOME}/config"
# Installs the script locally
curl -s https://raw.githubusercontent.com/ebpro/ciwrappers/develop/ci-wrappers.sh > "$CI_WRAPPERS_HOME"/ci-wrappers.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment