Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

ci-cd using Travis CI #53

Merged
merged 1 commit into from
Dec 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/main/scripts/cd/before-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

DIRNAME=$(dirname $0)
BEFORE_DEPLOY_EXEC_FILES=$(find $DIRNAME -name 'before-deploy-*.sh')

echo Running $0
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*

Expand Down Expand Up @@ -57,3 +60,8 @@ function deployment {
}

deployment

# extends before-deploy.sh
for script_file in $BEFORE_DEPLOY_EXEC_FILES; do
source $script_file
done
11 changes: 10 additions & 1 deletion src/main/scripts/cd/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
#!/bin/sh
#!/usr/bin/env sh

DIRNAME=$(dirname $0)
DEPLOY_EXEC_FILES=$(find $DIRNAME -name 'deploy-*.sh')

echo Running $0
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*

mvn -P release deploy -DskipTests=true -B -V -s travis-settings.xml
pip install --user -r requirements.txt
$(dirname $0)/external_build.sh

# extends deploy.sh
for script_file in $DEPLOY_EXEC_FILES; do
source $script_file
done

9 changes: 8 additions & 1 deletion src/main/scripts/cd/release.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh
#!/usr/bin/env sh

DIRNAME=$(dirname $0)
RELEASE_EXEC_FILES=$(find $DIRNAME -name 'release-*.sh')

echo Running $0
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*
Expand All @@ -17,3 +19,8 @@ mvn -P release release:prepare release:perform -DautoVersionSubmodules=true -Dsc

mvn clean
commit_to_develop

# extends release.sh
for script_file in $RELEASE_EXEC_FILES; do
source $script_file
done
10 changes: 9 additions & 1 deletion src/main/scripts/ci/after-success.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
#!/usr/bin/env bash

DIRNAME=$(dirname $0)
AFTER_SUCCESS_EXEC_FILES=$(find $DIRNAME -name 'after-success-*.sh')

echo Running $0
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*
Expand All @@ -10,3 +12,9 @@ else
find -name jacoco.xml | xargs -i java -jar ~/codacy-coverage-reporter-assembly.jar report -l Java --partial -r {}
java -jar ~/codacy-coverage-reporter-assembly.jar final
fi;

# extends after-success.sh
for script_file in $AFTER_SUCCESS_EXEC_FILES; do
source $script_file
done

9 changes: 8 additions & 1 deletion src/main/scripts/ci/before-install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

DIRNAME=$(dirname $0)
BEFORE_INSTALL_EXEC_FILES=$(find $DIRNAME -name 'before-install-*.sh')

echo Running $0
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*
Expand All @@ -11,7 +13,7 @@ echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
latest=$(curl "https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/maven-metadata.xml" | xpath -e "/metadata/versioning/release/text()")

echo Downloading latest version $latest of codacy reporter from sonatype
# download laterst assembly jar
# download latest assembly jar
mvn dependency:get dependency:copy \
-DoutputDirectory=$HOME \
-DoutputAbsoluteArtifactFilename=true \
Expand All @@ -24,3 +26,8 @@ md5sum ~/codacy-coverage-reporter-assembly.jar
echo remote file md5sum:
curl "https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/$latest/codacy-coverage-reporter-$latest-assembly.jar.md5"

# extends before-install.sh
for script_file in $BEFORE_INSTALL_EXEC_FILES; do
source $script_file
done