Normalized indentation in Jenkinsfiles.
This commit is contained in:
parent
896abe30b2
commit
3edf739b98
@ -4,74 +4,74 @@ pipeline {
|
|||||||
image 'node:lts-bullseye-slim'
|
image 'node:lts-bullseye-slim'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
// ensure production environmental variable are present
|
// ensure production environmental variable are present
|
||||||
CI = 'true'
|
CI = 'true'
|
||||||
NODE_ENV = 'production'
|
NODE_ENV = 'production'
|
||||||
// set NPM parameters
|
// set NPM parameters
|
||||||
HOME = '.'
|
HOME = '.'
|
||||||
NPM_CONFIG_CACHE = 'npm_cache'
|
NPM_CONFIG_CACHE = 'npm_cache'
|
||||||
// set application configuration
|
// set application configuration
|
||||||
REACT_APP_KC_URL = 'https://auth-dev.csi.wmi.amu.edu.pl/'
|
REACT_APP_KC_URL = 'https://auth-dev.csi.wmi.amu.edu.pl/'
|
||||||
REACT_APP_KC_REALM = 'gonito-dev'
|
REACT_APP_KC_REALM = 'gonito-dev'
|
||||||
REACT_APP_KC_CLIENT_ID = 'gonito-front-dev'
|
REACT_APP_KC_CLIENT_ID = 'gonito-front-dev'
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
//sh 'npm install --loglevel=verbose'
|
//sh 'npm install --loglevel=verbose'
|
||||||
sh 'npm install'
|
sh 'npm install'
|
||||||
sh 'npm clean-install --only=production'
|
sh 'npm clean-install --only=production'
|
||||||
sh 'npm run build'
|
sh 'npm run build'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Package') {
|
stage('Package') {
|
||||||
steps {
|
steps {
|
||||||
// due to involved path processing of sshPublisher it's easier to pack everything into an archive
|
// due to involved path processing of sshPublisher it's easier to pack everything into an archive
|
||||||
sh 'cd build && tar cf ../build.tar.xz .'
|
sh 'cd build && tar cf ../build.tar.xz .'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('SSH-publish-transfer') {
|
stage('SSH-publish-transfer') {
|
||||||
steps {
|
steps {
|
||||||
sshPublisher(
|
sshPublisher(
|
||||||
continueOnError: false,
|
continueOnError: false,
|
||||||
failOnError: true,
|
failOnError: true,
|
||||||
publishers: [
|
publishers: [
|
||||||
sshPublisherDesc(
|
sshPublisherDesc(
|
||||||
configName: "mprill-gonito-front-dev",
|
configName: "mprill-gonito-front-dev",
|
||||||
transfers: [sshTransfer(
|
transfers: [sshTransfer(
|
||||||
remoteDirectory: 'public_html',
|
remoteDirectory: 'public_html',
|
||||||
// ensure clean deployment by deleting everything in remote directory
|
// ensure clean deployment by deleting everything in remote directory
|
||||||
cleanRemote: true,
|
cleanRemote: true,
|
||||||
// transfer archive
|
// transfer archive
|
||||||
sourceFiles: 'build.tar.xz',
|
sourceFiles: 'build.tar.xz',
|
||||||
// unpack archive and clean up
|
// unpack archive and clean up
|
||||||
execCommand: 'tar xf public_html/build.tar.xz -C public_html && rm public_html/build.tar.xz'
|
execCommand: 'tar xf public_html/build.tar.xz -C public_html && rm public_html/build.tar.xz'
|
||||||
)],
|
)],
|
||||||
verbose: true
|
verbose: true
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('SSH-publish-permissions') {
|
stage('SSH-publish-permissions') {
|
||||||
steps {
|
steps {
|
||||||
sshPublisher(
|
sshPublisher(
|
||||||
continueOnError: false,
|
continueOnError: false,
|
||||||
failOnError: true,
|
failOnError: true,
|
||||||
publishers: [
|
publishers: [
|
||||||
sshPublisherDesc(
|
sshPublisherDesc(
|
||||||
configName: "mprill-gonito-front-dev",
|
configName: "mprill-gonito-front-dev",
|
||||||
transfers: [sshTransfer(
|
transfers: [sshTransfer(
|
||||||
// set proper permissions required for hosting
|
// set proper permissions required for hosting
|
||||||
execCommand: 'chmod -R o+rX public_html'
|
execCommand: 'chmod -R o+rX public_html'
|
||||||
)],
|
)],
|
||||||
verbose: true
|
verbose: true
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,74 +4,74 @@ pipeline {
|
|||||||
image 'node:lts-bullseye-slim'
|
image 'node:lts-bullseye-slim'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
// ensure production environmental variable are present
|
// ensure production environmental variable are present
|
||||||
CI = 'true'
|
CI = 'true'
|
||||||
NODE_ENV = 'production'
|
NODE_ENV = 'production'
|
||||||
// set NPM parameters
|
// set NPM parameters
|
||||||
HOME = '.'
|
HOME = '.'
|
||||||
NPM_CONFIG_CACHE = 'npm_cache'
|
NPM_CONFIG_CACHE = 'npm_cache'
|
||||||
// set application configuration
|
// set application configuration
|
||||||
REACT_APP_KC_URL = 'https://auth.csi.wmi.amu.edu.pl/'
|
REACT_APP_KC_URL = 'https://auth.csi.wmi.amu.edu.pl/'
|
||||||
REACT_APP_KC_REALM = 'csi-gonito'
|
REACT_APP_KC_REALM = 'csi-gonito'
|
||||||
REACT_APP_KC_CLIENT_ID = 'gonito-frontend'
|
REACT_APP_KC_CLIENT_ID = 'gonito-frontend'
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
//sh 'npm install --loglevel=verbose'
|
//sh 'npm install --loglevel=verbose'
|
||||||
sh 'npm install'
|
sh 'npm install'
|
||||||
sh 'npm clean-install --only=production'
|
sh 'npm clean-install --only=production'
|
||||||
sh 'npm run build'
|
sh 'npm run build'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Package') {
|
stage('Package') {
|
||||||
steps {
|
steps {
|
||||||
// due to involved path processing of sshPublisher it's easier to pack everything into an archive
|
// due to involved path processing of sshPublisher it's easier to pack everything into an archive
|
||||||
sh 'cd build && tar cf ../build.tar.xz .'
|
sh 'cd build && tar cf ../build.tar.xz .'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('SSH-publish-transfer') {
|
stage('SSH-publish-transfer') {
|
||||||
steps {
|
steps {
|
||||||
sshPublisher(
|
sshPublisher(
|
||||||
continueOnError: false,
|
continueOnError: false,
|
||||||
failOnError: true,
|
failOnError: true,
|
||||||
publishers: [
|
publishers: [
|
||||||
sshPublisherDesc(
|
sshPublisherDesc(
|
||||||
configName: "mprill-gonito-front-prod",
|
configName: "mprill-gonito-front-prod",
|
||||||
transfers: [sshTransfer(
|
transfers: [sshTransfer(
|
||||||
remoteDirectory: 'public_html',
|
remoteDirectory: 'public_html',
|
||||||
// ensure clean deployment by deleting everything in remote directory
|
// ensure clean deployment by deleting everything in remote directory
|
||||||
cleanRemote: true,
|
cleanRemote: true,
|
||||||
// transfer archive
|
// transfer archive
|
||||||
sourceFiles: 'build.tar.xz',
|
sourceFiles: 'build.tar.xz',
|
||||||
// unpack archive and clean up
|
// unpack archive and clean up
|
||||||
execCommand: 'tar xf public_html/build.tar.xz -C public_html && rm public_html/build.tar.xz'
|
execCommand: 'tar xf public_html/build.tar.xz -C public_html && rm public_html/build.tar.xz'
|
||||||
)],
|
)],
|
||||||
verbose: true
|
verbose: true
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('SSH-publish-permissions') {
|
stage('SSH-publish-permissions') {
|
||||||
steps {
|
steps {
|
||||||
sshPublisher(
|
sshPublisher(
|
||||||
continueOnError: false,
|
continueOnError: false,
|
||||||
failOnError: true,
|
failOnError: true,
|
||||||
publishers: [
|
publishers: [
|
||||||
sshPublisherDesc(
|
sshPublisherDesc(
|
||||||
configName: "mprill-gonito-front-prod",
|
configName: "mprill-gonito-front-prod",
|
||||||
transfers: [sshTransfer(
|
transfers: [sshTransfer(
|
||||||
// set proper permissions required for hosting
|
// set proper permissions required for hosting
|
||||||
execCommand: 'chmod -R o+rX public_html'
|
execCommand: 'chmod -R o+rX public_html'
|
||||||
)],
|
)],
|
||||||
verbose: true
|
verbose: true
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user