parent
10182efea1
commit
7f80f4c6e9
8 changed files with 1676 additions and 1716 deletions
|
|
@ -1,25 +1,69 @@
|
||||||
default:
|
stages:
|
||||||
# Template project: https://gitlab.com/pages/jekyll
|
- build
|
||||||
# Docs: https://docs.gitlab.com/ee/pages/
|
- test
|
||||||
image: ruby:3.2
|
- publish
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
.any-job:
|
||||||
|
rules:
|
||||||
|
- if: $CI_SERVER_HOST == "gitlab.mnl.de"
|
||||||
|
|
||||||
|
.gradle-job:
|
||||||
|
extends: .any-job
|
||||||
|
image: registry.mnl.de/org/jgrapes/jdk21-builder:v2
|
||||||
|
cache:
|
||||||
|
- key: dependencies
|
||||||
|
policy: pull-push
|
||||||
|
paths:
|
||||||
|
- .gradle
|
||||||
|
- node_modules
|
||||||
|
- key: "$CI_COMMIT_SHA"
|
||||||
|
policy: pull-push
|
||||||
|
paths:
|
||||||
|
- build
|
||||||
|
- "*/build"
|
||||||
|
before_script:
|
||||||
|
- echo -n $CI_REGISTRY_PASSWORD | podman login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
|
||||||
|
- git switch $CI_COMMIT_REF_NAME
|
||||||
|
- git pull
|
||||||
|
- git reset --hard $CI_COMMIT_SHA
|
||||||
|
|
||||||
|
build-jars:
|
||||||
|
stage: build
|
||||||
|
extends: .gradle-job
|
||||||
|
script:
|
||||||
|
- ./gradlew -Pdocker.registry=$CI_REGISTRY_IMAGE build apidocs
|
||||||
|
|
||||||
|
publish-images:
|
||||||
|
stage: publish
|
||||||
|
extends: .gradle-job
|
||||||
|
script:
|
||||||
|
- ./gradlew -Pdocker.registry=$CI_REGISTRY_IMAGE pushImage
|
||||||
|
|
||||||
|
.pages-job:
|
||||||
|
extends: .any-job
|
||||||
|
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/ruby:3.2
|
||||||
|
variables:
|
||||||
|
JEKYLL_ENV: production
|
||||||
|
LC_ALL: C.UTF-8
|
||||||
before_script:
|
before_script:
|
||||||
- git fetch origin gh-pages
|
- git fetch origin gh-pages
|
||||||
- git checkout gh-pages
|
- git checkout gh-pages
|
||||||
- gem install bundler
|
- gem install bundler
|
||||||
- bundle install
|
- bundle install
|
||||||
variables:
|
|
||||||
JEKYLL_ENV: production
|
test-pages:
|
||||||
LC_ALL: C.UTF-8
|
|
||||||
test:
|
|
||||||
stage: test
|
stage: test
|
||||||
|
extends: .pages-job
|
||||||
script:
|
script:
|
||||||
- bundle exec jekyll build -d test
|
- bundle exec jekyll build -d test
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- test
|
- test
|
||||||
|
|
||||||
pages:
|
publish-pages:
|
||||||
stage: deploy
|
stage: publish
|
||||||
|
extends: .pages-job
|
||||||
script:
|
script:
|
||||||
- bundle exec jekyll build -d public
|
- bundle exec jekyll build -d public
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
|
||||||
1
gradle.properties
Normal file
1
gradle.properties
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
org.gradle.parallel=true
|
||||||
|
|
@ -45,45 +45,36 @@ application {
|
||||||
mainClass = 'org.jdrupes.vmoperator.manager.Manager'
|
mainClass = 'org.jdrupes.vmoperator.manager.Manager'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
project.ext.gitBranch = grgit.branch.current.name.replace('/', '-')
|
||||||
|
|
||||||
task buildImage(type: Exec) {
|
task buildImage(type: Exec) {
|
||||||
dependsOn installDist
|
dependsOn installDist
|
||||||
inputs.files 'src/org/jdrupes/vmoperator/manager/Containerfile'
|
inputs.files 'src/org/jdrupes/vmoperator/manager/Containerfile'
|
||||||
|
|
||||||
commandLine 'podman', 'build', '--pull',
|
commandLine 'podman', 'build', '--pull',
|
||||||
'-t', "${project.name}:${project.version}",\
|
'-t', "${project.name}:${project.gitBranch}",\
|
||||||
'-f', 'src/org/jdrupes/vmoperator/manager/Containerfile', '.'
|
'-f', 'src/org/jdrupes/vmoperator/manager/Containerfile', '.'
|
||||||
}
|
}
|
||||||
|
|
||||||
task tagLatestImage(type: Exec) {
|
|
||||||
dependsOn buildImage
|
|
||||||
|
|
||||||
enabled = !project.version.contains("SNAPSHOT")
|
|
||||||
&& !project.version.contains("alpha") \
|
|
||||||
&& !project.version.contains("beta") \
|
|
||||||
|| project.rootProject.properties['docker.testRegistry'] \
|
|
||||||
&& project.rootProject.properties['docker.registry'] \
|
|
||||||
== project.rootProject.properties['docker.testRegistry']
|
|
||||||
|
|
||||||
commandLine 'podman', 'tag', "${project.name}:${project.version}",\
|
|
||||||
"${project.name}:latest"
|
|
||||||
}
|
|
||||||
|
|
||||||
task buildLatestImage {
|
|
||||||
dependsOn buildImage
|
|
||||||
dependsOn tagLatestImage
|
|
||||||
}
|
|
||||||
|
|
||||||
task pushImage(type: Exec) {
|
task pushImage(type: Exec) {
|
||||||
dependsOn buildImage
|
dependsOn buildImage
|
||||||
|
// Don't push without testing first
|
||||||
|
dependsOn test
|
||||||
|
|
||||||
|
def registry = "${project.rootProject.properties['docker.registry']}"
|
||||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||||
"localhost/${project.name}:${project.version}", \
|
"localhost/${project.name}:${project.gitBranch}", \
|
||||||
"${project.rootProject.properties['docker.registry']}" \
|
"${registry}/${project.name}:${project.gitBranch}"
|
||||||
+ "/${project.name}:${project.version}"
|
|
||||||
|
if (!project.version.contains("SNAPSHOT")) {
|
||||||
|
commandLine 'podman', 'tag', \
|
||||||
|
"${registry}/${project.name}:${project.gitBranch}",\
|
||||||
|
"${registry}/${project.name}:${project.version}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task pushLatestImage(type: Exec) {
|
task tagAsLatest(type: Exec) {
|
||||||
dependsOn buildLatestImage
|
dependsOn pushImage
|
||||||
|
|
||||||
enabled = !project.version.contains("SNAPSHOT")
|
enabled = !project.version.contains("SNAPSHOT")
|
||||||
&& !project.version.contains("alpha") \
|
&& !project.version.contains("alpha") \
|
||||||
|
|
@ -92,28 +83,21 @@ task pushLatestImage(type: Exec) {
|
||||||
&& project.rootProject.properties['docker.registry'] \
|
&& project.rootProject.properties['docker.registry'] \
|
||||||
== project.rootProject.properties['docker.testRegistry']
|
== project.rootProject.properties['docker.testRegistry']
|
||||||
|
|
||||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
def registry = "${project.rootProject.properties['docker.registry']}"
|
||||||
"localhost/${project.name}:${project.version}", \
|
commandLine 'podman', 'tag', \
|
||||||
"${project.rootProject.properties['docker.registry']}" \
|
"${registry}/${project.name}:${project.version}",\
|
||||||
+ "/${project.name}:latest"
|
"${registry}/${project.name}:latest"
|
||||||
}
|
}
|
||||||
|
|
||||||
task pushForTest(type: Exec) {
|
task pushForTest(type: Exec) {
|
||||||
dependsOn buildImage
|
dependsOn buildImage
|
||||||
|
|
||||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||||
"localhost/${project.name}:${project.version}", \
|
"localhost/${project.name}:${project.gitBranch}", \
|
||||||
"${project.rootProject.properties['docker.registry']}" \
|
"${project.rootProject.properties['docker.testRegistry']}" \
|
||||||
+ "/${project.name}:test"
|
+ "/${project.name}:test"
|
||||||
}
|
}
|
||||||
|
|
||||||
task pushImages {
|
|
||||||
// Don't push without testing first
|
|
||||||
dependsOn test
|
|
||||||
dependsOn pushImage
|
|
||||||
dependsOn pushLatestImage
|
|
||||||
}
|
|
||||||
|
|
||||||
test {
|
test {
|
||||||
enabled = project.hasProperty("k8s.testCluster")
|
enabled = project.hasProperty("k8s.testCluster")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,45 +31,34 @@ application {
|
||||||
mainClass = 'org.jdrupes.vmoperator.runner.qemu.Runner'
|
mainClass = 'org.jdrupes.vmoperator.runner.qemu.Runner'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
project.ext.gitBranch = grgit.branch.current.name.replace('/', '-')
|
||||||
|
|
||||||
task buildArchImage(type: Exec) {
|
task buildArchImage(type: Exec) {
|
||||||
dependsOn installDist
|
dependsOn installDist
|
||||||
inputs.files 'src/org/jdrupes/vmoperator/runner/qemu/Containerfile.arch'
|
inputs.files 'src/org/jdrupes/vmoperator/runner/qemu/Containerfile.arch'
|
||||||
|
|
||||||
commandLine 'podman', 'build', '--pull',
|
commandLine 'podman', 'build', '--pull',
|
||||||
'-t', "${project.name}-arch:${project.version}",\
|
'-t', "${project.name}-arch:${project.gitBranch}",\
|
||||||
'-f', 'src/org/jdrupes/vmoperator/runner/qemu/Containerfile.arch', '.'
|
'-f', 'src/org/jdrupes/vmoperator/runner/qemu/Containerfile.arch', '.'
|
||||||
}
|
}
|
||||||
|
|
||||||
task tagLatestArchImage(type: Exec) {
|
|
||||||
dependsOn buildArchImage
|
|
||||||
|
|
||||||
enabled = !project.version.contains("SNAPSHOT")
|
|
||||||
&& !project.version.contains("alpha") \
|
|
||||||
&& !project.version.contains("beta") \
|
|
||||||
|| project.rootProject.properties['docker.testRegistry'] \
|
|
||||||
&& project.rootProject.properties['docker.registry'] \
|
|
||||||
== project.rootProject.properties['docker.testRegistry']
|
|
||||||
|
|
||||||
commandLine 'podman', 'tag', "${project.name}-arch:${project.version}",\
|
|
||||||
"${project.name}-arch:latest"
|
|
||||||
}
|
|
||||||
|
|
||||||
task buildLatestArchImage {
|
|
||||||
dependsOn buildArchImage
|
|
||||||
dependsOn tagLatestArchImage
|
|
||||||
}
|
|
||||||
|
|
||||||
task pushArchImage(type: Exec) {
|
task pushArchImage(type: Exec) {
|
||||||
dependsOn buildArchImage
|
dependsOn buildArchImage
|
||||||
|
|
||||||
|
def registry = "${project.rootProject.properties['docker.registry']}"
|
||||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||||
"localhost/${project.name}-arch:${project.version}", \
|
"localhost/${project.name}-arch:${project.gitBranch}", \
|
||||||
"${project.rootProject.properties['docker.registry']}" \
|
"${registry}/${project.name}-arch:${project.gitBranch}"
|
||||||
+ "/${project.name}-arch:${project.version}"
|
|
||||||
|
if (!project.version.contains("SNAPSHOT")) {
|
||||||
|
commandLine 'podman', 'tag', \
|
||||||
|
"${registry}/${project.name}-arch:${project.gitBranch}",\
|
||||||
|
"${registry}/${project.name}-arch:${project.version}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task pushArchLatestImage(type: Exec) {
|
task tagAsLatestArch(type: Exec) {
|
||||||
dependsOn buildLatestArchImage
|
dependsOn pushArchImage
|
||||||
|
|
||||||
enabled = !project.version.contains("SNAPSHOT")
|
enabled = !project.version.contains("SNAPSHOT")
|
||||||
&& !project.version.contains("alpha") \
|
&& !project.version.contains("alpha") \
|
||||||
|
|
@ -78,10 +67,10 @@ task pushArchLatestImage(type: Exec) {
|
||||||
&& project.rootProject.properties['docker.registry'] \
|
&& project.rootProject.properties['docker.registry'] \
|
||||||
== project.rootProject.properties['docker.testRegistry']
|
== project.rootProject.properties['docker.testRegistry']
|
||||||
|
|
||||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
def registry = "${project.rootProject.properties['docker.registry']}"
|
||||||
"localhost/${project.name}-arch:${project.version}", \
|
commandLine 'podman', 'tag', \
|
||||||
"${project.rootProject.properties['docker.registry']}" \
|
"${registry}/${project.name}-arch:${project.version}",\
|
||||||
+ "/${project.name}-arch:latest"
|
"${registry}/${project.name}-arch:latest"
|
||||||
}
|
}
|
||||||
|
|
||||||
task buildAlpineImage(type: Exec) {
|
task buildAlpineImage(type: Exec) {
|
||||||
|
|
@ -89,40 +78,27 @@ task buildAlpineImage(type: Exec) {
|
||||||
inputs.files 'src/org/jdrupes/vmoperator/runner/qemu/Containerfile.alpine'
|
inputs.files 'src/org/jdrupes/vmoperator/runner/qemu/Containerfile.alpine'
|
||||||
|
|
||||||
commandLine 'podman', 'build', '--pull',
|
commandLine 'podman', 'build', '--pull',
|
||||||
'-t', "${project.name}-alpine:${project.version}",\
|
'-t', "${project.name}-alpine:${project.gitBranch}",\
|
||||||
'-f', 'src/org/jdrupes/vmoperator/runner/qemu/Containerfile.alpine', '.'
|
'-f', 'src/org/jdrupes/vmoperator/runner/qemu/Containerfile.alpine', '.'
|
||||||
}
|
}
|
||||||
|
|
||||||
task tagLatestAlpineImage(type: Exec) {
|
|
||||||
dependsOn buildAlpineImage
|
|
||||||
|
|
||||||
enabled = !project.version.contains("SNAPSHOT")
|
|
||||||
&& !project.version.contains("alpha") \
|
|
||||||
&& !project.version.contains("beta") \
|
|
||||||
|| project.rootProject.properties['docker.testRegistry'] \
|
|
||||||
&& project.rootProject.properties['docker.registry'] \
|
|
||||||
== project.rootProject.properties['docker.testRegistry']
|
|
||||||
|
|
||||||
commandLine 'podman', 'tag', "${project.name}-alpine:${project.version}",\
|
|
||||||
"${project.name}-alpine:latest"
|
|
||||||
}
|
|
||||||
|
|
||||||
task buildLatestAlpineImage {
|
|
||||||
dependsOn buildAlpineImage
|
|
||||||
dependsOn tagLatestAlpineImage
|
|
||||||
}
|
|
||||||
|
|
||||||
task pushAlpineImage(type: Exec) {
|
task pushAlpineImage(type: Exec) {
|
||||||
dependsOn buildAlpineImage
|
dependsOn buildAlpineImage
|
||||||
|
|
||||||
|
def registry = "${project.rootProject.properties['docker.registry']}"
|
||||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||||
"localhost/${project.name}-alpine:${project.version}", \
|
"localhost/${project.name}-alpine:${project.gitBranch}", \
|
||||||
"${project.rootProject.properties['docker.registry']}" \
|
"${registry}/${project.name}-alpine:${project.gitBranch}"
|
||||||
+ "/${project.name}-alpine:${project.version}"
|
|
||||||
|
if (!project.version.contains("SNAPSHOT")) {
|
||||||
|
commandLine 'podman', 'tag', \
|
||||||
|
"${registry}/${project.name}-alpine:${project.gitBranch}",\
|
||||||
|
"${registry}/${project.name}-alpine:${project.version}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task pushAlpineLatestImage(type: Exec) {
|
task tagAsLatestAlpine(type: Exec) {
|
||||||
dependsOn buildLatestAlpineImage
|
dependsOn pushAlpineImage
|
||||||
|
|
||||||
enabled = !project.version.contains("SNAPSHOT")
|
enabled = !project.version.contains("SNAPSHOT")
|
||||||
&& !project.version.contains("alpha") \
|
&& !project.version.contains("alpha") \
|
||||||
|
|
@ -131,16 +107,19 @@ task pushAlpineLatestImage(type: Exec) {
|
||||||
&& project.rootProject.properties['docker.registry'] \
|
&& project.rootProject.properties['docker.registry'] \
|
||||||
== project.rootProject.properties['docker.testRegistry']
|
== project.rootProject.properties['docker.testRegistry']
|
||||||
|
|
||||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
def registry = "${project.rootProject.properties['docker.registry']}"
|
||||||
"localhost/${project.name}-alpine:${project.version}", \
|
commandLine 'podman', 'tag', \
|
||||||
"${project.rootProject.properties['docker.registry']}" \
|
"${registry}/${project.name}-alpine:${project.version}",\
|
||||||
+ "/${project.name}-alpine:latest"
|
"${registry}/${project.name}-alpine:latest"
|
||||||
}
|
}
|
||||||
|
|
||||||
task pushImages {
|
task pushImage {
|
||||||
dependsOn pushArchImage
|
dependsOn pushArchImage
|
||||||
dependsOn pushArchLatestImage
|
|
||||||
dependsOn pushAlpineImage
|
dependsOn pushAlpineImage
|
||||||
dependsOn pushAlpineLatestImage
|
}
|
||||||
|
|
||||||
|
task tagAsLatest {
|
||||||
|
dependsOn tagAsLatestArch
|
||||||
|
dependsOn tagAsLatestAlpine
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
FROM archlinux/archlinux:latest
|
FROM docker.io/archlinux/archlinux:latest
|
||||||
|
|
||||||
RUN systemd-firstboot
|
RUN systemd-firstboot
|
||||||
|
|
||||||
|
|
|
||||||
3158
package-lock.json
generated
3158
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -21,6 +21,10 @@
|
||||||
"typedoc-plugin-missing-exports": "^2.1.0",
|
"typedoc-plugin-missing-exports": "^2.1.0",
|
||||||
"typescript": "^5.2.2"
|
"typescript": "^5.2.2"
|
||||||
},
|
},
|
||||||
|
"overrides": {
|
||||||
|
"node-gyp": "^10.1.0",
|
||||||
|
"glob": "^9.0.0"
|
||||||
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"root": true,
|
"root": true,
|
||||||
"extends": "eslint:recommended",
|
"extends": "eslint:recommended",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:3.19
|
FROM docker.io/alpine:3.19
|
||||||
|
|
||||||
RUN apk update &&\
|
RUN apk update &&\
|
||||||
apk add --no-cache inotify-tools &&\
|
apk add --no-cache inotify-tools &&\
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue