Browse Source

Initial commit

master
Drew Short 5 years ago
commit
f83a8a06f5
  1. 22
      Dockerfile
  2. 5
      README.md
  3. 24
      check_movies.sh
  4. 30
      pipeline.yml
  5. 11
      upload_pipeline.sh

22
Dockerfile

@ -0,0 +1,22 @@
FROM debian:buster-slim
LABEL maintainer="Drew Short <warrick@sothr.com>"
RUN mkdir -p /opt/checker \
/source
VOLUME /source
COPY . /opt/checker
RUN chmod +x /opt/checker/check_movies.sh
RUN apt-get -y update \
&& apt-get -y --no-install-recommends install \
bsdmainutils \
ffmpeg \
jq \
util-linux \
&& rm -Rf /var/lib/apt/lists/*
WORKDIR /opt/checker

5
README.md

@ -0,0 +1,5 @@
# Ren'Py Movie Checker
[![Concourse](https://concourse.nulloctet.com/api/v1/teams/docker/pipelines/renpy-movie-checker/jobs/build-image/badge)](https://concourse.nulloctet.com/teams/docker/pipelines/renpy-movie-checker)
Docker image build for checking renpy movies

24
check_movies.sh

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -e
usage(){
echo "usage: check_movies.sh <source directory>"
exit 1
}
start_dir=$(pwd)
source_dir="$1"
video_length_temp="$(mktemp)"
cd "$source_dir"
printf "File:\tLength:\n" > "$video_length_temp"
find . -type f -name "*.webm" | xargs -I{} ffprobe -v quiet -print_format json -show_format {} | jq -r '.format | "\(.filename)\t\(.duration)"' | cut -c 3- >> "$video_length_temp"
column -t < "$video_length_temp"
rm "$video_length_temp"
cd "$start_dir"
exit 0

30
pipeline.yml

@ -0,0 +1,30 @@
---
resources:
- name: git-resource
type: git
icon: git
source:
uri: https://git.nulloctet.com/docker/renpy-movie-checker.git
ignore_paths:
- pipeline.yml
- upload_pipeline.sh
- README.md
- name: git-resource-image
type: docker-image
icon: docker
source:
repository: ((nexus_docker_write.host))/sothr/renpy-movie-checker
username: ((nexus_docker_write.username))
password: ((nexus_docker_write.password))
jobs:
- name: build-image
plan:
- get: git-resource
trigger: true
- put: git-resource-image
params:
build: git-resource
tag_file: git-resource/tag
tag_as_latest: true
get_params: {skip_download: true}

11
upload_pipeline.sh

@ -0,0 +1,11 @@
#!/usr/bin/env bash
TEAM=docker
PIPELINE=renpy-movie-checker
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
pushd "${DIR}" || true
fly -t ${TEAM} set-pipeline --pipeline ${PIPELINE} --config pipeline.yml
popd || true
Loading…
Cancel
Save