A sets a utility bash functions for Continuous Integration C.I.
Install with :
curl -s https://raw.githubusercontent.com/ebpro/ciwrappers/develop/get-ci-wrapper.sh | bashTo use it in the current shell :
source ~/.ci-wrappers/ci-wrappers.shYou can add it to .bashrc or .zshrc :
export CI_WRAPPER_HOME=${HOME}/.ci-wrappers
[[ -f "${CI_WRAPPER_HOME}/ci-wrappers.sh" ]] && \
source "${CI_WRAPPER_HOME}/ci-wrappers.sh" && \
export PATH="${CI_WRAPPER_HOME}/bin:$PATH"ci-install-software
Installs GitHub CLI, Docker client, docker compose plugin, vagrant and terraform in$CI_WRAPPERS_HOMEprovision-docker-engine
Installs docker in a vagrant VM.use-vagrant-docker
Set environment variables for Docker Client to use Docker Engine in the VM.
A sample docker command to generate a maven from a archetype in the current directory. Remember that the host home directory is mounted /vagrant_data inthe VM and that bind mounts are done from the VM.
docker run --rm -it \
--volume "/vagrant_data/.m2":/root/.m2 \
--volume /vagrant_data$(echo $PWD|sed "s/$(echo $HOME|echo $HOME|sed 's/\//\\\//g')//"):/usr/src/mymaven \
--workdir /usr/src/mymaven maven \
mvn archetype:generate \
-DarchetypeGroupId=fr.ebruno.maven.archetypes \
-DarchetypeArtifactId=maven-archetype-simple \
-DarchetypeVersion=0.1.3 \
-DgroupId=fr.univtln.bruno.samples \
-DartifactId=MyAppHelloWorld \
-Dversion=0.1.0-SNAPSHOT- if you have an http proxy :
- YOUR PASSWORD CAN'T CONTAINS CARACTERS FORBIDDEN IN URL
- sets the needed variables
HTTP_PROXY,HTTPS_PROXYandNO_PROXY - and adds the variables
VAGRANT_HTTP_PROXY,VAGRANT_HTTPS_PROXYandVAGRANT_NO_PROXY
- To install a docker engine with http proxy support in a Virtualbox VM with vagrant :
- run
provision-docker-engineonce to create the VMdocker-vagrantis a wrapper for this specific Docker vagrant Box.docker-vagrant upanddocker-vagrant haltto create/start and stop the vm.docker-vagrant sshto log in the VM.docker-vagrant suspend,docker-vagrant resumeanddocker-vagrant statusto suspend, resume and get VM status.docker-vagrant destroyto destroy it (docker named volumes will be lost).
use-vagrant-dockersets $DOCKER_HOST for the docker client in the current shell.- to test
docker run --rm hello-world vagrant destroyto destroy the VM AND THE DATA.
- run
new-java-project testci fr.univtln.bruno.tests
Creates a new maven projects ready for C.I.docker-mvn
Wraps maven in a container (docker needed see beelow).
For example to build a C.I. project:docker-mvn clean verifyci-github-runner-repoorci-github-runner-org
Creates and register a new GitHub runner in a docker container for the current repository or the organisation (account).