Skip to content

Commit 75f9fe4

Browse files
committed
formatting
1 parent 2f94224 commit 75f9fe4

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

hack/update-jenkins-library

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
33

44
# Copy the jenkins file contents the shared library
5-
# Can be used to update the release by setting
5+
# Can be used to update the release by setting
66
# JENKIN_SHARED_LIB_USER=redhat-appstudio
77
# JENKIN_SHARED_LIB_BRANCH=main
8-
# For dev the default is MY_GITHUB_USER and dev branch
9-
# see ci-test for branch munging in scripts
8+
# For dev the default is MY_GITHUB_USER and dev branch
9+
# see ci-test for branch munging in scripts
1010
# JENKIN_SHARED_LIB_USER=$MY_GITHUB_USER
1111
# JENKIN_SHARED_LIB_BRANCH=dev
1212

@@ -16,26 +16,25 @@ JENKIN_SHARED_LIB_BRANCH=${JENKIN_SHARED_LIB_BRANCH:-dev}
1616
echo "Updating Jenkins shared lib for $JENKIN_SHARED_LIB_USER in branch $JENKIN_SHARED_LIB_BRANCH"
1717

1818
WORKDIR=$(mktemp -d)
19-
JENKINS_SHARED_LIB=$WORKDIR/jenkins-library
20-
REPO=https://github.com/$JENKIN_SHARED_LIB_USER/tssc-sample-jenkins
19+
JENKINS_SHARED_LIB=$WORKDIR/jenkins-library
20+
REPO=https://github.com/$JENKIN_SHARED_LIB_USER/tssc-sample-jenkins
2121

2222
MULTI_CI=$(pwd)
2323
GEN_SRC=$MULTI_CI/generated/source-repo
2424
GEN_GITOPS=$MULTI_CI/generated/gitops-template
2525

26-
git clone --quiet $REPO $JENKINS_SHARED_LIB
26+
git clone --quiet $REPO $JENKINS_SHARED_LIB
2727
cd $JENKINS_SHARED_LIB
28-
if [ `git rev-parse --verify $JENKIN_SHARED_LIB_BRANCH 2>/dev/null` ]
29-
then
28+
if [ $(git rev-parse --verify $JENKIN_SHARED_LIB_BRANCH 2> /dev/null) ]; then
3029
echo "$JENKIN_SHARED_LIB_BRANCH exists"
31-
git checkout $JENKIN_SHARED_LIB_BRANCH
32-
git pull
30+
git checkout $JENKIN_SHARED_LIB_BRANCH
31+
git pull
3332
else
3433
echo "$JENKIN_SHARED_LIB_BRANCH branch created"
3534
git checkout -b $JENKIN_SHARED_LIB_BRANCH
3635
git branch --set-upstream-to=origin/$JENKIN_SHARED_LIB_BRANCH
3736
fi
38-
37+
3938
# copy scripts and groovy files in to proper locations
4039
# delete extra files - We should move these outside of ./rhtap
4140
# so we don't copy extra files by mistake
@@ -45,11 +44,10 @@ cp $MULTI_CI/rhtap.groovy $JENKINS_SHARED_LIB/vars
4544
# we should consider copying the Jenkins files for gitops and src into a jenkinsfile-samples
4645
# so the latest Jenkinsfile is up to date in the library
4746
rm -rf $JENKINS_SHARED_LIB/resources/env.template.sh
48-
rm -rf $JENKINS_SHARED_LIB/resources/signing-secret-env.sh
47+
rm -rf $JENKINS_SHARED_LIB/resources/signing-secret-env.sh
4948
git add .
5049
git commit -m "Jenkins library update from tssc-dev-multi-ci"
5150
git status
52-
pwd
51+
pwd
5352
git pull
54-
git push --set-upstream origin $JENKIN_SHARED_LIB_BRANCH
55-
53+
git push --set-upstream origin $JENKIN_SHARED_LIB_BRANCH

0 commit comments

Comments
 (0)