-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Used one dockerfile to simplify build and release
Closes #5
- Loading branch information
1 parent
1cb74a1
commit 8a4dc0a
Showing
9 changed files
with
101 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
11 changes: 4 additions & 7 deletions
11
docker/Drone.Dockerfile → docker/Dockerfile
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
FROM openjdk:8-jre-alpine | ||
|
||
MAINTAINER 'Devaprasadh.Xavier <devatherock@gmail.com>' | ||
|
||
ENV PLUGIN_TARGET_BRANCH master | ||
ENV PLUGIN_DEBUG false | ||
|
||
ADD SyncGitRepos.jar /scripts/SyncGitRepos.jar | ||
ADD docker/drone-entry-point.sh /scripts/entry-point.sh | ||
LABEL maintainer="devatherock@gmail.com>" | ||
|
||
# Install git - Set the user as root for apk | ||
USER root | ||
RUN apk --update add git openssh | ||
|
||
ADD SyncGitRepos.jar /scripts/SyncGitRepos.jar | ||
ADD docker/entry-point.sh /scripts/entry-point.sh | ||
|
||
ENTRYPOINT sh /scripts/entry-point.sh |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/bin/sh | ||
|
||
TARGET_BRANCH=master | ||
if [ ! -z "$PLUGIN_TARGET_BRANCH" ]; then | ||
TARGET_BRANCH=$PLUGIN_TARGET_BRANCH | ||
elif [ ! -z "$PARAMETER_TARGET_BRANCH" ]; then | ||
TARGET_BRANCH=$PARAMETER_TARGET_BRANCH | ||
fi | ||
|
||
ENABLE_DEBUG=false | ||
if [ "$PLUGIN_DEBUG" = "true" ] || [ "$PARAMETER_DEBUG" = "true" ]; then | ||
ENABLE_DEBUG=true | ||
fi | ||
|
||
if [ ! -z "$PLUGIN_TARGET_REPO" ]; then | ||
TARGET_REPO=$PLUGIN_TARGET_REPO | ||
elif [ ! -z "$PARAMETER_TARGET_REPO" ]; then | ||
TARGET_REPO=$PARAMETER_TARGET_REPO | ||
fi | ||
|
||
if [ ! -z "$PLUGIN_START_COMMIT" ]; then | ||
START_COMMIT=$PLUGIN_START_COMMIT | ||
elif [ ! -z "$PARAMETER_START_COMMIT" ]; then | ||
START_COMMIT=$PARAMETER_START_COMMIT | ||
fi | ||
|
||
if [ ! -z "$DRONE_COMMIT_AUTHOR" ]; then | ||
USERNAME=$DRONE_COMMIT_AUTHOR | ||
elif [ ! -z "$BUILD_AUTHOR" ]; then | ||
USERNAME=$BUILD_AUTHOR | ||
elif [ ! -z "$CIRCLE_USERNAME" ]; then | ||
USERNAME=$CIRCLE_USERNAME | ||
fi | ||
|
||
if [ ! -z "$DRONE_COMMIT_AUTHOR_EMAIL" ]; then | ||
EMAIL=$DRONE_COMMIT_AUTHOR_EMAIL | ||
elif [ ! -z "$BUILD_AUTHOR_EMAIL" ]; then | ||
EMAIL=$BUILD_AUTHOR_EMAIL | ||
fi | ||
|
||
ALL_OPTS="-tb $TARGET_BRANCH --debug $ENABLE_DEBUG -t $GIT_SYNC_TOKEN" | ||
|
||
if [ ! -z "$TARGET_REPO" ]; then | ||
ALL_OPTS="$ALL_OPTS -tr $TARGET_REPO" | ||
fi | ||
|
||
if [ ! -z "$START_COMMIT" ]; then | ||
ALL_OPTS="$ALL_OPTS -sc $START_COMMIT" | ||
fi | ||
|
||
if [ ! -z "$USERNAME" ]; then | ||
ALL_OPTS="$ALL_OPTS -n $USERNAME" | ||
fi | ||
|
||
if [ ! -z "$EMAIL" ]; then | ||
ALL_OPTS="$ALL_OPTS -e $EMAIL" | ||
fi | ||
|
||
java -jar /scripts/SyncGitRepos.jar $ALL_OPTS |
This file was deleted.
Oops, something went wrong.