A cli tool (or go library) to provide a foundation for a platform-agnostic CICD process.
Documentation: https://cidverse.github.io/normalizeci/
Quick Links:
- normalization - check the env vars and the local repository to provide a common set of env vars on any ci platform.
- compatibility - convert the common env vars into a specific format (i.e. gitlab) to run a script made for gitlab on any ci provider.
You can download the binaries from the project releases: https://github.com/cidverse/normalizeci/releases
Linux:
sudo curl -L -s -o /usr/local/bin/normalizeci https://github.com/cidverse/normalizeci/releases/download/v1.0.0/linux_amd64
sudo chmod +x /usr/local/bin/normalizeci(available builds: linux_386, linux_amd64, windows_386, windows_amd64, darwin_386, darwin_amd64)
Examples:
| Id | Command | Description |
|---|---|---|
| 1 | normalizeci normalize --format export --output nci.env |
generate nci variables in format export for unix systems, stored as file |
| 2 | normalizeci normalize --format powershell |
generate nci variables in format export for windows powershell, written to stdout |
| 3 | normalizeci normalize --output nci.env |
generate nci variables in the suggested format for the current system |
| 4 | normalizeci normalize --hostenv --output nci.env |
additionally to 3 includes all env vars from the host |
| 5 | normalizeci normalize --format cmd |
generate nci variables in format export for windows cmd, written to stdout |
| 6 | normalizeci denormalize --target gitlab |
generate a gitlab ci like environment based on the normalized environment |
| 7 | normalizeci version |
print version information |
Linux/MacOS
normalizeci normalize --format export --output nci.env
source nci.env
rm nci.envWindows
normalizeci normalize --format powershell --output nci.ps1
& .\nci.ps1
rm nci.ps1The NormalizeCI CLI will return the commands to set the normalized variables in your current terminal session, so you need to run the response of the command.
Linux/MacOS
eval $(normalizeci normalize)Windows
$nenv = normalizeci normalize
Invoke-Expression "$nenv"Install the latest version as library:
go get -u github.com/cidverse/normalizeci/pkgAnd access the normalized environment, by default it will search for the vcs repo based on the current working directory.
var normalized = normalizeci.RunDefaultNormalization()| NAME | SLUG |
|---|---|
| AppVeyor | appveyor |
| Azure DevOps Pipeline | azure-devops |
| CircleCI | circleci |
| GitLab CI/CD | gitlab-ci |
| GitHub Actions | github-actions |
| Local Git Repository | local |
Note: If none of the above systems is detected, repository information is determined based on the local Git repository.
git
Note:: If you want to contribute, feel free to pick one of the following services and add a package to normalize their variables.
| NAME | SLUG |
|---|---|
| AWS CodeBuild | aws-codebuild |
| Bamboo | bamboo |
| Bitbucket | bitbucket |
| Bitrise | bitrise |
| Buddy | buddy |
| Buildkite | buildkite |
| Cirrus CI | cirrusci |
| Codefresh | codefresh |
| Codeship | codeship |
| Drone | drone |
| Jenkins | jenkins |
| Sail CI | sailci |
| Semaphore | semaphore |
| Shippable | shippable |
| TeamCity | teamcity |
| Travis CI | travis-ci |
| Wercker | wercker |
If a system is missing in this list, please open an issue.
Released under the MIT license.