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 619fa4d commit 65d40beCopy full SHA for 65d40be
Dockerfile
@@ -0,0 +1,10 @@
1
+FROM node:latest as node
2
+RUN mkdir -p /app
3
+WORKDIR /app
4
+COPY package*.json /app/
5
+RUN npm install
6
+COPY . /app/
7
+EXPOSE 4200
8
+CMD ["npm", "run", "start"]
9
+
10
+#jsut a test
Jenkinsfile
@@ -0,0 +1,30 @@
+node {
+ def app
+ stage('Clone repository') {
+ checkout scm
+ }
+ stage('Build image') {
11
12
+ app = docker.build("phillipmario/test")
13
14
15
+ stage('Test image') {
16
17
18
+ app.inside {
19
+ sh 'echo "Tests passed"'
20
21
22
23
+ stage('Push image') {
24
25
+ docker.withRegistry('https://registry.hub.docker.com', 'Docker') {
26
+ app.push("${env.BUILD_NUMBER}")
27
+ app.push("latest")
28
29
30
+}
0 commit comments