-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding shell for alpine build, minor refactoring.
- Loading branch information
Showing
14 changed files
with
205 additions
and
78 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.idea | ||
*.iml | ||
target | ||
target |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,67 @@ | ||
#!/bin/bash | ||
|
||
case "$1" in | ||
|
||
# Commands from hugo | ||
|
||
"benchmark") | ||
hugo $@ | ||
;; | ||
|
||
"config") | ||
hugo $@ | ||
;; | ||
|
||
"convert") | ||
hugo $@ | ||
;; | ||
|
||
"env") | ||
hugo $@ | ||
;; | ||
|
||
"gen") | ||
hugo $@ | ||
;; | ||
|
||
"help") | ||
hugo $@ | ||
;; | ||
|
||
"import") | ||
hugo $@ | ||
;; | ||
|
||
"list") | ||
hugo $@ | ||
;; | ||
|
||
"new") | ||
hugo $@ | ||
;; | ||
|
||
"server") | ||
hugo server --bind=$HUGO_BIND $(echo $* | sed "s:^server::") | ||
;; | ||
|
||
"undraft") | ||
hugo $@ | ||
;; | ||
|
||
"version") | ||
hugo $@ | ||
;; | ||
|
||
# Commands special to docker image | ||
|
||
"shell") | ||
sh /shell.sh | ||
;; | ||
|
||
# Default build command | ||
|
||
*) | ||
hugo $@ --destination=$HUGO_DESTINATION | ||
;; | ||
|
||
esac |
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,26 @@ | ||
#!/bin/sh | ||
|
||
# Install bash | ||
apk --no-cache add bash bash-completion | ||
|
||
# Setting up autocomplete for hugo | ||
mkdir /etc/bash_completion.d | ||
hugo gen autocomplete > /dev/null | ||
|
||
# Creating .bashrc | ||
cat <<EOF > /root/.bashrc | ||
PS1="\e[1;32mhugo\e[m:\e[1;34m\w\e[m\$ " | ||
HOME=/src | ||
alias hugo="sh /run.sh" | ||
alias h="hugo" | ||
. /usr/share/bash-completion/bash_completion | ||
EOF | ||
|
||
# Notify user | ||
echo "Shell ready." | ||
echo | ||
|
||
# Start bash | ||
bash |
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,45 @@ | ||
#!/bin/bash | ||
|
||
if [ "$SOURCE_BRANCH" = "master" ]; then | ||
exit | ||
fi | ||
|
||
# Tag: alpine | ||
docker tag $IMAGE_NAME klakegg/hugo:alpine | ||
|
||
# Tag: [version]-alpine | ||
docker tag $IMAGE_NAME $DOCKER_REPO:$SOURCE_BRANCH-alpine | ||
docker push $DOCKER_REPO:$SOURCE_BRANCH-alpine | ||
|
||
|
||
# Generate Alpine onbuild image | ||
|
||
# Tag: alpine-onbuild | ||
docker build -t $DOCKER_REPO:alpine-onbuild -f Dockerfile-alpine-onbuild . | ||
docker push $DOCKER_REPO:alpine-onbuild | ||
|
||
# Tag: [version]-alpine-onbuild | ||
docker tag $DOCKER_REPO:alpine-onbuild $DOCKER_REPO:$SOURCE_BRANCH-alpine-onbuild | ||
docker push $DOCKER_REPO:$SOURCE_BRANCH-alpine-onbuild | ||
|
||
|
||
# Generate image for Asciidoctor | ||
|
||
# Tag: asciidoctor | ||
docker build -t $DOCKER_REPO:asciidoctor -f Dockerfile-asciidoctor . | ||
docker push $DOCKER_REPO:asciidoctor | ||
|
||
# Tag: [version]-asciidoctor | ||
docker tag $DOCKER_REPO:asciidoctor $DOCKER_REPO:$SOURCE_BRANCH-asciidoctor | ||
docker push $DOCKER_REPO:$SOURCE_BRANCH-asciidoctor | ||
|
||
|
||
# Generate Asciidoctor onbuild image | ||
|
||
# Tag: asciidoctor-onbuild | ||
docker build -t $DOCKER_REPO:asciidoctor-onbuild -f Dockerfile-asciidoctor-onbuild . | ||
docker push $DOCKER_REPO:asciidoctor-onbuild | ||
|
||
# Tag: [version]-asciidoctor-onbuild | ||
docker tag $DOCKER_REPO:asciidoctor-onbuild $DOCKER_REPO:$SOURCE_BRANCH-asciidoctor-onbuild | ||
docker push $DOCKER_REPO:$SOURCE_BRANCH-asciidoctor-onbuild |
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
File renamed without changes.
File renamed without changes.
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,36 @@ | ||
#!/bin/bash | ||
|
||
if [ "$SOURCE_BRANCH" = "master" ]; then | ||
exit | ||
fi | ||
|
||
# Tag: latest | ||
docker tag $IMAGE_NAME $DOCKER_REPO:latest | ||
docker push $DOCKER_REPO:latest | ||
|
||
# Tag: [version] | ||
docker tag $IMAGE_NAME $DOCKER_REPO:$SOURCE_BRANCH | ||
docker push $DOCKER_REPO:$SOURCE_BRANCH | ||
|
||
# Tag: [version]-busybox | ||
docker tag $IMAGE_NAME $DOCKER_REPO:$SOURCE_BRANCH-busybox | ||
docker push $DOCKER_REPO:$SOURCE_BRANCH-busybox | ||
|
||
|
||
# Generate Busybox onbuild image | ||
|
||
# Tag: busybox-onbuild | ||
docker build -t $DOCKER_REPO:busybox-onbuild -f Dockerfile-busybox-onbuild . | ||
docker push $DOCKER_REPO:busybox-onbuild | ||
|
||
# Tag: [version]-busybox-onbuild | ||
docker tag $DOCKER_REPO:busybox-onbuild $DOCKER_REPO:$SOURCE_BRANCH-busybox-onbuild | ||
docker push $DOCKER_REPO:$SOURCE_BRANCH-busybox-onbuild | ||
|
||
# Tag: [version]-onbuild | ||
docker tag $DOCKER_REPO:busybox-onbuild $DOCKER_REPO:$SOURCE_BRANCH-onbuild | ||
docker push $DOCKER_REPO:$SOURCE_BRANCH-onbuild | ||
|
||
# Tag: onbuild | ||
docker tag $DOCKER_REPO:busybox-onbuild $DOCKER_REPO:onbuild | ||
docker push $DOCKER_REPO:onbuild |
This file was deleted.
Oops, something went wrong.