We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 930fa16 commit 93744a5Copy full SHA for 93744a5
Dockerfile
@@ -0,0 +1,14 @@
1
+FROM node:14
2
+
3
+# Create app directory
4
+WORKDIR /usr/src/app
5
6
+# Install app dependencies
7
+COPY package.json package-lock.json ./
8
+RUN npm install
9
10
+# Bundle app source
11
+COPY . .
12
13
+EXPOSE 3000
14
+CMD ["npm", "start"]
Jenkinsfile
@@ -0,0 +1,27 @@
+pipeline {
+ agent any
+ stages {
+ stage('Build') {
+ steps {
+ checkout scm
+ sh 'npm install'
+ sh 'npm run build'
+ }
+ stage('Test') {
+ sh 'npm test'
15
16
+ stage('Build Docker Image') {
17
18
+ docker.build('my-image', '.')
19
20
21
+ stage('Run Docker Container') {
22
23
+ docker.run('my-image', '-p 8080:3000')
24
25
26
27
+}
0 commit comments