Introduce minor improvement in vcluster: 37/15537/4
authormesaj <juanmanuel.mesamendez.ext@telefonica.com>
Thu, 20 Nov 2025 21:54:56 +0000 (22:54 +0100)
committermesaj <juanmanuel.mesamendez.ext@telefonica.com>
Mon, 24 Nov 2025 17:07:27 +0000 (18:07 +0100)
- Auto remove of leftover container
- Increase vcluster creation timeout to 10min
- Upgrade vcluster to vesion 0.30.1

Change-Id: I11d1bd9fba06746cfa0419273e36ac08997ce705
Signed-off-by: mesaj <juanmanuel.mesamendez.ext@telefonica.com>
docker/tests/Dockerfile
jenkins/ci-pipelines/ci_stage_3.groovy

index cceaea9..b269e64 100644 (file)
@@ -81,7 +81,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
 RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
 
 # Add vCluster CLI
-ENV VCLUSTER_VERSION "v0.26.0"
+ENV VCLUSTER_VERSION "v0.30.1"
 RUN curl -L -o /tmp/vcluster "https://github.com/loft-sh/vcluster/releases/download/${VCLUSTER_VERSION}/vcluster-linux-amd64" \
     && install -c -m 0755 /tmp/vcluster /usr/local/bin \
     && rm -f /tmp/vcluster
index b4cb672..7bb9c0c 100644 (file)
@@ -97,7 +97,7 @@ class DockerRunner implements Serializable {
                         .collect { "--env ${it}" }.join(' ')
         def image    = args.image ?: ''
         def cmd      = args.cmd   ?: ''
-        def fullCmd  = """docker run ${entry} ${envs} ${envFile ? "--env-file ${envFile}" : ''} ${mounts} ${image} ${cmd}"""
+        def fullCmd  = """docker run --rm ${entry} ${envs} ${envFile ? "--env-file ${envFile}" : ''} ${mounts} ${image} ${cmd}"""
 
         def result = null
         try {
@@ -151,7 +151,7 @@ void create_vcluster(String tagName, String kubeconfigPath) {
     println("vcluster 'e2e' created")
 
     // 3) poll until Status is Running
-    int maxWaitMinutes = 2
+    int maxWaitMinutes = 10
     long deadline = System.currentTimeMillis() + (maxWaitMinutes * 60 * 1000)
     boolean running = false
     String lastOut = ''
@@ -1193,9 +1193,9 @@ EOF"""
             } // if (params.SAVE_ARTIFACTS_OVERRIDE || stage_archive)
         } // dir(OSM_DEVOPS)
     } finally {
-        // stage('Debug') {
-        //     sleep 900
-        // }
+        //stage('Debug') {
+        //    sleep 900
+        //}
         stage('Archive Container Logs') {
             if ( ARCHIVE_LOGS_FLAG ) {
                 try {