Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ciwrappers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Emmanuel Bruno
ciwrappers
Commits
07c55acc
Commit
07c55acc
authored
2 years ago
by
Emmanuel Bruno
Browse files
Options
Downloads
Patches
Plain Diff
adds a README and generify get.
parent
6984c664
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+47
-0
47 additions, 0 deletions
README.md
get-ci-wrapper.sh
+5
-4
5 additions, 4 deletions
get-ci-wrapper.sh
with
52 additions
and
4 deletions
README.md
0 → 100644
+
47
−
0
View file @
07c55acc
# 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.
This diff is collapsed.
Click to expand it.
get-ci-wrapper.sh
+
5
−
4
View file @
07c55acc
#!/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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment