Skip to content

Instantly share code, notes, and snippets.

View susovanpanja's full-sized avatar

Susovan Panja susovanpanja

  • Mohali
View GitHub Profile
@susovanpanja
susovanpanja / repository_cleaner.sh
Created February 24, 2023 11:13
Remote Container Repository cleanu using skopeo
#!/bin/bash
read -p "Enter the container repository url with port number e.g 10.10.10.10:32000 => " repo_url
repo=( $(curl http://$repo_url/v2/_catalog | jq -r .repositories[]) )
for r in ${repo[@]}; do
tags=( $(skopeo list-tags --tls-verify=false docker://$repo_url/$r | jq -r .Tags[]) )
for t in ${tags[@]}; do
skopeo delete --tls-verify=false docker://$repo_url/$r:$t
@susovanpanja
susovanpanja / Makefile
Created May 25, 2023 14:31 — forked from ninjatux/Makefile
Makefile bootstrap
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@susovanpanja
susovanpanja / git_commands.txt
Created December 29, 2023 08:15
git cli command to rename a existing remote branch
# We want to rename an existing branch on remote repo to a new one using cli
# Optional if we already have the branch on local system
$ git checkout OLD_BRANCH_NAME
# switch to any branch other than the branch that need to be renamed
$ git checkout master
$ git branch -m OLD_BRANCH_NAME NEW_BRANCH_NAME
@susovanpanja
susovanpanja / Jenkinsfile_Active_Choice_Reactive_Parameter
Created January 4, 2024 14:53
Example of jenkins code for Active Choice Reactive Parameter
properties([
parameters([
choice(choices: ['Development','QA'], description: 'Select Deployment Environment', name: 'DEPLOYMENT_ENVIRONMENT'),
choice(choices: ['release','snapshot'], description: 'Select Nexus Repo', name: 'NEXUS_REPO'),
[$class: 'CascadeChoiceParameter',
choiceType: 'PT_SINGLE_SELECT',
filterLength: 1,
filterable: false,
name: 'ARTIFACT_VERSION',
randomName: 'choice-parameter-7777777777777777',