Skip to content

Instantly share code, notes, and snippets.

@MarioRinaldi
Created January 14, 2015 14:49
Show Gist options
  • Save MarioRinaldi/7029268a71d025490642 to your computer and use it in GitHub Desktop.
Save MarioRinaldi/7029268a71d025490642 to your computer and use it in GitHub Desktop.
buildJenkins
#!/bin/bash
help()
{
echo ""
echo "buildJenkins"
echo " Ferramenta para constução de pacotes de arquivos em linha de comandos."
echo ""
echo "UTILIZAÇÃO"
echo ""
echo "buildJenkins [OPTIONS]"
echo ""
echo "OPTIONS"
echo " --cms"
echo " Executa build DEV do cms.git"
echo " --wlp"
echo " Executa build DEV do wlp.git"
echo " --assine"
echo " Executa build DEV do assineja.git"
echo ""
}
if [ $# -eq 0 ]; then
help
exit
fi
if [[ "$@" == *"--cms"* ]]; then
echo -n "Executando build DEV do cms.git"
echo -n "..."
curl http://5.8.9.247:8081/view/CMS/job/CMS%20DEV/build?token=CMS_TOKEN -Ss && echo "[OK]"
fi
if [[ "$@" == *"--wlp"* ]]; then
echo -n "Executando build DEV do wlp.git"
echo -n "..."
curl http://5.8.9.247:8081/view/WLP/job/WLP%20DEV/build?token=WLP_TOKEN -Ss && echo "[OK]"
fi
if [[ "$@" == *"--assine"* ]]; then
echo -n "Executando build DEV do assineja.git"
echo -n "..."
curl http://5.8.9.247:8081/view/Assine-ja/job/Assine-ja%20DEV/build?token=ASSINE_TOKEN -Ss && echo "[OK]"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment