johann-foerster
commited on
Commit
·
b46c051
1
Parent(s):
0240d8c
build old school with docker because kaniko just explodes in memory usage
Browse files- Jenkinsfile +13 -10
Jenkinsfile
CHANGED
@@ -1,21 +1,24 @@
|
|
|
|
|
|
1 |
podTemplate(containers: [
|
2 |
-
containerTemplate(name: '
|
3 |
-
resourceRequestCpu: '
|
4 |
]) {
|
5 |
node(POD_LABEL) {
|
6 |
stage('checkout') {
|
7 |
checkout scm
|
8 |
}
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
}
|
|
|
19 |
}
|
20 |
}
|
21 |
}
|
|
|
1 |
+
CONTAINER="docker.qualityminds.de/rd/ai-christmas:latest"
|
2 |
+
|
3 |
podTemplate(containers: [
|
4 |
+
containerTemplate(name: 'docker', image: 'docker:24.0.6-dind', args: '--mtu 1400', privileged: true, ttyEnabled: true,
|
5 |
+
resourceRequestCpu: '100m', resourceRequestMemory: '8Gi', resourceLimitMemory: '8Gi')
|
6 |
]) {
|
7 |
node(POD_LABEL) {
|
8 |
stage('checkout') {
|
9 |
checkout scm
|
10 |
}
|
11 |
|
12 |
+
container('docker') {
|
13 |
+
stage('docker build') {
|
14 |
+
sh "docker build --tag $CONTAINER ."
|
15 |
+
}
|
16 |
+
|
17 |
+
stage('docker push') {
|
18 |
+
withCredentials([usernamePassword(credentialsId: 'nexus_jenkins_user', passwordVariable: 'password', usernameVariable: 'user')]) {
|
19 |
+
sh "docker login $QM_DOCKER_REGISTRY -p \$password -u \$user"
|
20 |
}
|
21 |
+
sh "docker push $CONTAINER"
|
22 |
}
|
23 |
}
|
24 |
}
|