| pipeline { |
| agent { |
| kubernetes { |
| label 'my-agent-pod' |
| yaml """ |
| apiVersion: v1 |
| kind: Pod |
| spec: |
| containers: |
| - name: node |
| image: timbru31/node-chrome:18-alpine |
| tty: true |
| command: |
| - cat |
| resources: |
| limits: |
| memory: 3.5Gi |
| cpu: 1 |
| requests: |
| memory: 3.5Gi |
| cpu: 1 |
| env: |
| - name: "HOME" |
| value: "/home/jenkins" |
| - name: "CHROME_BIN" |
| value: "/usr/bin/chromium-browser" |
| - name: "PNPM_HOME" |
| value: "/usr/local/bin/pnpm" |
| volumeMounts: |
| - mountPath: "/home/jenkins" |
| name: "jenkins-home" |
| readOnly: false |
| volumes: |
| - name: "jenkins-home" |
| emptyDir: {} |
| """ |
| } |
| } |
| options { |
| timestamps() |
| } |
| |
| stages { |
| stage('Install dependencies') { |
| steps { |
| container('node') { |
| sh 'node -v' |
| sh 'npm -v' |
| sh 'mkdir ~/bin' |
| sh 'mkdir ~/.pnpm-store' |
| sh 'corepack enable --install-directory ~/bin' |
| sh 'corepack prepare pnpm@latest-8 --activate' |
| sh 'corepack pnpm config set store-dir ~/.pnpm-store' |
| dir('plugins/org.eclipse.osee.web') { |
| sh 'npm config set fetch-timeout=100000' |
| sh 'corepack pnpm install' |
| } |
| } |
| } |
| } |
| |
| stage('Build Demo') { |
| steps { |
| container('node') { |
| dir('plugins/org.eclipse.osee.web') { |
| sh 'npx -p @angular/cli ng build -c demo' |
| } |
| } |
| } |
| } |
| } |
| } |