Merge branch 'master' of https://git.james-things.com/dndsources/schedulord-frontend
Some checks failed
gitea_dndsources/schedulord-frontend/pipeline/head There was a failure building this commit

This commit is contained in:
Jesse James Isler 2022-06-09 13:03:02 +02:00
commit 52c338a963
3 changed files with 74 additions and 33 deletions

View File

@ -1,22 +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
ENTRYPOINT ["nginx", "-g", "daemon off;"]
EXPOSE 80 EXPOSE 80
COPY dist /var/www
COPY config/nginx.conf /etc/nginx/nginx.conf

28
Jenkinsfile vendored
View File

@ -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'
} }
} }
} }

View File

@ -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, // singleRun: false,
restartOnFileChange: true // 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,
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
// });
}; };