initial
This commit is contained in:
commit
0574ec0b70
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
build/
|
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM alpine:3.13
|
||||
# Install cwebp and avifenc
|
||||
RUN apk -U add libwebp-tools libavif-apps dav1d # rav1e #(soon?)
|
||||
ADD ./generate_all /usr/bin/generate_all
|
||||
RUN mkdir /src
|
||||
WORKDIR /src
|
||||
|
||||
CMD ["/usr/bin/generate_all"]
|
29
Jenkinsfile
vendored
Normal file
29
Jenkinsfile
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('Cloning our Git') {
|
||||
steps {
|
||||
checkout([$class: 'GitSCM',
|
||||
branches: [[name: '*/master']],
|
||||
doGenerateSubmoduleConfigurations: false,
|
||||
extensions: [[$class: 'SubmoduleOption',
|
||||
disableSubmodules: false,
|
||||
parentCredentials: false,
|
||||
recursiveSubmodules: true,
|
||||
reference: '',
|
||||
trackingSubmodules: false]],
|
||||
submoduleCfg: [],
|
||||
userRemoteConfigs: [[url: 'https://git.tobiasmanske.de/user/rad4day/public/docker-alpine-avif-webp/']]])
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build HTML') {
|
||||
steps {
|
||||
dockerImage = docker.build("alpine-avif-webp:latest")
|
||||
docker.withRegistry('https://registry.chaoswg.org:5000', 'docker-registry-credentials') {
|
||||
dockerImage.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
3
generate_all
Executable file
3
generate_all
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
find ./ -type f -name '*.jpg' -exec sh -c 'cwebp $1 -o "${1%.jpg}.webp"' _ {} \;
|
||||
find ./ -type f -name '*.png' -exec sh -c 'avifenc --min 10 --max 30 $1 "${1%.png}.avif"' _ {} \;
|
Loading…
Reference in New Issue
Block a user