diff --git a/README.md b/README.md index 79dbbf406..c353dfa17 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,6 @@ Then, you can run the app with: npm start -Once it is running, you can access it in a browser at [http://localhost:3000](http://localhost:3000) \ No newline at end of file +Once it is running, you can access it in a browser at [http://localhost:3000](http://localhost:3000) + +Test changes for automated build in Jenkins diff --git a/build.gradle b/build.gradle new file mode 100644 index 000000000..2f51cc08d --- /dev/null +++ b/build.gradle @@ -0,0 +1,47 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * This is a general purpose Gradle build. + * Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds/ + */ +plugins { + id("com.github.node-gradle.node") version "2.2.4" +} + +node { + version = '9.11.2' + download = true +} + +task build +// Create a task that is the Zip type + task zip(type: Zip) { +// Find the files at . (dot) which means "right here in the root of the directory" + from ('.') { +// Grab all of the files in the root directory, not the files AND subdirectories +// with their files, just the files sitting right in the root directory. + include "*" +// These next few lines have double asterisks, which means EVERYTHING. For each line, we want to grab the +// directory that we've named, and everything (files and subdirectories) below it in the file tree. + include "bin/**" + include "data/**" + include "node_modules/**" + include "public/**" + include "routes/**" + include "views/**" + } +// This is the destination where the zip file is going to land. We're putting it in a directory names dist, +// which is going to be a subdirectory of the root directory. + destinationDir(file("dist")) +// We're naming the zip file itself. When we're done, there should be a trainSchedule.zip sitting in the ./dist +// directory. + baseName "trainSchedule" + } + +// This will make the build task call on the zip task. If zip doesn't finish, the build fails. + build.dependsOn zip +// Here, we want to make sure our zip task runs after npm_build + zip.dependsOn npm_build +build.dependsOn npm_build +npm_build.dependsOn npm_test +npm_test.dependsOn npmInstall diff --git a/dist/trainSchedule.zip b/dist/trainSchedule.zip new file mode 100644 index 000000000..d17f70814 Binary files /dev/null and b/dist/trainSchedule.zip differ diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 000000000..e080ed02f --- /dev/null +++ b/settings.gradle @@ -0,0 +1,10 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * The settings file is used to specify which projects to include in your build. + * + * Detailed information about configuring a multi-project build in Gradle can be found + * in the user guide at https://docs.gradle.org/4.6/userguide/multi_project_builds.html + */ + +rootProject.name = 'cicd-pipeline-train-schedule-gradle'