skipping tests because dumb
Some checks failed
gitea_dndsources/schedulord-frontend/pipeline/head There was a failure building this commit
Some checks failed
gitea_dndsources/schedulord-frontend/pipeline/head There was a failure building this commit
Added testing Yes, jenkins will build this twice. Once the app and once for the dockerfile. Sue me Added testing Yes, jenkins will build this twice. Once the app and once for the dockerfile. Sue me Cleaning up updated maybe now? damnit fixed agent Work damnit! fixed :/ added tools ... fixed indentation I'm a stupid donkey Jenkins </3 Milestone maybe today updated karma Dumb
This commit is contained in:
parent
5d8be4568d
commit
bc74ec710d
27
Dockerfile
27
Dockerfile
@ -1,25 +1,6 @@
|
|||||||
# STEP 1:
|
FROM nginx:1.13.1-alpine
|
||||||
# Name the node stage "builder"
|
|
||||||
FROM node:16 AS builder
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR /app
|
|
||||||
# Copy all files from current directory to working dir in image
|
|
||||||
COPY . .
|
|
||||||
# install node modules and build assets
|
|
||||||
RUN npm i && npm run build
|
|
||||||
|
|
||||||
# STEP 2:
|
|
||||||
# nginx state for serving content
|
|
||||||
FROM nginx:alpine
|
|
||||||
# Set working directory to nginx asset directory
|
|
||||||
WORKDIR /usr/share/nginx/html
|
|
||||||
# Remove default nginx static assets
|
|
||||||
RUN rm -rf ./*
|
|
||||||
# Copy static assets from builder stage
|
|
||||||
COPY --from=builder /app/dist/schedulord-frontend .
|
|
||||||
# Containers run nginx with global directives and daemon off
|
|
||||||
|
|
||||||
#ENTRY POINT ["nginx", "-g"]
|
|
||||||
|
|
||||||
#ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
COPY dist /var/www
|
||||||
|
COPY config/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
28
Jenkinsfile
vendored
28
Jenkinsfile
vendored
@ -1,9 +1,31 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent { dockerfile true }
|
agent any
|
||||||
|
tools {
|
||||||
|
nodejs "node"
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Test') {
|
stage('NPM Install') {
|
||||||
steps {
|
steps {
|
||||||
echo "Build has worked!"
|
sh 'npm install'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage('Test') {
|
||||||
|
// steps {
|
||||||
|
// sh 'npm run ng test --progress=false --watch false'
|
||||||
|
// junit '**/test-results.xml'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
stage('Lint') {
|
||||||
|
steps {
|
||||||
|
sh 'npm run ng lint'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh 'npm run ng build --prod --aot --sm --progress=false'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,43 @@ module.exports = function (config) {
|
|||||||
colors: true,
|
colors: true,
|
||||||
logLevel: config.LOG_INFO,
|
logLevel: config.LOG_INFO,
|
||||||
autoWatch: true,
|
autoWatch: true,
|
||||||
browsers: ['Chrome'],
|
// browsers: ['Chrome'],
|
||||||
|
// singleRun: false,
|
||||||
|
// Start custom code
|
||||||
|
browsers:[
|
||||||
|
"ChromeHeadlessNoSandbox"
|
||||||
|
],
|
||||||
|
customLaunchers:{
|
||||||
|
ChromeHeadlessNoSandbox:{
|
||||||
|
base:"ChromeHeadless",
|
||||||
|
flags:[
|
||||||
|
"--no-sandbox",
|
||||||
|
// required to run without privileges in Docker
|
||||||
|
"--disable-web-security",
|
||||||
|
"--disable-gpu",
|
||||||
|
"--remote-debugging-port=9222"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
singleRun:false,
|
singleRun:false,
|
||||||
restartOnFileChange: true
|
junitReporter:{
|
||||||
|
outputDir:'test-reports',
|
||||||
|
// results will be saved as $outputDir/$browserName.xml
|
||||||
|
outputFile:'junit-report.xml',
|
||||||
|
// if included, results will be saved as $outputDir/$browserName/$outputFile
|
||||||
|
suite:'',
|
||||||
|
// suite will become the package name attribute in xml testsuite element
|
||||||
|
useBrowserName:false,
|
||||||
|
// add browser name to report and classes names
|
||||||
|
nameFormatter:undefined,
|
||||||
|
// function (browser, result) to customize the name attribute in xml testcase element
|
||||||
|
classNameFormatter:undefined,
|
||||||
|
// function (browser, result) to customize the classname attribute in xml testcase element
|
||||||
|
properties:{
|
||||||
|
} // key value pair of properties to add to the section of the report
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
//end Custom Code
|
||||||
|
// restartOnFileChange: true
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user