skipping tests because dumb
gitea_dndsources/schedulord-frontend/pipeline/head There was a failure building this commit Details

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:
Jesse James Isler 2022-06-09 09:45:33 +02:00
parent 5d8be4568d
commit bc74ec710d
3 changed files with 73 additions and 35 deletions

View File

@ -1,25 +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
EXPOSE 80
#ENTRY POINT ["nginx", "-g"]
#ENTRYPOINT ["nginx", "-g", "daemon off;"]
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
// });
};