diff --git a/Jenkinsfile b/Jenkinsfile index cc4c8cd..c2f919d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,10 +2,26 @@ pipeline { agent any stages { - stage('Do nothing') { + stage('Environment') { steps { - sh '/bin/true' + sh 'git --version' + sh 'printenv' + } + } + stage('Build Frontend') { + steps { + sh './jenkins/buildFrontend.sh' + } + } + stage('Deploy Backend') { + steps { + sh './jenkins/deployBackend.sh' + } + } + stage('Deploy Frontend') { + steps { + sh './jenkins/deployFrontend.sh' } } } -} \ No newline at end of file +} diff --git a/jenkins/buildFrontend.sh b/jenkins/buildFrontend.sh new file mode 100644 index 0000000..6460956 --- /dev/null +++ b/jenkins/buildFrontend.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +cd ../frontend + +echo 'Install neccessary Packages' +yarn install + +echo '' +yarn run build diff --git a/jenkins/deployBackend.sh b/jenkins/deployBackend.sh new file mode 100644 index 0000000..e69de29 diff --git a/jenkins/deployFrontend.sh b/jenkins/deployFrontend.sh new file mode 100644 index 0000000..e69de29