Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
mengelmann committed May 21, 2020
0 parents commit 35dfbd0
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
.*
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ARG ALPINE_VERSION

FROM alpine:${ALPINE_VERSION}

ARG GITFTP_VERSION

CMD ["bash"]

# hadolint ignore=DL3018
RUN set -eux; \
apk add --no-cache \
bash \
curl \
git;

RUN set -eux; \
curl -fsSL -o /usr/local/bin/git-ftp "https://raw.githubusercontent.com/git-ftp/git-ftp/${GITFTP_VERSION}/git-ftp"; \
chmod +x /usr/local/bin/git-ftp
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 IMAGIN Sp. z o.o.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Lightweight Docker image with a git-ftp

An extremely lightweight and well versioned Docker image with a [git-ftp](https://git-ftp.github.io/) - git powered FTP client.

## Usage

```yaml
image: octivi/git-ftp:1.6.0-alpine3.11

pipelines:
default:
- step:
script:
- git ftp push -v --auto-init --user "${FTP_USER}" --passwd "${FTP_PASSWORD}" "${FTP_DESTINATION}"
```
39 changes: 39 additions & 0 deletions bin/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# Copyright (C) 2020 IMAGIN Sp. z o.o.
# Author: Marcin Engelmann <[email protected]>

# Unofficial Bash "Strict Mode" http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'

if (( $# < 1 )); then
echo "Usage: $0 <git-ftp version> <alpine linux version>"
exit 1
fi

command -v docker >/dev/null 2>&1 || { echo "docker not installed"; exit 2; }
command -v git >/dev/null 2>&1 || { echo "git not installed"; exit 2; }

GITFTP_VERSION="$1"
ALPINE_VERSION="$2"

docker build \
--tag "octivi/git-ftp:${GITFTP_VERSION}-alpine${ALPINE_VERSION}" \
--tag "octivi/git-ftp:latest" \
--build-arg "ALPINE_VERSION=${ALPINE_VERSION}" \
--build-arg "GITFTP_VERSION=${GITFTP_VERSION}" \
.

docker push "octivi/git-ftp:${GITFTP_VERSION}-alpine${ALPINE_VERSION}"
docker push "octivi/git-ftp:latest"

git tag \
-a \
-m "git-ftp version ${GITFTP_VERSION} on alpine linux version ${ALPINE_VERSION}" \
"${GITFTP_VERSION}-alpine${ALPINE_VERSION}"

cat <<EOF
Do not forget to run:
git push --tags
EOF

0 comments on commit 35dfbd0

Please sign in to comment.