auth-ui: add e2e tests

Change-Id: Ic8f2f9e032d24eed2d4fd824dcfc26c59d7d915e
diff --git a/Jenkinsfile b/Jenkinsfile
index 3ad77fd..47d3186 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,7 +1,7 @@
 pipeline {
     agent {
         kubernetes {
-			yaml '''
+            yaml '''
                 apiVersion: v1
                 kind: Pod
                 spec:
@@ -12,12 +12,67 @@
                   - name: node
                     image: node:24.0.0-alpine3.20
                     tty: true
+                  - name: nix
+                    image: giolekva/jenkins-nix-agent:latest
+                    command: ["/usr/bin/tini", "-s", "-g", "--"]
+                    args: ["/bin/sleep", "infinity"]
+                    tty: true
+                    env:
+                      - name: HOME
+                        value: /home/jenkins
             '''
-		}
+        }
     }
     stages {
         stage('build/test') {
             steps {
+                container('nix') {
+                    dir('core/auth/ui') {
+                        sh '''
+                            nix develop --accept-flake-config --command bash -euc '
+                                go mod tidy
+                                go build *.go
+                                go test ./...
+                                go test -tags=e2e -count=1 -timeout=10m -v ./e2e
+                            '
+                        '''
+                    }
+                    dir('apps/app-runner') {
+                        sh '''
+                            nix develop --accept-flake-config --command bash -euc '
+                                go mod tidy
+                                go build *.go
+                                go test ./...
+                            '
+                        '''
+                    }
+                    dir('core/auth/memberships') {
+                        sh '''
+                            nix develop --accept-flake-config --command bash -euc '
+                                go mod tidy
+                                go build *.go
+                                go test ./...
+                            '
+                        '''
+                    }
+                    dir('core/port-allocator') {
+                        sh '''
+                            nix develop --accept-flake-config --command bash -euc '
+                                go mod tidy
+                                go build *.go
+                                go test ./...
+                            '
+                        '''
+                    }
+                }
+                container('golang') {
+                    dir('core/installer') {
+                        sh 'go mod tidy'
+                        sh 'go build cmd/*.go'
+                        sh 'go run cuelang.org/go/cmd/cue fmt app_configs/*.cue --check'
+                        sh 'go test ./...'
+                    }
+                }
                 container('node') {
                     sh "apk update"
                     sh "apk add gcc g++ make musl-dev python3 py3-setuptools"
@@ -39,41 +94,18 @@
                         sh 'npm run lint'
                     }
                 }
-				container('golang') {
-                	dir('core/installer') {
-                		sh 'go mod tidy'
-                		sh 'go build cmd/*.go'
-						sh 'go run cuelang.org/go/cmd/cue fmt app_configs/*.cue --check'
-                		sh 'go test ./...'
-					}
-                    dir('apps/app-runner') {
-                        sh 'go mod tidy'
-                		sh 'go build *.go'
-                		sh 'go test ./...'
-					}
-                    dir('core/auth/memberships') {
-                        sh 'go mod tidy'
-                		sh 'go build *.go'
-                		sh 'go test ./...'
-					}
-                    dir('core/port-allocator') {
-                        sh 'go mod tidy'
-                		sh 'go build *.go'
-                		sh 'go test ./...'
-					}
-				}
             }
         }
     }
-	post {
+    post {
         success {
             gerritReview labels: [Verified: 1], message: env.BUILD_URL
         }
         unstable {
-		    gerritReview labels: [Verified: 0], message: env.BUILD_URL
-		}
+            gerritReview labels: [Verified: 0], message: env.BUILD_URL
+        }
         failure {
             gerritReview labels: [Verified: -1], message: env.BUILD_URL
         }
     }
-}
\ No newline at end of file
+}