forked from Makpar-Innovation-Laboratory/react-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added jenkinsfile for pipeline implementation
- Loading branch information
1 parent
7fc3fa7
commit 8094801
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
|
||
cd frontend && npm install | ||
npm run build | ||
aws s3 cp ./build/. \ | ||
s3://${APPLICATION}-laboratory${ENV}-web \ | ||
--recursive | ||
|
||
|
||
pipeline { | ||
// This line is required for declarative pipelines. Just keep it here. | ||
agent any | ||
|
||
// This section contains environment variables which are available for use in the | ||
// pipeline's stages. | ||
// environment { | ||
// region = "us-east-1" | ||
// } | ||
|
||
// Here you can define one or more stages for your pipeline. | ||
// Each stage can execute one or more steps. | ||
stages { | ||
// This is a stage. | ||
stage('Build') { | ||
steps { | ||
// Get SHA1 of current commit | ||
// script { | ||
// commit_id = sh(script: "git rev-parse --short HEAD", returnStdout: true).trim() | ||
// } | ||
sh "cd frontend && npm install" | ||
sh "npm run build" | ||
} | ||
} | ||
stage('Upload') { | ||
steps { | ||
|
||
sh "aws s3 cp ./build/. s3://jenkins-makpar-odos --recursive" | ||
} | ||
} | ||
} | ||
} |