parent
10182efea1
commit
7f80f4c6e9
8 changed files with 1676 additions and 1716 deletions
|
|
@ -1,25 +1,69 @@
|
|||
default:
|
||||
# Template project: https://gitlab.com/pages/jekyll
|
||||
# Docs: https://docs.gitlab.com/ee/pages/
|
||||
image: ruby:3.2
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- 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:
|
||||
- git fetch origin gh-pages
|
||||
- git checkout gh-pages
|
||||
- gem install bundler
|
||||
- bundle install
|
||||
variables:
|
||||
JEKYLL_ENV: production
|
||||
LC_ALL: C.UTF-8
|
||||
test:
|
||||
|
||||
test-pages:
|
||||
stage: test
|
||||
extends: .pages-job
|
||||
script:
|
||||
- bundle exec jekyll build -d test
|
||||
artifacts:
|
||||
paths:
|
||||
- test
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
publish-pages:
|
||||
stage: publish
|
||||
extends: .pages-job
|
||||
script:
|
||||
- bundle exec jekyll build -d public
|
||||
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'
|
||||
}
|
||||
|
||||
project.ext.gitBranch = grgit.branch.current.name.replace('/', '-')
|
||||
|
||||
task buildImage(type: Exec) {
|
||||
dependsOn installDist
|
||||
inputs.files 'src/org/jdrupes/vmoperator/manager/Containerfile'
|
||||
|
||||
commandLine 'podman', 'build', '--pull',
|
||||
'-t', "${project.name}:${project.version}",\
|
||||
'-t', "${project.name}:${project.gitBranch}",\
|
||||
'-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) {
|
||||
dependsOn buildImage
|
||||
// Don't push without testing first
|
||||
dependsOn test
|
||||
|
||||
def registry = "${project.rootProject.properties['docker.registry']}"
|
||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||
"localhost/${project.name}:${project.version}", \
|
||||
"${project.rootProject.properties['docker.registry']}" \
|
||||
+ "/${project.name}:${project.version}"
|
||||
"localhost/${project.name}:${project.gitBranch}", \
|
||||
"${registry}/${project.name}:${project.gitBranch}"
|
||||
|
||||
if (!project.version.contains("SNAPSHOT")) {
|
||||
commandLine 'podman', 'tag', \
|
||||
"${registry}/${project.name}:${project.gitBranch}",\
|
||||
"${registry}/${project.name}:${project.version}"
|
||||
}
|
||||
}
|
||||
|
||||
task pushLatestImage(type: Exec) {
|
||||
dependsOn buildLatestImage
|
||||
task tagAsLatest(type: Exec) {
|
||||
dependsOn pushImage
|
||||
|
||||
enabled = !project.version.contains("SNAPSHOT")
|
||||
&& !project.version.contains("alpha") \
|
||||
|
|
@ -92,28 +83,21 @@ task pushLatestImage(type: Exec) {
|
|||
&& project.rootProject.properties['docker.registry'] \
|
||||
== project.rootProject.properties['docker.testRegistry']
|
||||
|
||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||
"localhost/${project.name}:${project.version}", \
|
||||
"${project.rootProject.properties['docker.registry']}" \
|
||||
+ "/${project.name}:latest"
|
||||
def registry = "${project.rootProject.properties['docker.registry']}"
|
||||
commandLine 'podman', 'tag', \
|
||||
"${registry}/${project.name}:${project.version}",\
|
||||
"${registry}/${project.name}:latest"
|
||||
}
|
||||
|
||||
task pushForTest(type: Exec) {
|
||||
dependsOn buildImage
|
||||
|
||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||
"localhost/${project.name}:${project.version}", \
|
||||
"${project.rootProject.properties['docker.registry']}" \
|
||||
"localhost/${project.name}:${project.gitBranch}", \
|
||||
"${project.rootProject.properties['docker.testRegistry']}" \
|
||||
+ "/${project.name}:test"
|
||||
}
|
||||
|
||||
task pushImages {
|
||||
// Don't push without testing first
|
||||
dependsOn test
|
||||
dependsOn pushImage
|
||||
dependsOn pushLatestImage
|
||||
}
|
||||
|
||||
test {
|
||||
enabled = project.hasProperty("k8s.testCluster")
|
||||
|
||||
|
|
|
|||
|
|
@ -31,45 +31,34 @@ application {
|
|||
mainClass = 'org.jdrupes.vmoperator.runner.qemu.Runner'
|
||||
}
|
||||
|
||||
project.ext.gitBranch = grgit.branch.current.name.replace('/', '-')
|
||||
|
||||
task buildArchImage(type: Exec) {
|
||||
dependsOn installDist
|
||||
inputs.files 'src/org/jdrupes/vmoperator/runner/qemu/Containerfile.arch'
|
||||
|
||||
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', '.'
|
||||
}
|
||||
|
||||
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) {
|
||||
dependsOn buildArchImage
|
||||
|
||||
def registry = "${project.rootProject.properties['docker.registry']}"
|
||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||
"localhost/${project.name}-arch:${project.version}", \
|
||||
"${project.rootProject.properties['docker.registry']}" \
|
||||
+ "/${project.name}-arch:${project.version}"
|
||||
"localhost/${project.name}-arch:${project.gitBranch}", \
|
||||
"${registry}/${project.name}-arch:${project.gitBranch}"
|
||||
|
||||
if (!project.version.contains("SNAPSHOT")) {
|
||||
commandLine 'podman', 'tag', \
|
||||
"${registry}/${project.name}-arch:${project.gitBranch}",\
|
||||
"${registry}/${project.name}-arch:${project.version}"
|
||||
}
|
||||
}
|
||||
|
||||
task pushArchLatestImage(type: Exec) {
|
||||
dependsOn buildLatestArchImage
|
||||
task tagAsLatestArch(type: Exec) {
|
||||
dependsOn pushArchImage
|
||||
|
||||
enabled = !project.version.contains("SNAPSHOT")
|
||||
&& !project.version.contains("alpha") \
|
||||
|
|
@ -78,10 +67,10 @@ task pushArchLatestImage(type: Exec) {
|
|||
&& project.rootProject.properties['docker.registry'] \
|
||||
== project.rootProject.properties['docker.testRegistry']
|
||||
|
||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||
"localhost/${project.name}-arch:${project.version}", \
|
||||
"${project.rootProject.properties['docker.registry']}" \
|
||||
+ "/${project.name}-arch:latest"
|
||||
def registry = "${project.rootProject.properties['docker.registry']}"
|
||||
commandLine 'podman', 'tag', \
|
||||
"${registry}/${project.name}-arch:${project.version}",\
|
||||
"${registry}/${project.name}-arch:latest"
|
||||
}
|
||||
|
||||
task buildAlpineImage(type: Exec) {
|
||||
|
|
@ -89,40 +78,27 @@ task buildAlpineImage(type: Exec) {
|
|||
inputs.files 'src/org/jdrupes/vmoperator/runner/qemu/Containerfile.alpine'
|
||||
|
||||
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', '.'
|
||||
}
|
||||
|
||||
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) {
|
||||
dependsOn buildAlpineImage
|
||||
|
||||
def registry = "${project.rootProject.properties['docker.registry']}"
|
||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||
"localhost/${project.name}-alpine:${project.version}", \
|
||||
"${project.rootProject.properties['docker.registry']}" \
|
||||
+ "/${project.name}-alpine:${project.version}"
|
||||
"localhost/${project.name}-alpine:${project.gitBranch}", \
|
||||
"${registry}/${project.name}-alpine:${project.gitBranch}"
|
||||
|
||||
if (!project.version.contains("SNAPSHOT")) {
|
||||
commandLine 'podman', 'tag', \
|
||||
"${registry}/${project.name}-alpine:${project.gitBranch}",\
|
||||
"${registry}/${project.name}-alpine:${project.version}"
|
||||
}
|
||||
}
|
||||
|
||||
task pushAlpineLatestImage(type: Exec) {
|
||||
dependsOn buildLatestAlpineImage
|
||||
task tagAsLatestAlpine(type: Exec) {
|
||||
dependsOn pushAlpineImage
|
||||
|
||||
enabled = !project.version.contains("SNAPSHOT")
|
||||
&& !project.version.contains("alpha") \
|
||||
|
|
@ -131,16 +107,19 @@ task pushAlpineLatestImage(type: Exec) {
|
|||
&& project.rootProject.properties['docker.registry'] \
|
||||
== project.rootProject.properties['docker.testRegistry']
|
||||
|
||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||
"localhost/${project.name}-alpine:${project.version}", \
|
||||
"${project.rootProject.properties['docker.registry']}" \
|
||||
+ "/${project.name}-alpine:latest"
|
||||
def registry = "${project.rootProject.properties['docker.registry']}"
|
||||
commandLine 'podman', 'tag', \
|
||||
"${registry}/${project.name}-alpine:${project.version}",\
|
||||
"${registry}/${project.name}-alpine:latest"
|
||||
}
|
||||
|
||||
task pushImages {
|
||||
task pushImage {
|
||||
dependsOn pushArchImage
|
||||
dependsOn pushArchLatestImage
|
||||
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
|
||||
|
||||
|
|
|
|||
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",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"overrides": {
|
||||
"node-gyp": "^10.1.0",
|
||||
"glob": "^9.0.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"extends": "eslint:recommended",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM alpine:3.19
|
||||
FROM docker.io/alpine:3.19
|
||||
|
||||
RUN apk update &&\
|
||||
apk add --no-cache inotify-tools &&\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue