merged lein & cljs image together to a clojure image. Added graalvm support
This commit is contained in:
parent
5df2ddeeca
commit
3e760b4ed0
9 changed files with 39 additions and 132 deletions
2
infrastructure/clojure/image/resources/CHECKSUMS
Normal file
2
infrastructure/clojure/image/resources/CHECKSUMS
Normal file
|
@ -0,0 +1,2 @@
|
|||
d7a5cb848b783c15119316d716d8a74bf11c9e3ab050f3adf28e0678a6018467 kubeconform-v0.4.7.tar.gz
|
||||
bbd3e03025168172a76c2a29e6a14c1c37e3476b30774259c3ef5952fb86f470 graalvm-ce-java11-linux-amd64-21.2.0.tar.gz
|
37
infrastructure/clojure/image/resources/install.sh
Executable file
37
infrastructure/clojure/image/resources/install.sh
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
function main() {
|
||||
upgradeSystem
|
||||
|
||||
mkdir -p /usr/share/man/man1
|
||||
apt -qqy install openjdk-11-jre-headless leiningen curl build-essential libz-dev zlib1g-dev
|
||||
|
||||
# shadow-cljs
|
||||
npm install -g --save-dev shadow-cljs
|
||||
|
||||
# kubeconform & graalvm
|
||||
curl -Lo /tmp/kubeconform-v0.4.7.tar.gz https://github.com/yannh/kubeconform/releases/download/v0.4.7/kubeconform-linux-amd64.tar.gz
|
||||
curl -Lo /tmp/graalvm-ce-java11-linux-amd64-21.2.0.tar.gz https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.2.0/graalvm-ce-java11-linux-amd64-21.2.0.tar.gz
|
||||
|
||||
cd /tmp
|
||||
sha256sum --check CHECKSUMS
|
||||
|
||||
tar -xf /tmp/kubeconform-v0.4.7.tar.gz
|
||||
cp kubeconform /usr/local/bin
|
||||
|
||||
tar -xzf graalvm-ce-java11-linux-amd64-21.2.0.tar.gz
|
||||
mv graalvm-ce-java11-21.2.0 /usr/lib/jvm/
|
||||
ln -s /usr/lib/jvm/graalvm-ce-java11-21.2.0 /usr/lib/jvm/graalvm
|
||||
ln -s /usr/lib/jvm/graalvm/bin/gu /usr/local/bin
|
||||
|
||||
update-alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm/bin/java 2
|
||||
|
||||
gu install native-image
|
||||
ln -s /usr/lib/jvm/graalvm/bin/native-image /usr/local/bin
|
||||
|
||||
cleanupDocker
|
||||
}
|
||||
|
||||
source /tmp/install_functions.sh
|
||||
main
|
|
@ -1,46 +0,0 @@
|
|||
from subprocess import run
|
||||
from os import environ
|
||||
from pybuilder.core import task, init
|
||||
from ddadevops import *
|
||||
import logging
|
||||
|
||||
name = 'lein'
|
||||
MODULE = 'lein'
|
||||
PROJECT_ROOT_PATH = '../..'
|
||||
|
||||
|
||||
class MyBuild(DevopsDockerBuild):
|
||||
pass
|
||||
|
||||
@init
|
||||
def initialize(project):
|
||||
project.build_depends_on('ddadevops>=0.8.19')
|
||||
stage = 'notused'
|
||||
dockerhub_user = gopass_field_from_path('meissa/web/docker.com', 'login')
|
||||
dockerhub_password = gopass_password_from_path('meissa/web/docker.com')
|
||||
config = create_devops_docker_build_config(
|
||||
stage, PROJECT_ROOT_PATH, MODULE, dockerhub_user, dockerhub_password)
|
||||
build = MyBuild(project, config)
|
||||
build.initialize_build_dir()
|
||||
|
||||
|
||||
@task
|
||||
def image(project):
|
||||
build = get_devops_build(project)
|
||||
build.image()
|
||||
|
||||
@task
|
||||
def drun(project):
|
||||
build = get_devops_build(project)
|
||||
build.drun()
|
||||
|
||||
@task
|
||||
def test(project):
|
||||
build = get_devops_build(project)
|
||||
build.test()
|
||||
|
||||
@task
|
||||
def publish(project):
|
||||
build = get_devops_build(project)
|
||||
build.dockerhub_login()
|
||||
build.dockerhub_publish()
|
|
@ -1 +0,0 @@
|
|||
d7a5cb848b783c15119316d716d8a74bf11c9e3ab050f3adf28e0678a6018467 kubeconform.tar.gz
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
function main() {
|
||||
upgradeSystem
|
||||
|
||||
mkdir -p /usr/share/man/man1
|
||||
apt -qqy install openjdk-11-jre-headless leiningen curl
|
||||
|
||||
curl -Lo /tmp/kubeconform.tar.gz https://github.com/yannh/kubeconform/releases/download/v0.4.7/kubeconform-linux-amd64.tar.gz
|
||||
|
||||
cd /tmp
|
||||
sha256sum --check CHECKSUMS
|
||||
|
||||
tar -xf /tmp/kubeconform.tar.gz
|
||||
cp kubeconform /usr/local/bin
|
||||
|
||||
cleanupDocker
|
||||
}
|
||||
|
||||
source /tmp/install_functions.sh
|
||||
main
|
|
@ -1,46 +0,0 @@
|
|||
from subprocess import run
|
||||
from os import environ
|
||||
from pybuilder.core import task, init
|
||||
from ddadevops import *
|
||||
import logging
|
||||
|
||||
name = 'shadow-cljs'
|
||||
MODULE = 'shadow-cljs'
|
||||
PROJECT_ROOT_PATH = '../..'
|
||||
|
||||
|
||||
class MyBuild(DevopsDockerBuild):
|
||||
pass
|
||||
|
||||
@init
|
||||
def initialize(project):
|
||||
project.build_depends_on('ddadevops>=0.8.19')
|
||||
stage = 'notused'
|
||||
dockerhub_user = gopass_field_from_path('meissa/web/docker.com', 'login')
|
||||
dockerhub_password = gopass_password_from_path('meissa/web/docker.com')
|
||||
config = create_devops_docker_build_config(
|
||||
stage, PROJECT_ROOT_PATH, MODULE, dockerhub_user, dockerhub_password)
|
||||
build = MyBuild(project, config)
|
||||
build.initialize_build_dir()
|
||||
|
||||
|
||||
@task
|
||||
def image(project):
|
||||
build = get_devops_build(project)
|
||||
build.image()
|
||||
|
||||
@task
|
||||
def drun(project):
|
||||
build = get_devops_build(project)
|
||||
build.drun()
|
||||
|
||||
@task
|
||||
def test(project):
|
||||
build = get_devops_build(project)
|
||||
build.test()
|
||||
|
||||
@task
|
||||
def publish(project):
|
||||
build = get_devops_build(project)
|
||||
build.dockerhub_login()
|
||||
build.dockerhub_publish()
|
|
@ -1,4 +0,0 @@
|
|||
FROM node:lts-buster-slim
|
||||
|
||||
ADD resources /tmp
|
||||
RUN /tmp/install.sh
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
function main() {
|
||||
mkdir -p /usr/share/man/man1
|
||||
apt update && apt -qqy install openjdk-11-jre-headless
|
||||
npm install -g --save-dev shadow-cljs
|
||||
|
||||
cleanupDocker
|
||||
}
|
||||
|
||||
source /tmp/install_functions.sh
|
||||
main
|
Loading…
Reference in a new issue