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

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:
# 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
FROM nginx:1.13.1-alpine
# 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

38
Jenkinsfile vendored
View File

@ -1,10 +1,32 @@
pipeline {
agent { dockerfile true }
stages {
stage('Test') {
steps {
echo "Build has worked!"
}
}
agent any
tools {
nodejs "node"
}
stages {
stage('NPM Install') {
steps {
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,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
// 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,
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
// });
};