Project

citasks

0.0
No commit activity in last 3 years
No release in over 3 years
ci/cd tools for gitlab + jenkins. Libray and rake tasks
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 4.2
 Project Readme

CI Tools for Gitlab + Jenkins

This gem bootstraps the initial setup for gitlab and jenkins integration.

Install and require

Install

gem install citasks

Use

require 'citasks'

Usage

There is a rake task library that you can require to start

In your rake task file. Note the order is after the loading of the env

require 'dotenv'
Dotenv.load
require 'citasks'

In the .env file define the following

REPO_NAME=
GITLAB_USER=
GITLAB_PASS=

GITLAB_BASE_URL=
GITLAB_IN_CLUSTER_BASE_URL=
GITLAB_API_TOKEN=

JOB_NAME=
JENKINS_URL=
JENKINS_IN_CLUSTER_URL=
JENKINS_GIT_USER_CREDENTIAL_ID=

JENKINS_USER= 
JENKINS_USER_API_TOKEN=

Then run

rake -T

The tasks is shown as below,

rake Gitlab:01_create_new_repo      # create a new gitlab repo of icp-demo-app
rake Gitlab:02_webhook              # setup webhook
rake Gitlab:03_delete               # delete icp-demo-app
rake Jenkins:01_create_new_project  # create a new project icp-demo-app
rake Jenkins:02_delete              # delete icp-demo-app
rake git:01_commit[msg]             # add and commit
rake git:02_set_remote_orgin        # set remote origin to http://localhost...
rake git:03_set_remote_url          # reset remote url http://localhost:312...
rake git:04_push                    # push