The repository houses custom groovy scripts to be used in Jenkins Multibranch Pipeline projects. The functions deal with setting up python environment, making version commits, building and publishing docker image to DockerHub.
S.No | Function | Description | Arguments |
---|---|---|---|
1 | makeEnv() | Creates Virtual Environment | - |
2 | activateEnv() | Activates Virtual Environment | - |
3 | installDependencies() | Installs dependencies from requirements.txt file | - |
4 | linter() | Runs Flake8 linting, config in tox.ini | - |
5 | testCases() | Runs PyTest | - |
6 | incrementVersion(type) | Increments Version Specifiec in version.toml | type: ["dev","stage","main"] corresponds to ["patch","minor","major"] updates |
7 | getVersion(filename) | Returns Version specified in filename | filename: String |
8 | makeupdatecommit(repo) | Makes A Commit and Pushes to Github | repo: Repository To be Committed |
9 | buildDockerImage(version,repo) | Builds docker image from dockerfile with name narayanadithya// | version: String, repo: String |
10 | dockerLogin() | DockerHub Login | - |
11 | dockerPush(version,repo) | Pushes image to with tag | version: String, repo: String |