Commit 1796dab7 by amir

jenkins scripts

parent 00944369
#bin/bash
[ -z "$1" ] && echo "Group name is Empty!!!"
echo "job: " $JOB_NAME
echo "git-url: " $GIT_URL
echo "group: " $1
echo "building docker image"
IMAGE_NAME=$gitlab_url:5050/$1/$JOB_NAME
docker build -t $IMAGE_NAME .
echo "tagging new image"
TAG_IMAGE_NAME=$IMAGE_NAME:$BUILD_NUMBER-$(echo $GIT_COMMIT | cut -c1-7)
echo "tag name: " $TAG_IMAGE_NAME
docker tag $IMAGE_NAME $TAG_IMAGE_NAME
docker login -u jenkins -p giptmgr1 $gitlab_url:5050
docker push $IMAGE_NAME
docker push $TAG_IMAGE_NAME
#bin/sh
echo "git revision:" > readme
echo $BUILD_NUMBER-$GIT_COMMIT >> readme
echo changes >> readme
#CHANGELOG=$(curl "$BUILD_URL/api/xml?wrapper=changes&xpath=//changeSet//comment" | sed -e "s/<\/comment>//g; s/<comment>/* /g; s/<\/*changes>//g" | sed '/^$/d;G')
CHANGELOG=$(git log -1 --pretty=%B)
echo $CHANGELOG >> readme
cat README.md >> readme
mv readme README.md
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment