Skip to content

Commit 3406417

Browse files
committed
Add CI build shell scripts.
1 parent 144894a commit 3406417

File tree

6 files changed

+68
-0
lines changed

6 files changed

+68
-0
lines changed

ci/check.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash -x
2+
3+
set -eou pipefail
4+
5+
GRADLE_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home -Djava.io.tmpdir=/tmp" \
6+
./gradlew clean check --no-daemon --refresh-dependencies --stacktrace

ci/cleanupArtifacts.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash -x
2+
3+
rm -Rf ./.gradle
4+
rm -Rf ./.m2
5+
rm -Rf `find . -name "build" | grep -v "src"`
6+
rm -Rf `find . -name "target" | grep -v "src"`
7+
exit 0

ci/cleanupGemFiles.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash -x
2+
3+
rm -Rf `find . -name "BACKUPDEFAULT*"`
4+
rm -Rf `find . -name "ConfigDiskDir*"`
5+
rm -Rf `find . -name "locator*" | grep -v "src" | grep -v "locator-application"`
6+
rm -Rf `find . -name "newDB"`
7+
rm -Rf `find . -name "server" | grep -v "src"`
8+
rm -Rf `find . -name "*.log"`
9+
exit 0

ci/deployArtifacts.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash -x
2+
3+
set -eou pipefail
4+
5+
echo "Deploying artifacts on host [$HOSTNAME]"
6+
7+
# User ID 1001 is "jenkins"
8+
# Group ID 1001 is "jenkins"
9+
# Syntax: `chown -R userId:groupId .`
10+
chown -R 1001:1001 .
11+
12+
GRADLE_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home -Djava.io.tmpdir=/tmp" \
13+
./gradlew deployArtifacts finalizeDeployArtifacts --no-build-cache --no-configuration-cache --no-daemon --stacktrace \
14+
-PartifactoryUsername=$ARTIFACTORY_USERNAME \
15+
-PartifactoryPassword=$ARTIFACTORY_PASSWORD \
16+
-PossrhUsername=$OSSRH_USERNAME \
17+
-PossrhPassword=$OSSRH_PASSWORD \
18+
-Psigning.keyId=$SPRING_SIGNING_KEYID \
19+
-Psigning.password=$SIGNING_PASSWORD \
20+
-Psigning.secretKeyRingFile=$SIGNING_KEYRING_FILE

ci/deployDocs.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash -x
2+
3+
set -eou pipefail
4+
5+
echo "Deploying docs on host [$HOSTNAME]"
6+
7+
# User ID 1001 is "jenkins"
8+
# Group ID 1001 is "jenkins"
9+
# Syntax: `chown -R userId:groupId .`
10+
chown -R 1001:1001 .
11+
12+
GRADLE_OPTS="--add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED -Duser.name=jenkins -Duser.home=/tmp/jenkins-home -Djava.io.tmpdir=/tmp" \
13+
./gradlew deployDocs --no-daemon --stacktrace \
14+
-PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY \
15+
-PdeployDocsSshUsername=$SPRING_DOCS_USERNAME

ci/setup.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash -x
2+
3+
# User ID 1001 is "jenkins"
4+
# Group ID 1001 is "jenkins"
5+
# Syntax: `chown -R userId:groupId .`
6+
7+
echo "Logged into Jenkins CI as user [$USER] with home directory [$HOME] in the current working directory [$PWD]"
8+
chown -R 1001:1001 .
9+
#echo "Logging into Docker..."
10+
#docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}
11+
exit 0

0 commit comments

Comments
 (0)