├── .gitattributes ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── boilerplates ├── README.md ├── airflow │ ├── Jenkinsfile │ ├── README.md │ ├── custom-create-components.sh │ ├── files │ │ ├── build.sh │ │ ├── docker │ │ │ ├── Dockerfile │ │ │ └── scripts │ │ │ │ └── setup.py │ │ ├── src │ │ │ ├── dag_deps │ │ │ │ ├── .keep │ │ │ │ └── dag_deps_package │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── crazy_python.py │ │ │ ├── dags │ │ │ │ ├── .keep │ │ │ │ ├── hello_dag.py │ │ │ │ ├── hello_kubernetes_operator.py │ │ │ │ └── hello_python_dag.py │ │ │ └── requirements.txt │ │ ├── test_all.sh │ │ ├── test_dag_integrity.sh │ │ └── tests │ │ │ ├── dag_deps │ │ │ ├── .keep │ │ │ ├── __init__.py │ │ │ └── test_crazy_python.py │ │ │ └── dags │ │ │ ├── __init__.py │ │ │ └── test_dag_integrity.py │ ├── init.sh │ ├── sonar-project.properties │ └── templates │ │ ├── airflow.yaml │ │ ├── postgresql-persistent.yaml │ │ └── service-account.yaml ├── be-docker-plain │ ├── Jenkinsfile │ ├── README.md │ ├── files │ │ └── docker │ │ │ └── Dockerfile │ ├── init.sh │ └── sonar-project.properties ├── be-golang │ ├── Jenkinsfile │ ├── README.md │ ├── files │ │ ├── docker │ │ │ └── Dockerfile │ │ ├── main.go │ │ └── main_test.go │ ├── init.sh │ └── sonar-project.properties ├── be-node-express │ ├── Dockerfile │ ├── Jenkinsfile │ ├── README.md │ ├── build.sh │ ├── files │ │ └── docker │ │ │ └── Dockerfile │ ├── fix │ │ └── index.ts │ ├── init.sh │ └── sonar-project.properties ├── be-python-flask │ ├── Jenkinsfile │ ├── README.md │ ├── files │ │ ├── docker │ │ │ ├── Dockerfile │ │ │ └── run.sh │ │ └── src │ │ │ ├── app.py │ │ │ ├── requirements.txt │ │ │ ├── static │ │ │ ├── css │ │ │ │ └── main.css │ │ │ └── img │ │ │ │ └── bix.jpg │ │ │ ├── templates │ │ │ └── base.html │ │ │ ├── test_requirements.txt │ │ │ └── tests │ │ │ ├── .coveragerc │ │ │ ├── __init__.py │ │ │ └── tests.py │ ├── init.sh │ └── sonar-project.properties ├── be-scala-akka │ ├── Dockerfile │ ├── Jenkinsfile │ ├── README.md │ ├── akka-http-quickstart-scala.g8 │ │ ├── README.md │ │ ├── build.sbt │ │ ├── docs │ │ │ ├── build.sbt │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── paradox │ │ │ │ ├── backend-actor.md │ │ │ │ ├── http-server.md │ │ │ │ ├── images │ │ │ │ ├── hello-akka-http.png │ │ │ │ ├── idea-open-project.png │ │ │ │ └── idea-running-project.png │ │ │ │ ├── index.md │ │ │ │ ├── intellij-idea.md │ │ │ │ ├── json.md │ │ │ │ ├── running-the-application.md │ │ │ │ └── testing-routes.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── giter8.sbt │ │ │ ├── paradox.sbt │ │ │ └── plugins.sbt │ │ └── src │ │ │ └── main │ │ │ └── g8 │ │ │ ├── build.sbt │ │ │ ├── default.properties │ │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ │ └── src │ │ │ ├── main │ │ │ └── scala │ │ │ │ └── $package$ │ │ │ │ ├── JsonSupport.scala │ │ │ │ ├── QuickstartServer.scala │ │ │ │ ├── UserRegistryActor.scala │ │ │ │ └── UserRoutes.scala │ │ │ └── test │ │ │ └── scala │ │ │ └── $package$ │ │ │ └── UserRoutesSpec.scala │ ├── build.sh │ ├── files │ │ └── docker │ │ │ └── Dockerfile │ ├── init.sh │ └── sonar-project.properties ├── be-springboot │ ├── Dockerfile │ ├── Jenkinsfile │ ├── README.md │ ├── build.sh │ ├── files │ │ └── docker │ │ │ └── Dockerfile │ ├── init.sh │ ├── sonar-project.properties │ ├── spring_wrapped.sh │ └── templates │ │ └── build-4.10.gradle ├── ds-ml-service │ ├── Jenkinsfile │ ├── README.md │ ├── custom-create-components.sh │ ├── files │ │ ├── .gitignore │ │ ├── build.bat │ │ ├── build.sh │ │ ├── docker │ │ │ └── Dockerfile │ │ ├── jenkinsfile_helper.py │ │ ├── resources │ │ │ ├── test.csv │ │ │ └── train.csv │ │ ├── src │ │ │ ├── model │ │ │ │ ├── __init__.py │ │ │ │ ├── data_cleaning │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── replace.py │ │ │ │ ├── feature_prep │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── polynomial.py │ │ │ │ ├── model_wrapper.py │ │ │ │ └── trainer.py │ │ │ ├── requirements.txt │ │ │ ├── run.sh │ │ │ └── services │ │ │ │ ├── __init__.py │ │ │ │ ├── infrastructure │ │ │ │ ├── __init__.py │ │ │ │ ├── environment.py │ │ │ │ ├── flask.py │ │ │ │ ├── logging.py │ │ │ │ └── remote │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── dvc │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── data_sync.py │ │ │ │ │ ├── scripts │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── remote_trainer.py │ │ │ │ │ └── ssh │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── exceptions.py │ │ │ │ │ └── executors.py │ │ │ │ ├── prediction │ │ │ │ ├── __init__.py │ │ │ │ └── app.py │ │ │ │ └── training │ │ │ │ ├── __init__.py │ │ │ │ ├── app.py │ │ │ │ └── templates │ │ │ │ └── index.html │ │ └── test │ │ │ ├── __init__.py │ │ │ ├── integration_tests │ │ │ ├── __init__.py │ │ │ └── services │ │ │ │ ├── __init__.py │ │ │ │ └── prediction │ │ │ │ ├── __init__.py │ │ │ │ └── test_prediction.py │ │ │ ├── run_integration_tests.sh │ │ │ ├── run_unittests.sh │ │ │ └── unittests │ │ │ ├── __init__.py │ │ │ └── model │ │ │ ├── __init__.py │ │ │ └── feature_prep │ │ │ ├── __init__.py │ │ │ └── test_polynomial.py │ ├── init.sh │ └── sonar-project.properties ├── e2e-cypress │ ├── Jenkinsfile │ ├── README.md │ ├── files │ │ ├── .gitignore │ │ ├── README.md │ │ ├── cypress.json │ │ ├── fixtures │ │ │ └── example.json │ │ ├── integration │ │ │ └── main.spec.ts │ │ ├── package.json │ │ ├── plugins │ │ │ └── index.js │ │ ├── support │ │ │ ├── commands.ts │ │ │ └── index.ts │ │ ├── tsconfig.json │ │ └── tslint.json │ └── init.sh ├── fe-angular │ ├── Dockerfile │ ├── Jenkinsfile │ ├── README.md │ ├── build.sh │ ├── files │ │ ├── docker │ │ │ ├── Dockerfile │ │ │ └── nginx.vh.default.conf.nginx │ │ ├── package.json │ │ └── tslint.json │ ├── init.sh │ └── sonar-project.properties ├── fe-ionic │ ├── Jenkinsfile │ ├── README.md │ ├── files │ │ ├── .angular-cli.json │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── README.md │ │ ├── config.xml │ │ ├── config │ │ │ ├── copy.config.js │ │ │ ├── sass.config.js │ │ │ └── webpack.config.js │ │ ├── docker │ │ │ ├── Dockerfile │ │ │ └── nginx.vh.default.conf.nginx │ │ ├── e2e │ │ │ ├── test.e2e-spec.ts │ │ │ └── tsconfig.json │ │ ├── ionic.config.json │ │ ├── karma.conf.js │ │ ├── package.json │ │ ├── protractor.conf.js │ │ ├── resources │ │ │ ├── README.md │ │ │ ├── android │ │ │ │ ├── icon │ │ │ │ │ ├── drawable-hdpi-icon.png │ │ │ │ │ ├── drawable-ldpi-icon.png │ │ │ │ │ ├── drawable-mdpi-icon.png │ │ │ │ │ ├── drawable-xhdpi-icon.png │ │ │ │ │ ├── drawable-xxhdpi-icon.png │ │ │ │ │ └── drawable-xxxhdpi-icon.png │ │ │ │ └── splash │ │ │ │ │ ├── drawable-land-hdpi-screen.png │ │ │ │ │ ├── drawable-land-ldpi-screen.png │ │ │ │ │ ├── drawable-land-mdpi-screen.png │ │ │ │ │ ├── drawable-land-xhdpi-screen.png │ │ │ │ │ ├── drawable-land-xxhdpi-screen.png │ │ │ │ │ ├── drawable-land-xxxhdpi-screen.png │ │ │ │ │ ├── drawable-port-hdpi-screen.png │ │ │ │ │ ├── drawable-port-ldpi-screen.png │ │ │ │ │ ├── drawable-port-mdpi-screen.png │ │ │ │ │ ├── drawable-port-xhdpi-screen.png │ │ │ │ │ ├── drawable-port-xxhdpi-screen.png │ │ │ │ │ └── drawable-port-xxxhdpi-screen.png │ │ │ ├── icon.png │ │ │ ├── ios │ │ │ │ ├── icon │ │ │ │ │ ├── icon-1024.png │ │ │ │ │ ├── icon-40.png │ │ │ │ │ ├── icon-40@2x.png │ │ │ │ │ ├── icon-40@3x.png │ │ │ │ │ ├── icon-50.png │ │ │ │ │ ├── icon-50@2x.png │ │ │ │ │ ├── icon-60.png │ │ │ │ │ ├── icon-60@2x.png │ │ │ │ │ ├── icon-60@3x.png │ │ │ │ │ ├── icon-72.png │ │ │ │ │ ├── icon-72@2x.png │ │ │ │ │ ├── icon-76.png │ │ │ │ │ ├── icon-76@2x.png │ │ │ │ │ ├── icon-83.5@2x.png │ │ │ │ │ ├── icon-small.png │ │ │ │ │ ├── icon-small@2x.png │ │ │ │ │ ├── icon-small@3x.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── icon@2x.png │ │ │ │ └── splash │ │ │ │ │ ├── Default-568h@2x~iphone.png │ │ │ │ │ ├── Default-667h.png │ │ │ │ │ ├── Default-736h.png │ │ │ │ │ ├── Default-Landscape-736h.png │ │ │ │ │ ├── Default-Landscape@2x~ipad.png │ │ │ │ │ ├── Default-Landscape@~ipadpro.png │ │ │ │ │ ├── Default-Landscape~ipad.png │ │ │ │ │ ├── Default-Portrait@2x~ipad.png │ │ │ │ │ ├── Default-Portrait@~ipadpro.png │ │ │ │ │ ├── Default-Portrait~ipad.png │ │ │ │ │ ├── Default@2x~iphone.png │ │ │ │ │ ├── Default@2x~universal~anyany.png │ │ │ │ │ └── Default~iphone.png │ │ │ └── splash.png │ │ ├── src │ │ │ ├── app │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.html │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.scss │ │ │ │ └── main.ts │ │ │ ├── assets │ │ │ │ ├── icon │ │ │ │ │ └── favicon.ico │ │ │ │ └── imgs │ │ │ │ │ └── logo.png │ │ │ ├── environments │ │ │ │ ├── environment.dev.ts │ │ │ │ ├── environment.e2e.ts │ │ │ │ └── environment.ts │ │ │ ├── index.html │ │ │ ├── manifest.json │ │ │ ├── pages │ │ │ │ ├── about │ │ │ │ │ ├── about.html │ │ │ │ │ ├── about.scss │ │ │ │ │ └── about.ts │ │ │ │ ├── contact │ │ │ │ │ ├── contact.html │ │ │ │ │ ├── contact.scss │ │ │ │ │ └── contact.ts │ │ │ │ ├── home │ │ │ │ │ ├── home.html │ │ │ │ │ ├── home.scss │ │ │ │ │ └── home.ts │ │ │ │ └── tabs │ │ │ │ │ ├── tabs.html │ │ │ │ │ └── tabs.ts │ │ │ ├── polyfills.ts │ │ │ ├── providers │ │ │ │ └── test │ │ │ │ │ ├── test.spec.ts │ │ │ │ │ └── test.ts │ │ │ ├── service-worker.js │ │ │ ├── test.ts │ │ │ ├── theme │ │ │ │ └── variables.scss │ │ │ └── tsconfig.spec.json │ │ ├── tsconfig.json │ │ ├── tsconfig.ng-cli.json │ │ └── tslint.json │ ├── init.sh │ └── sonar-project.properties ├── fe-react │ ├── Jenkinsfile │ ├── README.md │ ├── files │ │ ├── .editorconfig │ │ └── docker │ │ │ ├── Dockerfile │ │ │ └── nginx.vh.default.conf.nginx │ ├── init.sh │ └── sonar-project.properties ├── fe-vue │ ├── Dockerfile │ ├── Jenkinsfile │ ├── README.md │ ├── files │ │ ├── .gitignore │ │ ├── .npmrc │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── cypress.json │ │ ├── docker │ │ │ ├── Dockerfile │ │ │ └── nginx.vh.default.conf.nginx │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── img │ │ │ │ └── icons │ │ │ │ │ ├── android-chrome-192x192.png │ │ │ │ │ ├── android-chrome-512x512.png │ │ │ │ │ ├── apple-touch-icon-120x120.png │ │ │ │ │ ├── apple-touch-icon-152x152.png │ │ │ │ │ ├── apple-touch-icon-180x180.png │ │ │ │ │ ├── apple-touch-icon-60x60.png │ │ │ │ │ ├── apple-touch-icon-76x76.png │ │ │ │ │ ├── apple-touch-icon.png │ │ │ │ │ ├── favicon-16x16.png │ │ │ │ │ ├── favicon-32x32.png │ │ │ │ │ ├── msapplication-icon-144x144.png │ │ │ │ │ ├── mstile-150x150.png │ │ │ │ │ └── safari-pinned-tab.svg │ │ │ ├── index.html │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ ├── src │ │ │ ├── App.vue │ │ │ ├── assets │ │ │ │ └── logo.png │ │ │ ├── components │ │ │ │ └── HelloWorld.vue │ │ │ ├── main.ts │ │ │ ├── registerServiceWorker.ts │ │ │ ├── router.ts │ │ │ ├── shims-tsx.d.ts │ │ │ ├── shims-vue.d.ts │ │ │ └── views │ │ │ │ ├── About.vue │ │ │ │ └── Home.vue │ │ ├── tests │ │ │ ├── e2e │ │ │ │ ├── .eslintrc.js │ │ │ │ ├── plugins │ │ │ │ │ └── index.js │ │ │ │ ├── specs │ │ │ │ │ └── test.js │ │ │ │ └── support │ │ │ │ │ ├── commands.js │ │ │ │ │ └── index.js │ │ │ └── unit │ │ │ │ ├── .eslintrc.js │ │ │ │ └── example.spec.ts │ │ └── tsconfig.json │ ├── init.sh │ └── sonar-project.properties ├── git_push.sh ├── jupyter-notebook │ ├── Jenkinsfile │ ├── README.md │ ├── files │ │ └── docker │ │ │ ├── Dockerfile │ │ │ ├── jupyter_notebook_config.json │ │ │ ├── requirements.txt │ │ │ └── run.sh │ └── init.sh ├── release-manager │ ├── README.md │ ├── create-ocp-resources.sh │ ├── files │ │ ├── Jenkinsfile │ │ ├── README.md │ │ └── docs │ │ │ ├── DTP.yaml │ │ │ ├── DTR.yaml │ │ │ ├── SCP.yaml │ │ │ ├── SCR.yaml │ │ │ ├── TIP.yaml │ │ │ └── TIR.yaml │ ├── init.sh │ └── metadata.yml.tmpl ├── renderJenkinsTemplate.sh ├── renderSonarqubeTemplate.sh └── rshiny-app │ ├── Jenkinsfile │ ├── README.md │ └── docker │ ├── Dockerfile │ └── app.R ├── docs ├── antora.yml └── modules │ └── ROOT │ ├── assets │ └── images │ │ └── Airflow Architecture Diagram.png │ ├── nav.adoc │ └── pages │ ├── __JENKINS_SLAVE_TEMPLATE_README.adoc │ ├── __QS_BOILERPLATE_TEMPLATE_README.adoc │ ├── airflow.adoc │ ├── be-docker-plain.adoc │ ├── be-golang.adoc │ ├── be-java-springboot.adoc │ ├── be-node-express.adoc │ ├── be-python-flask.adoc │ ├── be-scala-akka.adoc │ ├── ds-jupyter-notebook.adoc │ ├── ds-ml-service.adoc │ ├── ds-rshiny-app.adoc │ ├── e2e-cypress.adoc │ ├── fe-angular.adoc │ ├── fe-ionic.adoc │ ├── fe-react.adoc │ ├── fe-vue.adoc │ └── index.adoc ├── jenkins-slaves ├── README.md ├── airflow │ ├── Dockerfile.rhel7 │ ├── README.md │ ├── contrib │ │ ├── bin │ │ │ └── scl_enable │ │ └── npmrc │ └── ocp-config │ │ ├── Tailorfile │ │ ├── bc.yml │ │ └── is.yml ├── golang │ ├── Dockerfile.rhel7 │ └── ocp-config │ │ ├── Tailorfile │ │ ├── bc.yml │ │ └── is.yml ├── maven │ ├── Dockerfile.rhel7 │ ├── README.md │ ├── contrib │ │ ├── bin │ │ │ ├── configure-slave │ │ │ └── scl_enable │ │ └── settings.xml │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── ocp-config │ │ ├── Tailorfile │ │ ├── bc.yml │ │ └── is.yml │ ├── set_gradle_proxy.sh │ └── set_maven_proxy.sh ├── nodejs10-angular │ ├── Dockerfile.rhel7 │ ├── README.md │ ├── contrib │ │ └── bin │ │ │ └── scl_enable │ ├── npmrc │ ├── ocp-config │ │ ├── Tailorfile │ │ ├── bc.yml │ │ └── is.yml │ └── test │ │ └── run ├── nodejs8-angular │ ├── Dockerfile.rhel7 │ ├── contrib │ │ └── bin │ │ │ └── scl_enable │ ├── npmrc │ ├── ocp-config │ │ ├── Tailorfile │ │ ├── bc.yml │ │ └── is.yml │ └── test │ │ └── run ├── python │ ├── Dockerfile.rhel7 │ ├── README.md │ └── ocp-config │ │ ├── Tailorfile │ │ ├── bc.yml │ │ └── is.yml └── scala │ ├── Dockerfile.rhel7 │ ├── README.md │ ├── contrib │ └── bin │ │ ├── scl_enable │ │ └── scl_enable.rhel7 │ ├── ocp-config │ ├── Tailorfile │ ├── bc.yml │ └── is.yml │ ├── sbtconfig │ ├── credentials │ ├── credentials.sbt │ └── repositories │ ├── sbtopts │ └── test │ └── hw.scala ├── ocp-templates ├── Dockerfile ├── Dockerfile-with-config ├── README.md ├── ocp-config │ ├── cd-docgen │ │ ├── Tailorfile │ │ ├── cd-docgen.yml │ │ └── cd-pipeline.yml │ ├── cd-jenkins-master │ │ ├── Tailorfile │ │ ├── cd-jenkins-master.yml │ │ └── cd-jenkins-webhook-proxy.yml │ ├── cd-user │ │ ├── Tailorfile │ │ └── secret.yml │ ├── component-environment │ │ ├── Tailorfile │ │ └── component-template.yml │ ├── component-route │ │ ├── Tailorfile │ │ └── route.yml │ └── rshiny-app │ │ ├── Tailorfile │ │ ├── rshiny-authproxy.yml │ │ └── rshiny.yml ├── root.ca │ ├── ca-bundle.crt │ └── ca-bundle.trust.crt ├── scripts │ ├── check_ocp_secure_routes.sh │ ├── clone-project.sh │ ├── create-cd-jenkins.sh │ ├── create-component.sh │ ├── create-projects.sh │ ├── create-rshiny-app.sh │ ├── delete-projects.sh │ ├── export_ocp_project_metadata.sh │ └── import_ocp_project_metadata.sh └── templates │ └── elasticsearch │ ├── elasticsearch-ephemeral-master-template.yaml │ ├── elasticsearch-ephemeral-node-template.yaml │ ├── elasticsearch-persistent-master-template.yaml │ └── elasticsearch-persistent-node-template.yaml └── rundeck-jobs ├── README.md ├── common ├── cleanup-tmp.yaml ├── prepare-continuous-integration-rshiny.yaml ├── prepare-continuous-integration.yaml └── verify global rundeck settings.yaml ├── openshift ├── check insecure OC routes.yaml ├── create-component.yaml ├── create-projects.yaml ├── create-rshiny.yaml ├── delete-projects.yaml └── export-ocp-artifacts.yaml └── quickstarts ├── airflow.yaml ├── be-docker-plain.yaml ├── be-golang.yaml ├── be_node_express.yaml ├── be_python_flask.yaml ├── be_scala_akka.yaml ├── be_spring_boot.yaml ├── ds_ml_service.yaml ├── fe_angular.yaml ├── fe_ionic_mobile.yaml ├── fe_react.yaml ├── fe_vue.yaml ├── jupyter_notebook.yaml ├── release-manager.yaml └── rshiny_app.yaml /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.txt text 3 | *.sh text eol=lf 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Affected version (please complete the following information):** 27 | - OpenShift: [e.g. 3.9, 3.11] 28 | - OpenDevStack [e.g. 1.0, 1.1] 29 | 30 | **Log Output (ensure to remove any confidential information like tokens, project names, etc.** 31 | ``` 32 | Log output here... 33 | ``` 34 | 35 | **Additional context** 36 | Add any other context about the problem here. 37 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .project 2 | *.env 3 | /ods-project-quickstarters.iml 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ODS Quickstarters 2 | 3 | **CAUTION! This repo is DEPRECATED. For ODS 2+, please see [ods-quickstarters](https://github.com/opendevstack/ods-quickstarters) repository.** 4 | 5 | ## Introduction 6 | 7 | This repository contains quickstarters, which are basically templates that help to start out with a component quickly. 8 | 9 | ## Documentation 10 | 11 | See [OpenDevStack Quickstarters](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) for details. 12 | 13 | The source of this documentation is located in the antora folder at https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages. 14 | 15 | A guide about how to contribute to the documentation is located at [The OpenDevStack documentation](https://www.opendevstack.org/ods-documentation/common/latest/documentation.html). 16 | 17 | -------------------------------------------------------------------------------- /boilerplates/README.md: -------------------------------------------------------------------------------- 1 | # Quickstarter Code Boilerplates 2 | 3 | This folder contains all the code boilerplates, e.g. for Angular, Node.js, Spring Boot - growing list 4 | 5 | These boilerplates are cloned and amended with the right `project specifics` thru the 6 | various [rundeck jobs](https://github.com/opendevstack/ods-project-quickstarters/tree/master/rundeck-jobs), 7 | that are triggered from the [provision application](https://github.com/opendevstack/ods-provisioning-app). 8 | 9 | If you commit a new boilerplate - please also add a `README.md` based on this [template](../__QS_BOILERPLATE_TEMPLATE_README.md) 10 | -------------------------------------------------------------------------------- /boilerplates/airflow/README.md: -------------------------------------------------------------------------------- 1 | # AirFlow Openshift Cluster Boilerplate 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /boilerplates/airflow/files/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rsync -ahq --progress --exclude=.keep --delete src/* docker/dist 4 | -------------------------------------------------------------------------------- /boilerplates/airflow/files/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | # This is a dummy value which OpenShift replaces during build time 2 | FROM oc.registry.url/shared-services/airflow:1.10.3 3 | 4 | ARG nexusHostWithBasicAuth 5 | 6 | COPY dist/requirements.txt ${AIRFLOW_HOME}/ 7 | COPY dist/dags ${AIRFLOW_HOME}/dags 8 | COPY dist/dag_deps ${AIRFLOW_HOME}/dag_deps 9 | COPY scripts/setup.py ${AIRFLOW_HOME}/dag_deps 10 | 11 | USER root 12 | 13 | RUN pip install ${AIRFLOW_HOME}/dag_deps && \ 14 | if [[ ! -z ${nexus_url} ]]; \ 15 | then pip install -i ${nexusHostWithBasicAuth}/repository/pypi-all/simple -r ${AIRFLOW_HOME}/requirements.txt; \ 16 | else pip install -r ${AIRFLOW_HOME}/requirements.txt; \ 17 | fi 18 | 19 | USER 1001 -------------------------------------------------------------------------------- /boilerplates/airflow/files/docker/scripts/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import setuptools 4 | 5 | setuptools.setup(name='airflow-dag-dependencies', 6 | version='0.1', 7 | description='DAG dependencies', 8 | url='https://www.python.org/sigs/distutils-sig/', 9 | packages=setuptools.find_packages(), 10 | install_requires=[] 11 | ) 12 | -------------------------------------------------------------------------------- /boilerplates/airflow/files/src/dag_deps/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/airflow/files/src/dag_deps/.keep -------------------------------------------------------------------------------- /boilerplates/airflow/files/src/dag_deps/dag_deps_package/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/airflow/files/src/dag_deps/dag_deps_package/__init__.py -------------------------------------------------------------------------------- /boilerplates/airflow/files/src/dag_deps/dag_deps_package/crazy_python.py: -------------------------------------------------------------------------------- 1 | class MessagingClass(object): 2 | 3 | def __init__(self, message): 4 | self.message = message 5 | pass 6 | 7 | def __str__(self): 8 | return "{0} {1}".format(type(self), self.message) 9 | -------------------------------------------------------------------------------- /boilerplates/airflow/files/src/dags/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/airflow/files/src/dags/.keep -------------------------------------------------------------------------------- /boilerplates/airflow/files/src/dags/hello_dag.py: -------------------------------------------------------------------------------- 1 | """ 2 | Code that goes along with the Airflow tutorial located at: 3 | https://github.com/apache/airflow/blob/master/airflow/example_dags/tutorial.py 4 | """ 5 | from datetime import datetime, timedelta 6 | 7 | from airflow.models import DAG 8 | from airflow.operators.bash_operator import BashOperator 9 | 10 | default_args = { 11 | 'owner': 'airflow', 12 | 'depends_on_past': False, 13 | 'start_date': datetime(2019, 3, 4), 14 | 'email': ['airflow@example.com'], 15 | 'email_on_failure': False, 16 | 'email_on_retry': False, 17 | 'retries': 1, 18 | 'retry_delay': timedelta(days=30), 19 | # 'queue': 'bash_queue', 20 | # 'pool': 'backfill', 21 | # 'priority_weight': 10, 22 | # 'end_date': datetime(2016, 1, 1), 23 | } 24 | 25 | dag = DAG('Hello_DAG', default_args=default_args, schedule_interval=timedelta(days=1)) 26 | 27 | t1 = BashOperator( 28 | task_id='print_date', 29 | bash_command='date', 30 | dag=dag) 31 | 32 | t2 = BashOperator( 33 | task_id='sleep', 34 | bash_command='sleep 5', 35 | retries=3, 36 | dag=dag) 37 | 38 | templated_command = """ 39 | {% for i in range(10) %} 40 | echo "{{ ds }}" 41 | echo "{{ macros.ds_add(ds, 7)}}" 42 | echo "{{ params.my_param }}" 43 | {% endfor %} 44 | """ 45 | 46 | t3 = BashOperator( 47 | task_id='templated', 48 | bash_command=templated_command, 49 | params={'my_param': 'Parameter I passed in'}, 50 | dag=dag) 51 | 52 | t1.set_downstream(t2) 53 | t2.set_downstream(t3) -------------------------------------------------------------------------------- /boilerplates/airflow/files/src/requirements.txt: -------------------------------------------------------------------------------- 1 | pyspark==2.4.1 -------------------------------------------------------------------------------- /boilerplates/airflow/files/test_all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if `python -c "import xmlrunner" 2> /dev/null`; then 4 | MODULE=xmlrunner 5 | OUTPUT="-o ./artifacts" 6 | else 7 | MODULE=unittest 8 | OUTPUT="" 9 | fi 10 | 11 | PYTHONPATH="src/dag_deps:tests" exec python -m $MODULE discover -s tests -p '*.py' $OUTPUT -------------------------------------------------------------------------------- /boilerplates/airflow/files/test_dag_integrity.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | for i in src/dags/*.py; do 4 | if [[ -f $i ]]; then 5 | printf "$i... " 6 | if `python $i > /dev/null 2> /dev/null`; then 7 | echo "OK" 8 | else 9 | echo "NOK" 10 | exit 1 11 | fi 12 | fi 13 | done; 14 | 15 | 16 | if `python -c "import xmlrunner" 2> /dev/null`; then 17 | MODULE=xmlrunner 18 | OUTPUT="-o ./artifacts" 19 | else 20 | MODULE=unittest 21 | OUTPUT="" 22 | fi 23 | 24 | PYTHONPATH="src/dag_deps:tests" exec python -m $MODULE dags.test_dag_integrity $OUTPUT -------------------------------------------------------------------------------- /boilerplates/airflow/files/tests/dag_deps/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/airflow/files/tests/dag_deps/.keep -------------------------------------------------------------------------------- /boilerplates/airflow/files/tests/dag_deps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/airflow/files/tests/dag_deps/__init__.py -------------------------------------------------------------------------------- /boilerplates/airflow/files/tests/dag_deps/test_crazy_python.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from dag_deps_package.crazy_python import MessagingClass 4 | 5 | 6 | class TestMessagingClass(unittest.TestCase): 7 | 8 | def test_to_str(self): 9 | m = MessagingClass(message="message to display") 10 | 11 | self.assertEquals(" message to display", str(m)) 12 | -------------------------------------------------------------------------------- /boilerplates/airflow/files/tests/dags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/airflow/files/tests/dags/__init__.py -------------------------------------------------------------------------------- /boilerplates/airflow/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | # Get directory of this script 5 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | while [[ "$#" > 0 ]]; do case $1 in 8 | -p=*|--project=*) PROJECT="${1#*=}";; 9 | -p|--project) PROJECT="$2"; shift;; 10 | 11 | -c=*|--component=*) COMPONENT="${1#*=}";; 12 | -c|--component) COMPONENT="$2"; shift;; 13 | 14 | -g=*|--group=*) GROUP="${1#*=}";; 15 | -g|--group) GROUP="$2"; shift;; 16 | 17 | -t=*|--target-dir=*) TARGET_DIR="${1#*=}";; 18 | -t|--target-dir) TARGET_DIR="$2"; shift;; 19 | 20 | -o=*|--owner=*) OWNER="${1#*=}";; 21 | -o|--owner) OWNER="$2"; shift;; 22 | 23 | *) echo "Unknown parameter passed: $1"; exit 1;; 24 | esac; shift; done 25 | 26 | if [[ "$COMPONENT" != "airflow-worker" ]]; then 27 | echo "the component must be named airflow-worker" 28 | exit 1 29 | fi 30 | 31 | cd $TARGET_DIR 32 | 33 | mkdir -p $COMPONENT 34 | 35 | cd $COMPONENT 36 | 37 | sudo chown -R $OWNER . 38 | 39 | echo "copy custom files from quickstart to generated project" 40 | cp -rv $SCRIPT_DIR/files/. . 41 | -------------------------------------------------------------------------------- /boilerplates/airflow/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Project Key (required) 2 | sonar.projectKey=@project_id@-@component_id@ 3 | 4 | # Project Name (optional) 5 | sonar.projectName=@project_id@-@component_id@ 6 | 7 | # Comma-separated paths to directories with sources (required) 8 | sonar.sources=src 9 | 10 | # Forced Language (optional) 11 | sonar.language=py 12 | 13 | # Encoding of the source files (optional but recommended as default is ASCII) 14 | sonar.sourceEncoding=UTF-8 15 | -------------------------------------------------------------------------------- /boilerplates/airflow/templates/service-account.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | annotations: 5 | serviceaccounts.openshift.io/oauth-redirectreference.airflow-webserver: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"airflow-webserver"}}' 6 | labels: 7 | cluster: airflow 8 | name: airflow 9 | -------------------------------------------------------------------------------- /boilerplates/be-docker-plain/README.md: -------------------------------------------------------------------------------- 1 | # Plain docker image (be-docker-plain) 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | 7 | ## Release Manager compatibility 8 | 9 | Being generic, this component does not produce any test results, which are currently required for a component to be successfully orchestrated by the *Release Manager*. That said, if you develop your application component based on this quickstarter, please make sure that test results are provided accordingly: 10 | 11 | 1) Your component has to place its test results in the xUnit XML format in the `build/test-results/test` directory. Make sure that no other `.xml` files are contained therein. 12 | 13 | 2) Your component has to provide these test results to the [Jenkins JUnit plugin](https://plugins.jenkins.io/junit) via its `junit` step function. 14 | 15 | Please feel free to consult our existing quickstarters. An example can be found in the `be-springboot` quickstarter's [Jenkinsfile](https://github.com/opendevstack/ods-project-quickstarters/blob/master/boilerplates/be-springboot/Jenkinsfile). 16 | -------------------------------------------------------------------------------- /boilerplates/be-docker-plain/files/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | # add /overwrite FROM with your base image, and do whatever you like here :) 2 | FROM alpine:latest 3 | 4 | RUN echo "building simple container" 5 | 6 | EXPOSE 8080 7 | 8 | CMD ["/bin/sh", "-c", "/usr/bin/nc -lk -p 8080 -e echo -e \"HTTP/1.1 200 OK\n\nHello World!\n$(date)\""] 9 | -------------------------------------------------------------------------------- /boilerplates/be-docker-plain/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | # Get directory of this script 5 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | while [[ "$#" > 0 ]]; do case $1 in 8 | -p=*|--project=*) PROJECT="${1#*=}";; 9 | -p|--project) PROJECT="$2"; shift;; 10 | 11 | -c=*|--component=*) COMPONENT="${1#*=}";; 12 | -c|--component) COMPONENT="$2"; shift;; 13 | 14 | -g=*|--group=*) GROUP="${1#*=}";; 15 | -g|--group) GROUP="$2"; shift;; 16 | 17 | -t=*|--target-dir=*) TARGET_DIR="${1#*=}";; 18 | -t|--target-dir) TARGET_DIR="$2"; shift;; 19 | 20 | -o=*|--owner=*) OWNER="${1#*=}";; 21 | -o|--owner) OWNER="$2"; shift;; 22 | 23 | *) echo "Unknown parameter passed: $1"; exit 1;; 24 | esac; shift; done 25 | 26 | cd $TARGET_DIR 27 | 28 | mkdir -p $COMPONENT 29 | 30 | cd $COMPONENT 31 | 32 | sudo chown -R $OWNER . 33 | 34 | echo "copy files from quickstart to generated project" 35 | cp -rv $SCRIPT_DIR/files/. . 36 | 37 | -------------------------------------------------------------------------------- /boilerplates/be-docker-plain/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Project Key (required) 2 | sonar.projectKey=@project_id@-@component_id@ 3 | 4 | # Project Name (optional) 5 | sonar.projectName=@project_id@-@component_id@ 6 | 7 | # Comma-separated paths to directories with sources (required) 8 | sonar.sources=docker,src 9 | 10 | # change to your programming language 11 | # sonar.language= 12 | 13 | # Encoding of the source files (optional but recommended as default is ASCII) 14 | sonar.sourceEncoding=UTF-8 15 | -------------------------------------------------------------------------------- /boilerplates/be-golang/README.md: -------------------------------------------------------------------------------- 1 | # Backend - Go (be-golang) 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | -------------------------------------------------------------------------------- /boilerplates/be-golang/files/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine 2 | 3 | COPY app_linux_amd64 app_linux_amd64 4 | 5 | EXPOSE 8080 6 | 7 | CMD ["./app_linux_amd64"] 8 | -------------------------------------------------------------------------------- /boilerplates/be-golang/files/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "net/http" 7 | ) 8 | 9 | func main() { 10 | http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { 11 | fmt.Fprintln(w, "Hello, world!") 12 | }) 13 | 14 | log.Fatal(http.ListenAndServe(":8080", nil)) 15 | } 16 | -------------------------------------------------------------------------------- /boilerplates/be-golang/files/main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "testing" 4 | 5 | func TestExample(t *testing.T) { 6 | expected := 1 7 | actual := 1 8 | if expected != actual { 9 | t.Fatalf("Expected: %d, got: %d", expected, actual) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /boilerplates/be-golang/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | # Get directory of this script 5 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | while [[ "$#" > 0 ]]; do case $1 in 8 | -p=*|--project=*) PROJECT="${1#*=}";; 9 | -p|--project) PROJECT="$2"; shift;; 10 | 11 | -c=*|--component=*) COMPONENT="${1#*=}";; 12 | -c|--component) COMPONENT="$2"; shift;; 13 | 14 | -g=*|--group=*) GROUP="${1#*=}";; 15 | -g|--group) GROUP="$2"; shift;; 16 | 17 | -t=*|--target-dir=*) TARGET_DIR="${1#*=}";; 18 | -t|--target-dir) TARGET_DIR="$2"; shift;; 19 | 20 | -o=*|--owner=*) OWNER="${1#*=}";; 21 | -o|--owner) OWNER="$2"; shift;; 22 | 23 | *) echo "Unknown parameter passed: $1"; exit 1;; 24 | esac; shift; done 25 | 26 | cd $TARGET_DIR 27 | 28 | mkdir -p $COMPONENT 29 | 30 | cd $COMPONENT 31 | 32 | sudo chown -R $OWNER . 33 | 34 | echo "copy files from quickstart to generated project" 35 | cp -rv $SCRIPT_DIR/files/. . 36 | 37 | echo "go mod init" 38 | echo "module example.com/$PROJECT/$COMPONENT" > go.mod 39 | echo "" >> go.mod 40 | echo "go 1.12" >> go.mod 41 | -------------------------------------------------------------------------------- /boilerplates/be-golang/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Project Key (required) 2 | sonar.projectKey=@project_id@-@component_id@ 3 | 4 | # Project Name (optional) 5 | sonar.projectName=@project_id@-@component_id@ 6 | 7 | # Comma-separated paths to directories with sources (required) 8 | sonar.sources=. 9 | sonar.exclusions=**/*_test.go,**/vendor/** 10 | 11 | sonar.tests=. 12 | sonar.test.inclusions=**/*_test.go 13 | sonar.test.exclusions=**/vendor/** 14 | 15 | # change to your programming language 16 | # sonar.language= 17 | 18 | # Encoding of the source files (optional but recommended as default is ASCII) 19 | sonar.sourceEncoding=UTF-8 20 | -------------------------------------------------------------------------------- /boilerplates/be-node-express/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM cd/jenkins-slave-nodejs8-angular 2 | 3 | MAINTAINER "Andreas Bellmann" 4 | 5 | ARG YO_VERSION=3.0.0 6 | ARG GENERATOR_VERSION=0.5.1 7 | 8 | ENV HOME /home/jenkins 9 | 10 | RUN npm install -g yo@$YO_VERSION && \ 11 | npm install -g generator-node-express-typescript@$GENERATOR_VERSION 12 | 13 | WORKDIR /data 14 | 15 | ENTRYPOINT ["yo"] 16 | 17 | CMD ["--help"] 18 | RUN yo --generators 19 | 20 | 21 | -------------------------------------------------------------------------------- /boilerplates/be-node-express/README.md: -------------------------------------------------------------------------------- 1 | # Backend Node (be-node-express) 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | -------------------------------------------------------------------------------- /boilerplates/be-node-express/build.sh: -------------------------------------------------------------------------------- 1 | #1/bin/bash 2 | YO_VERSION=2.0.0 3 | JENKINS_SLAVE=cd/jenkins-slave-nodejs8-angular:latest 4 | 5 | while [[ $# -gt 1 ]] 6 | do 7 | key="$1" 8 | case $key in 9 | --registry) 10 | OCP_DOCKER_REGISTRY="$2" 11 | shift # past argument 12 | ;; 13 | --user) 14 | OCP_DOCKER_REGISTRY_USER="$2" 15 | shift # past argument 16 | ;; 17 | --token) 18 | OCP_DOCKER_REGISTRY_TOKEN="$2" 19 | shift # past argument 20 | ;; 21 | *) 22 | # unknown option 23 | ;; 24 | esac 25 | shift # past argument or value 26 | done 27 | # change to directory of this script 28 | cd $(dirname "$0") 29 | 30 | sudo docker login \ 31 | -u ${OCP_DOCKER_REGISTRY_USER} -p ${OCP_DOCKER_REGISTRY_TOKEN} ${OCP_DOCKER_REGISTRY} 32 | 33 | sudo docker pull \ 34 | ${OCP_DOCKER_REGISTRY}/${JENKINS_SLAVE} 35 | 36 | sudo docker tag \ 37 | ${OCP_DOCKER_REGISTRY}/${JENKINS_SLAVE} ${JENKINS_SLAVE} 38 | 39 | sudo docker build \ 40 | --rm \ 41 | -t yo:latest -t yo:$YO_VERSION \ 42 | --build-arg YO_VERSION=$YO_VERSION \ 43 | . 44 | -------------------------------------------------------------------------------- /boilerplates/be-node-express/files/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:6-alpine 2 | 3 | COPY dist /node 4 | 5 | RUN chown -R node: /node 6 | 7 | EXPOSE 8080 8 | 9 | USER node 10 | 11 | WORKDIR /node 12 | 13 | CMD ["node", "lib/index.js"] 14 | -------------------------------------------------------------------------------- /boilerplates/be-node-express/fix/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./greeter"; 2 | import * as express from "express"; 3 | import {Application} from "express"; 4 | import bodyParser = require("body-parser"); 5 | import weatherRouter from "./routes/weather"; 6 | const app: Application = express(); 7 | 8 | app.use(bodyParser.json({type: "application/json"})); 9 | 10 | // register routes to listen to and expose 11 | app.use("/api/weather", weatherRouter); 12 | 13 | // initialize the webserver 14 | const port = process.env.PORT || "8080"; 15 | app.listen(port, () => { 16 | console.info(`App listening on port ${port}!`); 17 | }); -------------------------------------------------------------------------------- /boilerplates/be-node-express/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | # Get directory of this script 5 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | while [[ "$#" > 0 ]]; do case $1 in 8 | -p=*|--project=*) PROJECT="${1#*=}";; 9 | -p|--project) PROJECT="$2"; shift;; 10 | 11 | -c=*|--component=*) COMPONENT="${1#*=}";; 12 | -c|--component) COMPONENT="$2"; shift;; 13 | 14 | -g=*|--group=*) GROUP="${1#*=}";; 15 | -g|--group) GROUP="$2"; shift;; 16 | 17 | -t=*|--target-dir=*) TARGET_DIR="${1#*=}";; 18 | -t|--target-dir) TARGET_DIR="$2"; shift;; 19 | 20 | -o=*|--owner=*) OWNER="${1#*=}";; 21 | -o|--owner) OWNER="$2"; shift;; 22 | 23 | *) echo "Unknown parameter passed: $1"; exit 1;; 24 | esac; shift; done 25 | 26 | cd $TARGET_DIR 27 | sudo chgrp -R 0 . 28 | 29 | mkdir $COMPONENT 30 | sudo chgrp -R 0 $COMPONENT 31 | 32 | echo "generate project" 33 | sudo docker run --rm -v $PWD/$COMPONENT:/data yo \ 34 | --no-insight node-express-typescript 35 | 36 | cd $COMPONENT 37 | 38 | sudo chown -R $OWNER . 39 | 40 | echo "fix nexus repo path" 41 | repo_path=$(echo "$GROUP" | tr . /) 42 | sed -i.bak "s|org/opendevstack/projectId|$repo_path|g" $SCRIPT_DIR/files/docker/Dockerfile 43 | rm $SCRIPT_DIR/files/docker/Dockerfile.bak 44 | 45 | echo "copy custom files & fixes from quickstart to generated project" 46 | cp -rv $SCRIPT_DIR/files/. . 47 | cp -r $SCRIPT_DIR/fix/. src/ 48 | 49 | echo "adding directories 'lib' and 'docker' to nyc exlude list to fix coverage test issue" 50 | sed -i 's/--reporter=text/--exclude=\\"docker\\" --exclude=\\"lib\\" --reporter=text/g' package.json 51 | -------------------------------------------------------------------------------- /boilerplates/be-node-express/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Project Key (required) 2 | sonar.projectKey=@project_id@-@component_id@ 3 | 4 | # Project Name (optional) 5 | sonar.projectName=@project_id@-@component_id@ 6 | 7 | # Comma-separated paths to directories with sources (required) 8 | sonar.sources=src 9 | 10 | # Forced Language (optional) 11 | sonar.language=ts 12 | 13 | # Encoding of the source files (optional but recommended as default is ASCII) 14 | sonar.sourceEncoding=UTF-8 15 | -------------------------------------------------------------------------------- /boilerplates/be-python-flask/README.md: -------------------------------------------------------------------------------- 1 | # Python Flask Quickstarter (be-python-flask) 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | -------------------------------------------------------------------------------- /boilerplates/be-python-flask/files/docker/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if ! whoami &> /dev/null; then 4 | if [ -w /etc/passwd ]; then 5 | echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd 6 | fi 7 | fi 8 | 9 | cd src && exec python3 app.py 10 | -------------------------------------------------------------------------------- /boilerplates/be-python-flask/files/src/app.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from flask import Flask 3 | from flask.templating import render_template 4 | 5 | app = Flask(__name__) 6 | 7 | 8 | @app.route('/') 9 | def hello(): 10 | return render_template('base.html') 11 | 12 | 13 | app.run('0.0.0.0', 8080, debug=True) 14 | -------------------------------------------------------------------------------- /boilerplates/be-python-flask/files/src/requirements.txt: -------------------------------------------------------------------------------- 1 | flask -------------------------------------------------------------------------------- /boilerplates/be-python-flask/files/src/static/css/main.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | background-color: #61E786; 3 | color: #0A2342; 4 | height: 100%; 5 | } 6 | 7 | h1 { 8 | color: #2CA58D; 9 | } 10 | 11 | .container { 12 | background-color: #FFFDF7; 13 | min-height: 100%; 14 | } -------------------------------------------------------------------------------- /boilerplates/be-python-flask/files/src/static/img/bix.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/be-python-flask/files/src/static/img/bix.jpg -------------------------------------------------------------------------------- /boilerplates/be-python-flask/files/src/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% block head %} 5 | 6 | {% block title %}Base Flask Template{% endblock %} 7 | 8 | 12 | 13 | 16 | 19 | {% endblock %} 20 | 21 | 22 | {% block container %} 23 |
24 | Logo 25 | 26 |

Welcome

27 |

Basic template with Twitter Bootstrap and jQuery available.

28 |
29 | {% endblock %} 30 | 31 | -------------------------------------------------------------------------------- /boilerplates/be-python-flask/files/src/test_requirements.txt: -------------------------------------------------------------------------------- 1 | coverage 2 | nose -------------------------------------------------------------------------------- /boilerplates/be-python-flask/files/src/tests/.coveragerc: -------------------------------------------------------------------------------- 1 | # .coveragerc to control coverage.py 2 | [run] 3 | branch = True 4 | omit = *tests* 5 | *__init__* 6 | -------------------------------------------------------------------------------- /boilerplates/be-python-flask/files/src/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/be-python-flask/files/src/tests/__init__.py -------------------------------------------------------------------------------- /boilerplates/be-python-flask/files/src/tests/tests.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | 4 | class DummyTestSuite(unittest.TestCase): 5 | 6 | def test_upper(self): 7 | self.assertEqual('foo'.upper(), 'FOO') 8 | 9 | def test_isupper(self): 10 | self.assertTrue('FOO'.isupper()) 11 | self.assertFalse('Foo'.isupper()) 12 | 13 | def test_split(self): 14 | s = 'hello world' 15 | self.assertEqual(s.split(), ['hello', 'world']) 16 | # check that s.split fails when the separator is not a string 17 | with self.assertRaises(TypeError): 18 | s.split(2) 19 | 20 | 21 | if __name__ == '__main__': 22 | unittest.main() 23 | -------------------------------------------------------------------------------- /boilerplates/be-python-flask/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | # Get directory of this script 5 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | while [[ "$#" > 0 ]]; do case $1 in 8 | -p=*|--project=*) PROJECT="${1#*=}";; 9 | -p|--project) PROJECT="$2"; shift;; 10 | 11 | -c=*|--component=*) COMPONENT="${1#*=}";; 12 | -c|--component) COMPONENT="$2"; shift;; 13 | 14 | -g=*|--group=*) GROUP="${1#*=}";; 15 | -g|--group) GROUP="$2"; shift;; 16 | 17 | -t=*|--target-dir=*) TARGET_DIR="${1#*=}";; 18 | -t|--target-dir) TARGET_DIR="$2"; shift;; 19 | 20 | -o=*|--owner=*) OWNER="${1#*=}";; 21 | -o|--owner) OWNER="$2"; shift;; 22 | 23 | *) echo "Unknown parameter passed: $1"; exit 1;; 24 | esac; shift; done 25 | 26 | cd $TARGET_DIR 27 | 28 | mkdir -p $COMPONENT 29 | 30 | cd $COMPONENT 31 | 32 | sudo chown -R $OWNER . 33 | 34 | echo "fix nexus repo path" 35 | repo_path=$(echo "$GROUP" | tr . /) 36 | sed -i.bak "s|org/opendevstack/projectId|$repo_path|g" $SCRIPT_DIR/files/docker/Dockerfile 37 | rm $SCRIPT_DIR/files/docker/Dockerfile.bak 38 | 39 | echo "copy custom files from quickstart to generated project" 40 | cp -rv $SCRIPT_DIR/files/. . 41 | -------------------------------------------------------------------------------- /boilerplates/be-python-flask/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Project Key (required) 2 | sonar.projectKey=@project_id@-@component_id@ 3 | 4 | # Project Name (optional) 5 | sonar.projectName=@project_id@-@component_id@ 6 | 7 | # Comma-separated paths to directories with sources (required) 8 | sonar.sources=src 9 | 10 | # Forced Language (optional) 11 | sonar.language=py 12 | 13 | # Encoding of the source files (optional but recommended as default is ASCII) 14 | sonar.sourceEncoding=UTF-8 15 | 16 | # Exclude test files from coverage analysis 17 | sonar.coverage.exclusions=src/tests/** 18 | 19 | # Define unit test information inside the python project 20 | sonar.python.xunit.reportPath=build/test-results/test/nosetests.xml 21 | 22 | # Define coverage information inside the python project 23 | sonar.python.coverage.reportPaths=build/test-results/coverage/coverage.xml 24 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM cd/jenkins-slave-scala 2 | 3 | MAINTAINER "Clemens Utschig" 4 | 5 | WORKDIR /data 6 | 7 | ENV HOME=/home/jenkins 8 | ENV SBT_CREDENTIALS="/home/jenkins/.sbt/credentials" 9 | ENV SBT_OPTS="-Duser.home=/home/jenkins" 10 | 11 | RUN . /tmp/set_java_proxy.sh 12 | 13 | RUN mkdir /tmp/akka-http-quickstart-scala.g8 14 | COPY akka-http-quickstart-scala.g8/ /tmp/akka-http-quickstart-scala.g8 15 | 16 | ENTRYPOINT [""] 17 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/README.md: -------------------------------------------------------------------------------- 1 | # Scala Akka HTTP Quickstarter (be-scala-akka) 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | 7 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/build.sbt: -------------------------------------------------------------------------------- 1 | // This build is for this Giter8 template. 2 | // To test the template run `g8` or `g8Test` from the sbt session. 3 | // See http://www.foundweekends.org/giter8/testing.html#Using+the+Giter8Plugin for more details. 4 | lazy val root = (project in file(".")) 5 | .enablePlugins(ScriptedPlugin) 6 | .settings( 7 | name := "akka-http-scala-seed.g8", 8 | test in Test := { 9 | val _ = (g8Test in Test).toTask("").value 10 | }, 11 | scriptedLaunchOpts ++= List("-Xms1024m", "-Xmx1024m", "-XX:ReservedCodeCacheSize=128m", "-XX:MaxMetaspaceSize=256m", "-Xss2m", "-Dfile.encoding=UTF-8"), 12 | resolvers += Resolver.typesafeIvyRepo("releases") 13 | ) 14 | 15 | // Documentation for this project: 16 | // sbt "project docs" "~ paradox" 17 | // open docs/target/paradox/site/main/index.html 18 | lazy val docs = (project in file("docs")) 19 | .enablePlugins(ParadoxPlugin) 20 | .settings( 21 | resolvers += Resolver.typesafeIvyRepo("releases") 22 | ) 23 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/docs/build.sbt: -------------------------------------------------------------------------------- 1 | // Uses the out of the box generic theme. 2 | paradoxTheme := Some(builtinParadoxTheme("generic")) 3 | 4 | scalaVersion := "2.12.6" 5 | 6 | paradoxProperties in Compile ++= Map( 7 | "snip.g8root.base_dir" -> "../../../../src/main/g8", 8 | "snip.g8src.base_dir" -> "../../../../src/main/g8/src/main/", 9 | "snip.g8srctest.base_dir" -> "../../../../src/main/g8/src/test/", 10 | "extref.akka.base_url" -> "https://doc.akka.io/docs/akka/current/%s", 11 | "extref.akka.http.base_url" -> "https://doc.akka.io/docs/akka-http/current/%s" 12 | ) 13 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/docs/src/main/paradox/images/hello-akka-http.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/docs/src/main/paradox/images/hello-akka-http.png -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/docs/src/main/paradox/images/idea-open-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/docs/src/main/paradox/images/idea-open-project.png -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/docs/src/main/paradox/images/idea-running-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/docs/src/main/paradox/images/idea-running-project.png -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.2.0 2 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/project/giter8.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.foundweekends.giter8" %% "sbt-giter8" % "0.11.0") 2 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/project/paradox.sbt: -------------------------------------------------------------------------------- 1 | // sbt-paradox, used for documentation 2 | addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.3.5") 3 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2") 2 | 3 | addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.2") 4 | 5 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/src/main/g8/build.sbt: -------------------------------------------------------------------------------- 1 | lazy val akkaHttpVersion = "$akka_http_version$" 2 | lazy val akkaVersion = "$akka_version$" 3 | 4 | lazy val root = (project in file(".")). 5 | settings( 6 | inThisBuild(List( 7 | organization := "$organization$", 8 | scalaVersion := "$scala_version$" 9 | )), 10 | name := "$name$", 11 | libraryDependencies ++= Seq( 12 | "com.typesafe.akka" %% "akka-http" % akkaHttpVersion, 13 | "com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion, 14 | "com.typesafe.akka" %% "akka-http-xml" % akkaHttpVersion, 15 | "com.typesafe.akka" %% "akka-stream" % akkaVersion, 16 | 17 | "com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test, 18 | "com.typesafe.akka" %% "akka-testkit" % akkaVersion % Test, 19 | "com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test, 20 | "org.scalatest" %% "scalatest" % "3.0.5" % Test 21 | ) 22 | ) 23 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/src/main/g8/default.properties: -------------------------------------------------------------------------------- 1 | name=My Akka HTTP Project 2 | description=This is a seed project which creates a basic build for an Akka HTTP application using Scala. 3 | scala_version=2.12.6 4 | akka_http_version=10.1.4 5 | akka_version=2.5.16 6 | organization=com.example 7 | package=$organization$ 8 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/src/main/g8/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.2.0 2 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/src/main/g8/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2") 2 | 3 | addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") 4 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/src/main/g8/src/main/scala/$package$/JsonSupport.scala: -------------------------------------------------------------------------------- 1 | package $package$ 2 | 3 | import $package$.UserRegistryActor.ActionPerformed 4 | 5 | //#json-support 6 | import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport 7 | import spray.json.DefaultJsonProtocol 8 | 9 | trait JsonSupport extends SprayJsonSupport { 10 | // import the default encoders for primitive types (Int, String, Lists etc) 11 | import DefaultJsonProtocol._ 12 | 13 | implicit val userJsonFormat = jsonFormat3(User) 14 | implicit val usersJsonFormat = jsonFormat1(Users) 15 | 16 | implicit val actionPerformedJsonFormat = jsonFormat1(ActionPerformed) 17 | } 18 | //#json-support 19 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/akka-http-quickstart-scala.g8/src/main/g8/src/main/scala/$package$/UserRegistryActor.scala: -------------------------------------------------------------------------------- 1 | package $package$ 2 | 3 | //#user-registry-actor 4 | import akka.actor.{ Actor, ActorLogging, Props } 5 | 6 | //#user-case-classes 7 | final case class User(name: String, age: Int, countryOfResidence: String) 8 | final case class Users(users: Seq[User]) 9 | //#user-case-classes 10 | 11 | object UserRegistryActor { 12 | final case class ActionPerformed(description: String) 13 | final case object GetUsers 14 | final case class CreateUser(user: User) 15 | final case class GetUser(name: String) 16 | final case class DeleteUser(name: String) 17 | 18 | def props: Props = Props[UserRegistryActor] 19 | } 20 | 21 | class UserRegistryActor extends Actor with ActorLogging { 22 | import UserRegistryActor._ 23 | 24 | var users = Set.empty[User] 25 | 26 | def receive: Receive = { 27 | case GetUsers => 28 | sender() ! Users(users.toSeq) 29 | case CreateUser(user) => 30 | users += user 31 | sender() ! ActionPerformed(s"User \${user.name} created.") 32 | case GetUser(name) => 33 | sender() ! users.find(_.name == name) 34 | case DeleteUser(name) => 35 | users.find(_.name == name) foreach { user => users -= user } 36 | sender() ! ActionPerformed(s"User \${name} deleted.") 37 | } 38 | } 39 | //#user-registry-actor -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/build.sh: -------------------------------------------------------------------------------- 1 | #1/bin/bash 2 | SCALA_VERSION=2.11.8 3 | JENKINS_SLAVE=cd/jenkins-slave-scala:latest 4 | 5 | while [[ $# -gt 1 ]] 6 | do 7 | key="$1" 8 | case $key in 9 | --registry) 10 | OCP_DOCKER_REGISTRY="$2" 11 | shift # past argument 12 | ;; 13 | --user) 14 | OCP_DOCKER_REGISTRY_USER="$2" 15 | shift # past argument 16 | ;; 17 | --token) 18 | OCP_DOCKER_REGISTRY_TOKEN="$2" 19 | shift # past argument 20 | ;; 21 | *) 22 | # unknown option 23 | ;; 24 | esac 25 | shift # past argument or value 26 | done 27 | 28 | # change to directory of this script 29 | cd $(dirname "$0") 30 | 31 | sudo docker login \ 32 | -u ${OCP_DOCKER_REGISTRY_USER} -p ${OCP_DOCKER_REGISTRY_TOKEN} ${OCP_DOCKER_REGISTRY} 33 | 34 | sudo docker pull \ 35 | ${OCP_DOCKER_REGISTRY}/${JENKINS_SLAVE} 36 | 37 | sudo docker tag \ 38 | ${OCP_DOCKER_REGISTRY}/${JENKINS_SLAVE} ${JENKINS_SLAVE} 39 | 40 | sudo docker build \ 41 | --rm \ 42 | -t scala:latest -t scala:$SCALA_VERSION \ 43 | --build-arg SCALA_VERSION=$SCALA_VERSION \ 44 | . 45 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/files/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jre-alpine 2 | 3 | COPY sclapp.jar sclapp.jar 4 | 5 | EXPOSE 8080 6 | 7 | CMD ["java", "-jar", "sclapp.jar"] 8 | -------------------------------------------------------------------------------- /boilerplates/be-scala-akka/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Project Key (required) 2 | sonar.projectKey=@project_id@-@component_id@ 3 | 4 | # Project Name (optional) 5 | sonar.projectName=@project_id@-@component_id@ 6 | 7 | # Comma-separated paths to directories with sources (required) 8 | sonar.sources=src 9 | 10 | # Forced Language (optional) 11 | sonar.language=scala 12 | 13 | # Encoding of the source files (optional but recommended as default is ASCII) 14 | sonar.sourceEncoding=UTF-8 15 | -------------------------------------------------------------------------------- /boilerplates/be-springboot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM cd/jenkins-slave-maven 2 | 3 | MAINTAINER "Clemens Utschig" 4 | 5 | ENV HOME=/home/jenkins 6 | ENV SDKMAN_DIR $HOME/.sdkman 7 | 8 | RUN \ 9 | curl -s "https://get.sdkman.io" | bash 10 | 11 | ARG SPRING_CLI_VERSION 12 | 13 | RUN /bin/bash -lc "source /home/jenkins/.sdkman/bin/sdkman-init.sh && sdk install springboot $SPRING_CLI_VERSION && \ 14 | spring --version" 15 | 16 | WORKDIR /data 17 | 18 | ADD spring_wrapped.sh /home/jenkins/.sdkman/candidates/springboot/current/bin 19 | 20 | ENTRYPOINT ["/home/jenkins/.sdkman/candidates/springboot/current/bin/spring_wrapped.sh"] 21 | 22 | CMD ["--help"] 23 | -------------------------------------------------------------------------------- /boilerplates/be-springboot/README.md: -------------------------------------------------------------------------------- 1 | # Spring Boot Quickstarter 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | -------------------------------------------------------------------------------- /boilerplates/be-springboot/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | SPRING_CLI_VERSION=2.2.1.RELEASE 3 | JENKINS_SLAVE=cd/jenkins-slave-maven:latest 4 | 5 | while [[ $# -gt 1 ]] 6 | do 7 | key="$1" 8 | case $key in 9 | --registry) 10 | OCP_DOCKER_REGISTRY="$2" 11 | shift # past argument 12 | ;; 13 | --user) 14 | OCP_DOCKER_REGISTRY_USER="$2" 15 | shift # past argument 16 | ;; 17 | --token) 18 | OCP_DOCKER_REGISTRY_TOKEN="$2" 19 | shift # past argument 20 | ;; 21 | *) 22 | # unknown option 23 | ;; 24 | esac 25 | shift # past argument or value 26 | done 27 | 28 | # change to directory of this script 29 | cd $(dirname "$0") 30 | 31 | sudo docker login \ 32 | -u ${OCP_DOCKER_REGISTRY_USER} -p ${OCP_DOCKER_REGISTRY_TOKEN} ${OCP_DOCKER_REGISTRY} 33 | 34 | sudo docker pull \ 35 | ${OCP_DOCKER_REGISTRY}/${JENKINS_SLAVE} 36 | 37 | sudo docker tag \ 38 | ${OCP_DOCKER_REGISTRY}/${JENKINS_SLAVE} ${JENKINS_SLAVE} 39 | 40 | sudo docker build \ 41 | --rm \ 42 | -t springboot:latest -t springboot:$SPRING_CLI_VERSION \ 43 | --build-arg SPRING_CLI_VERSION=$SPRING_CLI_VERSION \ 44 | . 45 | -------------------------------------------------------------------------------- /boilerplates/be-springboot/files/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM adoptopenjdk/openjdk11:alpine-jre 2 | 3 | COPY app.jar app.jar 4 | 5 | EXPOSE 8080 6 | 7 | CMD ["java","-Xmx512m", "-jar", "app.jar"] 8 | -------------------------------------------------------------------------------- /boilerplates/be-springboot/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Project Key (required) 2 | sonar.projectKey=@project_id@-@component_id@ 3 | 4 | # Project Name (optional) 5 | sonar.projectName=@project_id@-@component_id@ 6 | 7 | # Comma-separated paths to directories with sources (required) 8 | sonar.sources=src 9 | 10 | # Forced Language (optional) 11 | sonar.language=java 12 | 13 | # Encoding of the source files (optional but recommended as default is ASCII) 14 | sonar.sourceEncoding=UTF-8 15 | 16 | # Plugin-specific settings 17 | sonar.java.binaries=build/classes 18 | sonar.java.libraries=docker 19 | sonar.junit.reportPaths=build/test-results/test 20 | sonar.jacoco.reportPaths=build/jacoco/test.exec 21 | -------------------------------------------------------------------------------- /boilerplates/be-springboot/spring_wrapped.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -x 3 | 4 | echo "Spring CLI wrapper Arguments:" 5 | for an_arg in "$@" ; do 6 | echo "${an_arg}" 7 | done 8 | 9 | if [[ $JAVA_OPTS == "" ]]; then 10 | echo "JOPTS not set" 11 | export JAVA_OPTS= 12 | fi 13 | 14 | . /tmp/set_java_proxy.sh 15 | 16 | echo $JAVA_OPTS 17 | 18 | /home/jenkins/.sdkman/candidates/springboot/current/bin/spring "$@" -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/README.md: -------------------------------------------------------------------------------- 1 | # Data Science Industrialization Boilerplate 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/build.bat: -------------------------------------------------------------------------------- 1 | REM This .bat script is for local testing on windows machines 2 | 3 | setlocal enableDelayedExpansion 4 | 5 | git rev-parse HEAD > temp.txt 6 | set /p GIT_REV_PARSE_HEAD= src/services/infrastructure/git_info.py 8 | 9 | git rev-parse --short HEAD > temp.txt 10 | set /p GIT_REV_PARSE_HEAD_SHORT=> src/services/infrastructure/git_info.py 12 | 13 | git rev-parse --abbrev-ref HEAD > temp.txt 14 | set /p GIT_REV_PARSE_BRANCH=> src/services/infrastructure/git_info.py 16 | 17 | git rev-parse --show-toplevel > temp.txt 18 | set /p GIT_TOP_LEVEL=> src/services/infrastructure/git_info.py 20 | 21 | @echo GIT_LAST_CHANGE = "Local Test on Windows machine" >> src/services/infrastructure/git_info.py 22 | del temp.txt 23 | 24 | del docker\dist\ /S /Q 25 | 26 | xcopy /s src docker\dist\ 27 | xcopy /s resources docker\dist\resources 28 | xcopy /s .dvc docker\dist\.dvc 29 | 30 | copy test\run_integration_tests.sh docker\dist 31 | copy test\run_unittests.sh docker\dist 32 | 33 | -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | GIT_REV_PARSE_HEAD=`git rev-parse HEAD` 4 | GIT_REV_PARSE_HEAD_SHORT=`git rev-parse --short HEAD` 5 | GIT_REV_PARSE_BRANCH=`git rev-parse --abbrev-ref HEAD` 6 | GIT_TOP_LEVEL=`git rev-parse --show-toplevel` 7 | GIT_REPO_NAME=`basename ${GIT_TOP_LEVEL}` 8 | GIT_LAST_CHANGE=`git log -1` 9 | 10 | echo "GIT_COMMIT = \"${GIT_REV_PARSE_HEAD}\"" > src/services/infrastructure/git_info.py 11 | echo "GIT_COMMIT_SHORT = \"${GIT_REV_PARSE_HEAD_SHORT}\"" >> src/services/infrastructure/git_info.py 12 | echo "GIT_BRANCH = \"${GIT_REV_PARSE_BRANCH}\"" >> src/services/infrastructure/git_info.py 13 | echo "GIT_REPO_NAME = \"${GIT_REPO_NAME}\"" >> src/services/infrastructure/git_info.py 14 | echo "GIT_LAST_CHANGE = \"\"\"${GIT_LAST_CHANGE}\"\"\"" >> src/services/infrastructure/git_info.py 15 | 16 | rsync -ahq --progress --delete src/* docker/dist 17 | rsync -ahq --progress --delete test docker/dist 18 | rsync -ahq --progress --delete resources docker/dist 19 | rsync -ahq --progress --delete test/run_integration_tests.sh docker/dist 20 | rsync -ahq --progress --delete test/run_unittests.sh docker/dist 21 | 22 | # Copy dvc folder if dvc is actually used 23 | if [ -e .dvc ] 24 | then rsync -ahq --progress --delete .dvc docker/dist 25 | fi 26 | -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/model/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/src/model/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/model/data_cleaning/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/src/model/data_cleaning/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/model/data_cleaning/replace.py: -------------------------------------------------------------------------------- 1 | def replace_missing(dataframe): 2 | """Stupid example implementation of removing missing values and replacing them with a 0 3 | 4 | Parameters 5 | ---------- 6 | dataframe : pandas.DataFrame 7 | Input DataFrame 8 | 9 | Returns 10 | ------- 11 | dataframe : pandas.DataFrame 12 | Output DataFrame 13 | """ 14 | return dataframe.fillna(0) 15 | 16 | 17 | def replace_strings(dataframe): 18 | """Stupid example implementation of removing invalid characters and replacing them with a 0 19 | 20 | Parameters 21 | ---------- 22 | dataframe : pandas.DataFrame 23 | Input DataFrame 24 | 25 | Returns 26 | ------- 27 | dataframe : pandas.DataFrame 28 | Output DataFrame 29 | """ 30 | return dataframe.replace("xx", 0) 31 | -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/model/feature_prep/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/src/model/feature_prep/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/model/feature_prep/polynomial.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | 4 | def add_polynomial(dataframe, input_col, output_col, power=2): 5 | """Creates polynomial feature extension that adds newly created features to a DataFrame. 6 | Example implementation of do feature engineering only creating the powers 7 | 8 | Parameters 9 | ---------- 10 | dataframe : pandas.DataFrame 11 | input_col : String 12 | Name of the column to be mutated. 13 | output_col : String 14 | New column name with 15 | power : int 16 | the power of the new column 17 | 18 | Returns 19 | ------- 20 | dataframe : pandas.DataFrame 21 | DataFrame with newly created column 22 | 23 | """ 24 | dataframe[output_col] = np.power(dataframe[input_col].values, power) 25 | return dataframe 26 | -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==1.0.2 2 | requests==2.21.0 3 | flask-executor==0.8.3 4 | pandas==0.23.4 5 | scikit-learn==0.20.2 6 | numpy==1.16.0 7 | fabric==2.5.0 8 | Flask-HTTPAuth==3.2.4 9 | dvc==0.35.7 10 | gunicorn==19.9.0 -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if ! whoami &> /dev/null; then 4 | if [ -w /etc/passwd ]; then 5 | echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd 6 | fi 7 | fi 8 | 9 | echo "service type:" 10 | echo $SERVICE_TYPE 11 | 12 | exec gunicorn -b :8080 services.$SERVICE_TYPE.app:gunicorn_app 13 | -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/services/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/src/services/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/services/infrastructure/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/src/services/infrastructure/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/services/infrastructure/flask.py: -------------------------------------------------------------------------------- 1 | import uuid 2 | 3 | import jinja2 4 | from flask import Flask 5 | from flask_executor import Executor 6 | from flask_httpauth import HTTPBasicAuth 7 | 8 | from services.infrastructure.logging import read_log 9 | 10 | 11 | def init_flask(): 12 | app = Flask(__name__) 13 | app.config['SECRET_KEY'] = str(uuid.uuid4()) 14 | executor = Executor(app) 15 | auth = HTTPBasicAuth() 16 | loader = jinja2.ChoiceLoader([ 17 | app.jinja_loader, 18 | jinja2.FileSystemLoader(['services/training/templates', 'services/prediction/templates']), 19 | ]) 20 | app.jinja_loader = loader 21 | 22 | @auth.get_password 23 | def get_password(username): 24 | if username in app.config['USERS']: 25 | return app.config['USERS'].get(username) 26 | return None 27 | 28 | return app, executor, auth 29 | 30 | 31 | def status() -> str: 32 | logs = read_log() 33 | return logs if logs else "Training not started" 34 | -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/services/infrastructure/remote/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/src/services/infrastructure/remote/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/services/infrastructure/remote/dvc/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/src/services/infrastructure/remote/dvc/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/services/infrastructure/remote/scripts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/src/services/infrastructure/remote/scripts/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/services/infrastructure/remote/scripts/remote_trainer.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file contains the script for executing the training in a remote machine 3 | """ 4 | 5 | if __name__ == '__main__': 6 | import argparse 7 | import os 8 | from services.infrastructure.logging import initialize_logging 9 | from model.trainer import train 10 | 11 | parser = argparse.ArgumentParser(description="Remote training script") 12 | parser.add_argument("--env", "-e", required=True, type=str, help="Environment folder/name") 13 | parser.add_argument("--dvc_remote", "-r", required=False, type=str, default=None, 14 | help="dvc remote repository name") 15 | parser.add_argument("--dvc_user", "-u", required=False, type=str, default=None, 16 | help="ssh user for the remote dvc repository") 17 | parser.add_argument("--dvc_password", "-p", required=False, type=str, default=None, 18 | help="ssh password for the remote dvc repository") 19 | parser.add_argument("--debug", "-d", required=False, default=True, help="Enables debug mode") 20 | 21 | args = parser.parse_args() 22 | 23 | os.chdir(args.env) 24 | initialize_logging(path="training-remote.log", remote=True, debug=args.debug) 25 | train(dvc_data_repo=args.dvc_remote, dvc_ssh_user=args.dvc_user, 26 | dvc_ssh_password=args.dvc_password) 27 | -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/services/infrastructure/remote/ssh/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/src/services/infrastructure/remote/ssh/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/services/infrastructure/remote/ssh/exceptions.py: -------------------------------------------------------------------------------- 1 | from invoke import Result 2 | 3 | 4 | class RemoteExecutionException(Exception): 5 | """Exception that is raised when a remote execution fails""" 6 | 7 | def __init__(self, message: str, result: Result): 8 | """ 9 | 10 | Parameters 11 | ---------- 12 | message: str 13 | Message to be displayed 14 | result: invoke.Result 15 | The result of the remote call for being printed 16 | """ 17 | super(RemoteExecutionException, self).__init__() 18 | self.message = message 19 | self.remote_result = result 20 | 21 | def __str__(self): 22 | return """{message} 23 | CMD: {remote_result.command} 24 | Exit Code: {remote_result.exited} 25 | 26 | ### stdout ### 27 | {remote_result.stdout} 28 | ### stderr ### 29 | {remote_result.stderr} 30 | ##############""".format(message=self.message, remote_result=self.remote_result) 31 | -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/services/prediction/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/src/services/prediction/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/services/training/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/src/services/training/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/src/services/training/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ git["name"] }} - Training Service 6 | 7 | 8 | 9 |

{{ git["name"]}} - Training Service

10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 29 | 30 | 31 | 32 | 35 | 36 | 37 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
Repository Name: 15 |
{{git["name"]}}
16 |
Branch: 21 |
{{git["branch"]}}
22 |
Commit: 27 |
{{git["commit"]}}
28 |
Short Commit: 33 |
{{git["commit_short"]}}
34 |
Last Change:
38 |
{{ git["last_change"] }}
39 |
47 |

Status:

48 |
{{ status }}
49 | 50 | -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/test/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/test/integration_tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/test/integration_tests/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/test/integration_tests/services/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/test/integration_tests/services/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/test/integration_tests/services/prediction/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/test/integration_tests/services/prediction/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/test/run_integration_tests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | PYTHONPATH=. nosetests -v --with-xunit --with-coverage --cover-xml --cover-erase --cover-inclusive --cover-package=. -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/test/run_unittests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cd test/unittests && 3 | PYTHONPATH=. nosetests -v --with-xunit --with-coverage --cover-xml --cover-erase --cover-inclusive --cover-package=../.. -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/test/unittests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/test/unittests/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/test/unittests/model/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/test/unittests/model/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/test/unittests/model/feature_prep/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/ds-ml-service/files/test/unittests/model/feature_prep/__init__.py -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/files/test/unittests/model/feature_prep/test_polynomial.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | import pandas as pd 4 | 5 | from model.feature_prep.polynomial import add_polynomial 6 | 7 | 8 | class TestPolynomialFeature(unittest.TestCase): 9 | 10 | def test_polynomial(self): 11 | test_data = {"a": [1, 2, 3]} 12 | test_data_df = pd.DataFrame(test_data) 13 | 14 | res = add_polynomial(test_data_df, "a", "a**2", 2) 15 | self.assertListEqual(res["a**2"].values.tolist(), [1, 4, 9]) 16 | -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | # Get directory of this script 5 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | while [[ "$#" > 0 ]]; do case $1 in 8 | -p=*|--project=*) PROJECT="${1#*=}";; 9 | -p|--project) PROJECT="$2"; shift;; 10 | 11 | -c=*|--component=*) COMPONENT="${1#*=}";; 12 | -c|--component) COMPONENT="$2"; shift;; 13 | 14 | -g=*|--group=*) GROUP="${1#*=}";; 15 | -g|--group) GROUP="$2"; shift;; 16 | 17 | -t=*|--target-dir=*) TARGET_DIR="${1#*=}";; 18 | -t|--target-dir) TARGET_DIR="$2"; shift;; 19 | 20 | -o=*|--owner=*) OWNER="${1#*=}";; 21 | -o|--owner) OWNER="$2"; shift;; 22 | 23 | *) echo "Unknown parameter passed: $1"; exit 1;; 24 | esac; shift; done 25 | 26 | cd $TARGET_DIR 27 | 28 | mkdir -p $COMPONENT 29 | 30 | cd $COMPONENT 31 | 32 | sudo chown -R $OWNER . 33 | 34 | echo "copy custom files from quickstart to generated project and the README" 35 | cp -rv $SCRIPT_DIR/README.md $SCRIPT_DIR/files/README.md 36 | cp -rv $SCRIPT_DIR/files/. . 37 | -------------------------------------------------------------------------------- /boilerplates/ds-ml-service/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Project Key (required) 2 | sonar.projectKey=@project_id@-@component_id@ 3 | 4 | # Project Name (optional) 5 | sonar.projectName=@project_id@-@component_id@ 6 | 7 | # Comma-separated paths to directories with sources (required) 8 | sonar.sources=src 9 | 10 | # Forced Language (optional) 11 | sonar.language=py 12 | 13 | # Encoding of the source files (optional but recommended as default is ASCII) 14 | sonar.sourceEncoding=UTF-8 15 | -------------------------------------------------------------------------------- /boilerplates/e2e-cypress/Jenkinsfile: -------------------------------------------------------------------------------- 1 | /* generated jenkins file used for building and deploying @component_id@ in projects @project_id@ */ 2 | def final projectId = '@project_id@' 3 | def final componentId = '@component_id@' 4 | def final credentialsId = "${projectId}-cd-cd-user-with-password" 5 | def sharedLibraryRepository 6 | def dockerRegistry 7 | node { 8 | sharedLibraryRepository = env.SHARED_LIBRARY_REPOSITORY 9 | dockerRegistry = env.DOCKER_REGISTRY 10 | } 11 | 12 | library identifier: 'ods-library@production', retriever: modernSCM( 13 | [$class: 'GitSCMSource', 14 | remote: sharedLibraryRepository, 15 | credentialsId: credentialsId]) 16 | 17 | /* 18 | See readme of shared library for usage and customization 19 | @ https://github.com/opendevstack/ods-jenkins-shared-library/blob/master/README.md 20 | eg. to create and set your own builder slave instead of 21 | the node js slave used here - the code of the slave can be found at 22 | https://github.com/opendevstack/ods-project-quickstarters/tree/master/jenkins-slaves/nodejs8-angular 23 | */ 24 | odsPipeline( 25 | image: "${dockerRegistry}/cd/jenkins-slave-nodejs8-angular", 26 | projectId: projectId, 27 | componentId: componentId, 28 | branchToEnvironmentMapping: [ 29 | 'master': 'test', 30 | '*': 'dev' 31 | ] 32 | ) { context -> 33 | stageTest(context) 34 | } 35 | 36 | def stageTest(def context) { 37 | stage('Test') { 38 | withEnv(["TAGVERSION=${context.tagversion}", "NEXUS_HOST=${context.nexusHost}"]) { 39 | sh "npm install" 40 | sh "npm run lint" 41 | sh "npm run build" 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /boilerplates/e2e-cypress/README.md: -------------------------------------------------------------------------------- 1 | # End-to-end tests with cypress (e2e-cypress) 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | 7 | -------------------------------------------------------------------------------- /boilerplates/e2e-cypress/files/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | .c9/ 16 | *.launch 17 | .settings/ 18 | *.sublime-workspace 19 | 20 | # IDE - VSCode 21 | .vscode/* 22 | !.vscode/settings.json 23 | !.vscode/tasks.json 24 | !.vscode/launch.json 25 | !.vscode/extensions.json 26 | 27 | # misc 28 | /.sass-cache 29 | /connect.lock 30 | /coverage 31 | /libpeerconnection.log 32 | npm-debug.log 33 | testem.log 34 | /typings 35 | 36 | # tests 37 | /artifacts 38 | 39 | # e2e 40 | /build/ 41 | /screenshots/ 42 | /videos/ 43 | secrets.json 44 | 45 | # System Files 46 | .DS_Store 47 | Thumbs.db 48 | -------------------------------------------------------------------------------- /boilerplates/e2e-cypress/files/README.md: -------------------------------------------------------------------------------- 1 | # cypress e2e tests 2 | 3 | This e2e testing project was generated from the e2e-cypress quickstarter 4 | 5 | ## Running end-to-end tests 6 | 7 | Run `npm run e2e` to execute the end-to-end tests via [cypress](http://www.cypress.io) against the test instance of the front end. 8 | 9 | Please note: For now the URL of this test instance is hard-coded inside the `package.json` file. There should be a better solution for handing this over. It is also possible to run `npm run e2e-at` with an additional parameter, e.g. `npm run e2e-at https://domain.com`. 10 | 11 | Run `npm run watch` to develop the e2e test. The tests will automatically rebuild and run, if you change any of the source files. 12 | The test will run against a local instance of the front end, e.g. `localhost:4200`. This destination is configurable in `cypress.json`. Provide credentials for a test user by defining them in a file called `secrets.json` inside the base directory. This file should have the following format: 13 | { 14 | "e2e": { 15 | "testUserName": "User Name", 16 | "testUserPassword": "xxxx" 17 | } 18 | } 19 | 20 | Please note: `secrets.json` is mentioned in `.gitignore` to prevent it from being added to version control. Please keep it this way. 21 | 22 | ## Links 23 | * [cypress](http://www.cypress.io) 24 | * [cypress API](https://docs.cypress.io/api/introduction/api.html) 25 | * [cypress Best Practices](https://docs.cypress.io/guides/references/best-practices.html) 26 | -------------------------------------------------------------------------------- /boilerplates/e2e-cypress/files/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:4200", 3 | "fixturesFolder": "fixtures", 4 | "integrationFolder": "build", 5 | "pluginsFile": "plugins/index.js", 6 | "supportFile": "build/support", 7 | "viewportWidth": 1376, 8 | "viewportHeight": 660 9 | } 10 | -------------------------------------------------------------------------------- /boilerplates/e2e-cypress/files/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } -------------------------------------------------------------------------------- /boilerplates/e2e-cypress/files/integration/main.spec.ts: -------------------------------------------------------------------------------- 1 | import { LoginCommand } from '../support/commands'; 2 | 3 | /* tslint:disable:no-unused-expression */ 4 | describe('e2e tests', function () { 5 | 6 | it('Application is reachable', function () { 7 | cy.visit(''); 8 | // cy.title().should('include', 'My Application Title'); 9 | }); 10 | 11 | context('Login', function () { 12 | it('Enter wrong username and password', function () { 13 | // try to login with false credentials 14 | }); 15 | 16 | it('Enter username and password and check successful login with Crowd test user', function () { 17 | // (cy as LoginCommand).crowdLogin(true); 18 | // checks, if login was successful: 19 | // 20 | }); 21 | 22 | it('Direct login by setting the token', function () { 23 | // (cy as LoginCommand).crowdLogin(false); 24 | // cy.visit(''); 25 | // checks, if login was successful: 26 | // 27 | }); 28 | }); 29 | 30 | }); 31 | -------------------------------------------------------------------------------- /boilerplates/e2e-cypress/files/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "e2e", 3 | "version": "0.0.0", 4 | "license": "MIT", 5 | "scripts": { 6 | "lint": "tslint --project .", 7 | "build": "tsc --project .", 8 | "watch": "npm-run-all --parallel \"build -- --watch\" \"cypress:open\"", 9 | "e2e": "npm run e2e-at https://domain.com", 10 | "e2e-at": "npm-run-all build \"cypress:run -- --browser chrome --config video=false,baseUrl={1}\" --", 11 | "cypress:open": "cypress open", 12 | "cypress:run": "cypress run --config video=false", 13 | "all": "npm-run-all lint build cypress:run" 14 | }, 15 | "private": true, 16 | "dependencies": { 17 | "rxjs": "^6.3.3" 18 | }, 19 | "devDependencies": { 20 | "@types/node": "^8.9.4", 21 | "cypress": "3.1.2", 22 | "npm-run-all": "^4.1.3", 23 | "rxjs-tslint": "^0.1.5", 24 | "ts-node": "^7.0.1", 25 | "tslint": "~5.11.0", 26 | "tslint-language-service": "^0.9.9", 27 | "typescript": "~3.1.6" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /boilerplates/e2e-cypress/files/plugins/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example plugins/index.js can be used to load plugins 3 | // 4 | // You can change the location of this file or turn off loading 5 | // the plugins file with the 'pluginsFile' configuration option. 6 | // 7 | // You can read more here: 8 | // https://on.cypress.io/plugins-guide 9 | // *********************************************************** 10 | 11 | // This function is called when a project is opened or re-opened (e.g. due to 12 | // the project's config changing) 13 | 14 | module.exports = (on, config) => { 15 | // `on` is used to hook into various events Cypress emits 16 | // `config` is the resolved Cypress config 17 | } 18 | -------------------------------------------------------------------------------- /boilerplates/e2e-cypress/files/support/index.ts: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands'; 18 | 19 | // Alternatively you can use CommonJS syntax: 20 | // require('./commands') 21 | -------------------------------------------------------------------------------- /boilerplates/e2e-cypress/files/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "integration/**/*.spec.ts", 4 | "support/*.ts", 5 | "plugins/*.ts", 6 | "node_modules/cypress" 7 | ], 8 | "compilerOptions": { 9 | "baseUrl": "./", 10 | "outDir": "build", 11 | "sourceMap": false, 12 | "declaration": false, 13 | "moduleResolution": "node", 14 | "target": "es5", 15 | "skipLibCheck": true, 16 | "typeRoots": [ 17 | "node_modules/@types" 18 | ], 19 | "lib": [ 20 | "es2017", 21 | "dom" 22 | ], 23 | "types": ["cypress"] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /boilerplates/e2e-cypress/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | # Get directory of this script 5 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | while [[ "$#" > 0 ]]; do case $1 in 8 | -p=*|--project=*) PROJECT="${1#*=}";; 9 | -p|--project) PROJECT="$2"; shift;; 10 | 11 | -c=*|--component=*) COMPONENT="${1#*=}";; 12 | -c|--component) COMPONENT="$2"; shift;; 13 | 14 | -g=*|--group=*) GROUP="${1#*=}";; 15 | -g|--group) GROUP="$2"; shift;; 16 | 17 | -t=*|--target-dir=*) TARGET_DIR="${1#*=}";; 18 | -t|--target-dir) TARGET_DIR="$2"; shift;; 19 | 20 | -o=*|--owner=*) OWNER="${1#*=}";; 21 | -o|--owner) OWNER="$2"; shift;; 22 | 23 | *) echo "Unknown parameter passed: $1"; exit 1;; 24 | esac; shift; done 25 | 26 | cd $TARGET_DIR 27 | 28 | mkdir -p $COMPONENT 29 | cd $COMPONENT 30 | sudo chown -R $OWNER . 31 | 32 | echo "copy custom files from quickstart to generated project" 33 | cp -rv $SCRIPT_DIR/files/. . 34 | -------------------------------------------------------------------------------- /boilerplates/fe-angular/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM cd/jenkins-slave-nodejs10-angular 2 | 3 | LABEL maintainer="Balram Chavan " 4 | 5 | ARG ANGULAR_CLI_VERSION=8.0.3 6 | 7 | RUN npm install -g @angular/cli@$ANGULAR_CLI_VERSION && \ 8 | ng version 9 | 10 | WORKDIR /data 11 | 12 | ENTRYPOINT ["ng"] 13 | 14 | -------------------------------------------------------------------------------- /boilerplates/fe-angular/README.md: -------------------------------------------------------------------------------- 1 | # Frontend Angular (fe-angular) 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | -------------------------------------------------------------------------------- /boilerplates/fe-angular/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please note: When updating to a newer Angular version, please also update 4 | # files under "./files" that overwrite generated ones 5 | # see details on bottom of "./init.sh" 6 | ANGULAR_CLI_VERSION=8.0.3 7 | 8 | JENKINS_SLAVE=cd/jenkins-slave-nodejs10-angular:latest 9 | 10 | while [[ $# -gt 1 ]] 11 | do 12 | key="$1" 13 | case $key in 14 | --registry) 15 | OCP_DOCKER_REGISTRY="$2" 16 | shift # past argument 17 | ;; 18 | --user) 19 | OCP_DOCKER_REGISTRY_USER="$2" 20 | shift # past argument 21 | ;; 22 | --token) 23 | OCP_DOCKER_REGISTRY_TOKEN="$2" 24 | shift # past argument 25 | ;; 26 | *) 27 | # unknown option 28 | ;; 29 | esac 30 | shift # past argument or value 31 | done 32 | 33 | # change to directory of this script 34 | cd $(dirname "$0") 35 | 36 | sudo docker login \ 37 | -u ${OCP_DOCKER_REGISTRY_USER} -p ${OCP_DOCKER_REGISTRY_TOKEN} ${OCP_DOCKER_REGISTRY} 38 | 39 | sudo docker pull \ 40 | ${OCP_DOCKER_REGISTRY}/${JENKINS_SLAVE} 41 | 42 | sudo docker tag \ 43 | ${OCP_DOCKER_REGISTRY}/${JENKINS_SLAVE} ${JENKINS_SLAVE} 44 | 45 | sudo docker build \ 46 | --rm \ 47 | -t ng:latest -t ng:$ANGULAR_CLI_VERSION \ 48 | --build-arg ANGULAR_CLI_VERSION=$ANGULAR_CLI_VERSION \ 49 | . 50 | -------------------------------------------------------------------------------- /boilerplates/fe-angular/files/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.15.0-alpine 2 | 3 | RUN chmod -R 777 /var/log/nginx /var/cache/nginx /var/run \ 4 | && chgrp -R 0 /etc/nginx \ 5 | && chmod -R g+rwX /etc/nginx 6 | 7 | COPY dist /docroot 8 | COPY nginx.vh.default.conf.nginx /etc/nginx/conf.d/default.conf 9 | 10 | RUN chown -R nginx: /docroot 11 | 12 | EXPOSE 8080 13 | -------------------------------------------------------------------------------- /boilerplates/fe-angular/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Project Key (required) 2 | sonar.projectKey=@project_id@-@component_id@ 3 | 4 | # Project Name (optional) 5 | sonar.projectName=@project_id@-@component_id@ 6 | 7 | # Comma-separated paths to directories with sources (required) 8 | sonar.sources=src 9 | 10 | # Forced Language: type script 11 | sonar.language=ts 12 | 13 | # Encoding of the source files (optional but recommended as default is ASCII) 14 | sonar.sourceEncoding=UTF-8 15 | 16 | # Exclude test files from coverage analysis 17 | sonar.coverage.exclusions=**/*.spec.ts 18 | 19 | # Exclude non type script files from coverage analysis 20 | sonar.exclusions=**/*.html,**/*.scss,**/*.json,**/*.ico,**/*.svg 21 | 22 | # Define coverage information inside the Angular project 23 | sonar.typescript.lcov.reportPaths=coverage/lcov.info 24 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/README.md: -------------------------------------------------------------------------------- 1 | # Frontend Ionic (fe-ionic) 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | 7 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | 10 | # We recommend you to keep these unchanged 11 | end_of_line = lf 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | insert_final_newline = true 15 | 16 | [*.md] 17 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/.gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | *~ 5 | *.sw[mnpcod] 6 | *.log 7 | *.tmp 8 | *.tmp.* 9 | log.txt 10 | *.sublime-project 11 | *.sublime-workspace 12 | .vscode/ 13 | npm-debug.log* 14 | 15 | .idea/ 16 | .sourcemaps/ 17 | .sass-cache/ 18 | .tmp/ 19 | .versions/ 20 | coverage/ 21 | dist/ 22 | node_modules/ 23 | tmp/ 24 | temp/ 25 | hooks/ 26 | platforms/ 27 | plugins/ 28 | plugins/android.json 29 | plugins/ios.json 30 | www/ 31 | $RECYCLE.BIN/ 32 | 33 | .DS_Store 34 | Thumbs.db 35 | UserInterfaceState.xcuserstate 36 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/config/copy.config.js: -------------------------------------------------------------------------------- 1 | // New copy task for font files 2 | module.exports = { 3 | copyFontAwesome: { 4 | src: ['{{ROOT}}/node_modules/font-awesome/fonts/**/*'], 5 | dest: '{{WWW}}/assets/fonts' 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/config/sass.config.js: -------------------------------------------------------------------------------- 1 | // Adding Font Awesome to includePaths 2 | module.exports = { 3 | includePaths: [ 4 | 'node_modules/ionic-angular/themes', 5 | 'node_modules/ionicons/dist/scss', 6 | 'node_modules/ionic-angular/fonts', 7 | 'node_modules/font-awesome/scss' 8 | ] 9 | }; 10 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/config/webpack.config.js: -------------------------------------------------------------------------------- 1 | var chalk = require("chalk"); 2 | var fs = require('fs'); 3 | var path = require('path'); 4 | var useDefaultConfig = require('@ionic/app-scripts/config/webpack.config.js'); 5 | 6 | var env = process.env.APP_ENV; 7 | var ionicEnv = process.env.IONIC_ENV; 8 | 9 | if (!env) { 10 | env = ionicEnv; 11 | } 12 | 13 | useDefaultConfig[env] = useDefaultConfig.dev; 14 | useDefaultConfig[env].resolve.alias = { 15 | "@app/env": path.resolve(environmentPath(env)) 16 | }; 17 | 18 | function environmentPath(env) { 19 | var filePath = './src/environments/environment' + (env === 'prod' ? '' : '.' + env) + '.ts'; 20 | if (!fs.existsSync(filePath)) { 21 | console.log(chalk.red('\n' + filePath + ' does not exist!')); 22 | } else { 23 | return filePath; 24 | } 25 | } 26 | 27 | module.exports = function () { 28 | return useDefaultConfig; 29 | }; 30 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.15.0-alpine 2 | 3 | RUN chmod -R 777 /var/log/nginx /var/cache/nginx /var/run \ 4 | && chgrp -R 0 /etc/nginx \ 5 | && chmod -R g+rwX /etc/nginx 6 | 7 | COPY dist /docroot 8 | COPY nginx.vh.default.conf.nginx /etc/nginx/conf.d/default.conf 9 | 10 | RUN chown -R nginx: /docroot 11 | 12 | EXPOSE 8080 13 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/e2e/test.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import {browser, element, by} from 'protractor'; 2 | 3 | describe('Test E2E', () => { 4 | 5 | 6 | beforeEach(() => { 7 | browser.get(''); 8 | browser.driver.sleep(600); 9 | }); 10 | 11 | 12 | it('should be displayed properly', () => { 13 | 14 | browser.controlFlow().execute(function () { 15 | expect(element(by.css('ion-tabs')) 16 | .isDisplayed()) 17 | .toBeTruthy(); 18 | }); 19 | 20 | }); 21 | 22 | 23 | it('should open the about tab', () => { 24 | 25 | browser.get(''); 26 | 27 | element(by.css('#tab-t0-1')).click(); 28 | 29 | browser.driver.sleep(600); 30 | 31 | expect(element(by.css('page-about')).isDisplayed()) 32 | .toBeTruthy(); 33 | 34 | expect(element(by.css('page-home')).isDisplayed()) 35 | .toBeFalsy(); 36 | 37 | }); 38 | 39 | it('should open the contact tab', () => { 40 | 41 | browser.get(''); 42 | 43 | element(by.css('#tab-t0-2')).click(); 44 | 45 | browser.driver.sleep(600); 46 | 47 | expect(element(by.css('page-contact')).isDisplayed()) 48 | .toBeTruthy(); 49 | 50 | expect(element(by.css('page-home')).isDisplayed()) 51 | .toBeFalsy(); 52 | 53 | }); 54 | 55 | }); 56 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "sourceMap": true, 4 | "declaration": false, 5 | "moduleResolution": "node", 6 | "emitDecoratorMetadata": true, 7 | "experimentalDecorators": true, 8 | "lib": [ 9 | "es2016" 10 | ], 11 | "outDir": "../dist/out-tsc-e2e", 12 | "module": "commonjs", 13 | "target": "es6", 14 | "types":[ 15 | "jasmine", 16 | "node" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/ionic.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ionic-quickstart", 3 | "app_id": "", 4 | "type": "ionic-angular", 5 | "integrations": {} 6 | } 7 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/protractor.conf.js: -------------------------------------------------------------------------------- 1 | var SpecReporter = require('jasmine-spec-reporter').SpecReporter; 2 | 3 | exports.config = { 4 | allScriptsTimeout: 11000, 5 | directConnect: true, 6 | capabilities: { 7 | 'browserName': 'chrome', 8 | 'chromeOptions': { 9 | 'args': [ 10 | 'headless', 11 | 'no-sandbox', 12 | 'disable-web-security', 13 | '--disable-gpu', 14 | '--window-size=1024,768' 15 | ] 16 | } 17 | }, 18 | framework: 'jasmine', 19 | jasmineNodeOpts: { 20 | showColors: true, 21 | defaultTimeoutInterval: 30000, 22 | print: function () { 23 | } 24 | }, 25 | specs: ['./e2e/**/*.e2e-spec.ts'], 26 | baseUrl: 'http://localhost:8100', 27 | useAllAngular2AppRoots: true, 28 | beforeLaunch: function () { 29 | 30 | require('ts-node').register({ 31 | project: 'e2e' 32 | }); 33 | 34 | require('connect')().use(require('serve-static')('www')).listen(8100); 35 | 36 | }, 37 | onPrepare: function () { 38 | jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}})); 39 | } 40 | }; 41 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/README.md: -------------------------------------------------------------------------------- 1 | These are Cordova resources. You can replace icon.png and splash.png and run 2 | `ionic cordova resources` to generate custom icons and splash screens for your 3 | app. See `ionic cordova resources --help` for details. 4 | 5 | Cordova reference documentation: 6 | 7 | - Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html 8 | - Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/ 9 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/icon/drawable-hdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/icon/drawable-hdpi-icon.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/icon/drawable-ldpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/icon/drawable-ldpi-icon.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/icon/drawable-mdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/icon/drawable-mdpi-icon.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/icon/drawable-xhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/icon/drawable-xhdpi-icon.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/icon/drawable-xxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/icon/drawable-xxhdpi-icon.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/icon/drawable-xxxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/icon/drawable-xxxhdpi-icon.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/splash/drawable-land-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/splash/drawable-land-hdpi-screen.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/splash/drawable-land-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/splash/drawable-land-ldpi-screen.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/splash/drawable-land-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/splash/drawable-land-mdpi-screen.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/splash/drawable-land-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/splash/drawable-land-xhdpi-screen.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/splash/drawable-land-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/splash/drawable-land-xxhdpi-screen.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/splash/drawable-land-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/splash/drawable-land-xxxhdpi-screen.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/splash/drawable-port-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/splash/drawable-port-hdpi-screen.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/splash/drawable-port-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/splash/drawable-port-ldpi-screen.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/splash/drawable-port-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/splash/drawable-port-mdpi-screen.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/splash/drawable-port-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/splash/drawable-port-xhdpi-screen.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/splash/drawable-port-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/splash/drawable-port-xxhdpi-screen.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/android/splash/drawable-port-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/android/splash/drawable-port-xxxhdpi-screen.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/icon.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-1024.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-40.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-40@2x.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-40@3x.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-50.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-50@2x.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-60.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-60@2x.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-60@3x.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-72.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-72@2x.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-76.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-76@2x.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-83.5@2x.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-small.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-small@2x.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon-small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon-small@3x.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/icon/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/icon/icon@2x.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default-667h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default-667h.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default-736h.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default-Landscape-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default-Landscape-736h.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default-Landscape@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default-Landscape@2x~ipad.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default-Landscape@~ipadpro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default-Landscape@~ipadpro.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default-Portrait@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default-Portrait@2x~ipad.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default-Portrait@~ipadpro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default-Portrait@~ipadpro.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default@2x~iphone.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default@2x~universal~anyany.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default@2x~universal~anyany.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/ios/splash/Default~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/ios/splash/Default~iphone.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/resources/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/resources/splash.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {Platform} from 'ionic-angular'; 3 | import {StatusBar} from '@ionic-native/status-bar'; 4 | import {SplashScreen} from '@ionic-native/splash-screen'; 5 | 6 | import {TabsPage} from '../pages/tabs/tabs'; 7 | 8 | @Component({ 9 | templateUrl: 'app.html' 10 | }) 11 | export class MyApp { 12 | rootPage: any = TabsPage; 13 | 14 | constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) { 15 | platform.ready().then(() => { 16 | // Okay, so the platform is ready and our plugins are available. 17 | // Here you can do any higher level native things you might need. 18 | statusBar.styleDefault(); 19 | splashScreen.hide(); 20 | }); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/app/app.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule, ErrorHandler} from '@angular/core'; 2 | import {BrowserModule} from '@angular/platform-browser'; 3 | import {IonicApp, IonicModule, IonicErrorHandler} from 'ionic-angular'; 4 | import {MyApp} from './app.component'; 5 | 6 | import {AboutPage} from '../pages/about/about'; 7 | import {ContactPage} from '../pages/contact/contact'; 8 | import {HomePage} from '../pages/home/home'; 9 | import {TabsPage} from '../pages/tabs/tabs'; 10 | 11 | import {StatusBar} from '@ionic-native/status-bar'; 12 | import {SplashScreen} from '@ionic-native/splash-screen'; 13 | import { TestProvider } from '../providers/test/test'; 14 | 15 | @NgModule({ 16 | declarations: [ 17 | MyApp, 18 | AboutPage, 19 | ContactPage, 20 | HomePage, 21 | TabsPage 22 | ], 23 | imports: [ 24 | BrowserModule, 25 | IonicModule.forRoot(MyApp) 26 | ], 27 | bootstrap: [IonicApp], 28 | entryComponents: [ 29 | MyApp, 30 | AboutPage, 31 | ContactPage, 32 | HomePage, 33 | TabsPage 34 | ], 35 | providers: [ 36 | StatusBar, 37 | SplashScreen, 38 | {provide: ErrorHandler, useClass: IonicErrorHandler}, 39 | TestProvider 40 | ] 41 | }) 42 | export class AppModule { 43 | } 44 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/app/app.scss: -------------------------------------------------------------------------------- 1 | // http://ionicframework.com/docs/theming/ 2 | 3 | 4 | // App Global Sass 5 | // -------------------------------------------------- 6 | // Put style rules here that you want to apply globally. These 7 | // styles are for the entire app and not just one component. 8 | // Additionally, this file can be also used as an entry point 9 | // to import other Sass files to be included in the output CSS. 10 | // 11 | // Shared Sass variables, which can be used to adjust Ionic's 12 | // default Sass variables, belong in "theme/variables.scss". 13 | // 14 | // To declare rules for a specific mode, create a child rule 15 | // for the .md, .ios, or .wp mode classes. The mode class is 16 | // automatically applied to the element in the app. 17 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/app/main.ts: -------------------------------------------------------------------------------- 1 | import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; 2 | 3 | import {AppModule} from './app.module'; 4 | 5 | platformBrowserDynamic().bootstrapModule(AppModule); 6 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/assets/icon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/src/assets/icon/favicon.ico -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/assets/imgs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-ionic/files/src/assets/imgs/logo.png -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/environments/environment.dev.ts: -------------------------------------------------------------------------------- 1 | export const ENV = { 2 | MODE: 'Development' 3 | }; 4 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/environments/environment.e2e.ts: -------------------------------------------------------------------------------- 1 | export const ENV = { 2 | MODE: 'E2E' 3 | }; 4 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | export const ENV = { 2 | MODE: 'Production' 3 | }; 4 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Ionic", 3 | "short_name": "Ionic", 4 | "start_url": "index.html", 5 | "display": "standalone", 6 | "icons": [{ 7 | "src": "assets/imgs/logo.png", 8 | "sizes": "512x512", 9 | "type": "image/png" 10 | }], 11 | "background_color": "#4e8ef7", 12 | "theme_color": "#4e8ef7" 13 | } -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/pages/about/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | About 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/pages/about/about.scss: -------------------------------------------------------------------------------- 1 | page-about { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/pages/about/about.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController } from 'ionic-angular'; 3 | 4 | @Component({ 5 | selector: 'page-about', 6 | templateUrl: 'about.html' 7 | }) 8 | export class AboutPage { 9 | 10 | constructor(public navCtrl: NavController) { 11 | 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/pages/contact/contact.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Contact 5 | 6 | 7 | 8 | 9 | 10 | 11 | Follow us on Twitter 12 | 13 | 14 | @ionicframework 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/pages/contact/contact.scss: -------------------------------------------------------------------------------- 1 | page-contact { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/pages/contact/contact.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController } from 'ionic-angular'; 3 | 4 | @Component({ 5 | selector: 'page-contact', 6 | templateUrl: 'contact.html' 7 | }) 8 | export class ContactPage { 9 | 10 | constructor(public navCtrl: NavController) { 11 | 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/pages/home/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Home 4 | 5 | 6 | 7 | 8 |

Welcome to Ionic!

9 |

10 | This starter project comes with simple tabs-based layout for apps 11 | that are going to primarily use a Tabbed UI. 12 |

13 |

14 | Take a look at the src/pages/ directory to add or change tabs, 15 | update any existing page or create new pages. 16 |

17 |
18 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/pages/home/home.scss: -------------------------------------------------------------------------------- 1 | page-home { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/pages/home/home.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {NavController} from 'ionic-angular'; 3 | import {ENV} from '@app/env'; 4 | 5 | @Component({ 6 | selector: 'page-home', 7 | templateUrl: 'home.html' 8 | }) 9 | export class HomePage { 10 | 11 | constructor(public navCtrl: NavController) { 12 | console.log(ENV.MODE); 13 | 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/pages/tabs/tabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/pages/tabs/tabs.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | import { AboutPage } from '../about/about'; 4 | import { ContactPage } from '../contact/contact'; 5 | import { HomePage } from '../home/home'; 6 | 7 | @Component({ 8 | templateUrl: 'tabs.html' 9 | }) 10 | export class TabsPage { 11 | 12 | tab1Root = HomePage; 13 | tab2Root = AboutPage; 14 | tab3Root = ContactPage; 15 | 16 | constructor() { 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/providers/test/test.spec.ts: -------------------------------------------------------------------------------- 1 | import {inject, TestBed} from '@angular/core/testing'; 2 | import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; 3 | 4 | import {TestProvider} from './test'; 5 | 6 | describe('TestProvider', () => { 7 | let subject: TestProvider = null; 8 | let backend: HttpTestingController = null; 9 | 10 | 11 | beforeEach(() => { 12 | TestBed.configureTestingModule({ 13 | imports: [ 14 | HttpClientTestingModule 15 | ], 16 | providers: [ 17 | TestProvider 18 | ] 19 | }); 20 | }); 21 | 22 | beforeEach(inject([TestProvider, HttpTestingController], (testService: TestProvider, mockBackend: HttpTestingController) => { 23 | subject = testService; 24 | backend = mockBackend; 25 | })); 26 | 27 | it('should be created', inject([TestProvider], (service: TestProvider) => { 28 | expect(service).toBeTruthy(); 29 | })); 30 | 31 | 32 | }); 33 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/providers/test/test.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | 4 | /* 5 | Generated class for the TestProvider provider. 6 | 7 | See https://angular.io/guide/dependency-injection for more info on providers 8 | and Angular DI. 9 | */ 10 | @Injectable() 11 | export class TestProvider { 12 | 13 | constructor(public http: HttpClient) { 14 | console.log('Hello TestProvider Provider'); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Check out https://googlechromelabs.github.io/sw-toolbox/ for 3 | * more info on how to use sw-toolbox to custom configure your service worker. 4 | */ 5 | 6 | 7 | 'use strict'; 8 | importScripts('./build/sw-toolbox.js'); 9 | 10 | self.toolbox.options.cache = { 11 | name: 'ionic-cache' 12 | }; 13 | 14 | // pre-cache our key assets 15 | self.toolbox.precache( 16 | [ 17 | './build/main.js', 18 | './build/vendor.js', 19 | './build/main.css', 20 | './build/polyfills.js', 21 | 'index.html', 22 | 'manifest.json' 23 | ] 24 | ); 25 | 26 | // dynamically cache any other local assets 27 | self.toolbox.router.any('/*', self.toolbox.fastest); 28 | 29 | // for any other requests go to the network, cache, 30 | // and then only use that cached resource if your user goes offline 31 | self.toolbox.router.default = self.toolbox.networkFirst; 32 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.ng-cli.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "baseUrl": "", 8 | "types": [ 9 | "jasmine", 10 | "node" 11 | ] 12 | }, 13 | "files": [ 14 | "test.ts" 15 | ], 16 | "include": [ 17 | "**/*.spec.ts", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "declaration": false, 5 | "emitDecoratorMetadata": true, 6 | "experimentalDecorators": true, 7 | "lib": [ 8 | "dom", 9 | "es2015" 10 | ], 11 | "module": "es2015", 12 | "moduleResolution": "node", 13 | "sourceMap": true, 14 | "target": "es5", 15 | "baseUrl": "./src", 16 | "paths": { 17 | "@app/env": [ 18 | "environments/environment" 19 | ] 20 | } 21 | }, 22 | "include": [ 23 | "src/**/*.ts", 24 | "src/test.ts" 25 | ], 26 | "exclude": [ 27 | "node_modules", 28 | "**/*.spec.ts" 29 | ], 30 | "compileOnSave": false, 31 | "atom": { 32 | "rewriteTsconfig": false 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/files/tsconfig.ng-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "baseUrl": "src", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "paths": { 12 | "@app/env": [ 13 | "environments/environment" 14 | ] 15 | }, 16 | "target": "es5", 17 | "typeRoots": [ 18 | "node_modules/@types" 19 | ], 20 | "lib": [ 21 | "es2016", 22 | "dom" 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | # Get directory of this script 5 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | while [[ "$#" > 0 ]]; do case $1 in 8 | -p=*|--project=*) PROJECT="${1#*=}";; 9 | -p|--project) PROJECT="$2"; shift;; 10 | 11 | -c=*|--component=*) COMPONENT="${1#*=}";; 12 | -c|--component) COMPONENT="$2"; shift;; 13 | 14 | -g=*|--group=*) GROUP="${1#*=}";; 15 | -g|--group) GROUP="$2"; shift;; 16 | 17 | -t=*|--target-dir=*) TARGET_DIR="${1#*=}";; 18 | -t|--target-dir) TARGET_DIR="$2"; shift;; 19 | 20 | -o=*|--owner=*) OWNER="${1#*=}";; 21 | -o|--owner) OWNER="$2"; shift;; 22 | 23 | *) echo "Unknown parameter passed: $1"; exit 1;; 24 | esac; shift; done 25 | 26 | cd $TARGET_DIR 27 | 28 | mkdir -p $COMPONENT 29 | 30 | cd $COMPONENT 31 | 32 | sudo chown -R $OWNER . 33 | 34 | echo "fix nexus repo path" 35 | repo_path=$(echo "$GROUP" | tr . /) 36 | sed -i.bak "s|org/opendevstack/projectId|$repo_path|g" $SCRIPT_DIR/files/docker/Dockerfile 37 | rm $SCRIPT_DIR/files/docker/Dockerfile.bak 38 | 39 | echo "copy files from quickstart to generated project" 40 | cp -rv $SCRIPT_DIR/files/. . 41 | -------------------------------------------------------------------------------- /boilerplates/fe-ionic/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Project Key (required) 2 | sonar.projectKey=@project_id@-@component_id@ 3 | 4 | # Project Name (optional) 5 | sonar.projectName=@project_id@-@component_id@ 6 | 7 | # Comma-separated paths to directories with sources (required) 8 | sonar.sources=src 9 | 10 | # Forced Language (optional) 11 | sonar.language=js 12 | 13 | # Encoding of the source files (optional but recommended as default is ASCII) 14 | sonar.sourceEncoding=UTF-8 15 | -------------------------------------------------------------------------------- /boilerplates/fe-react/README.md: -------------------------------------------------------------------------------- 1 | # Frontend react.js (fe-react) 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | -------------------------------------------------------------------------------- /boilerplates/fe-react/files/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | charset = utf-8 8 | trim_trailing_whitespace = false 9 | end_of_line = lf 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | -------------------------------------------------------------------------------- /boilerplates/fe-react/files/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.15.0-alpine 2 | 3 | RUN chmod -R 777 /var/log/nginx /var/cache/nginx /var/run \ 4 | && chgrp -R 0 /etc/nginx \ 5 | && chmod -R g+rwX /etc/nginx 6 | 7 | COPY dist /docroot 8 | COPY nginx.vh.default.conf.nginx /etc/nginx/conf.d/default.conf 9 | 10 | RUN chown -R nginx: /docroot 11 | 12 | EXPOSE 8080 13 | -------------------------------------------------------------------------------- /boilerplates/fe-react/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | # Get directory of this script 5 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | while [[ "$#" > 0 ]]; do case $1 in 8 | -p=*|--project=*) PROJECT="${1#*=}";; 9 | -p|--project) PROJECT="$2"; shift;; 10 | 11 | -c=*|--component=*) COMPONENT="${1#*=}";; 12 | -c|--component) COMPONENT="$2"; shift;; 13 | 14 | -g=*|--group=*) GROUP="${1#*=}";; 15 | -g|--group) GROUP="$2"; shift;; 16 | 17 | -t=*|--target-dir=*) TARGET_DIR="${1#*=}";; 18 | -t|--target-dir) TARGET_DIR="$2"; shift;; 19 | 20 | -o=*|--owner=*) OWNER="${1#*=}";; 21 | -o|--owner) OWNER="$2"; shift;; 22 | 23 | *) echo "Unknown parameter passed: $1"; exit 1;; 24 | esac; shift; done 25 | 26 | cd $TARGET_DIR 27 | 28 | echo "Init react app" 29 | sudo docker run --rm -v $PWD:/data -w /data node npm init react-app $COMPONENT --use-npm 30 | sudo docker run --rm -v $PWD:/data -w /data node npm --prefix $COMPONENT i jest-junit 31 | 32 | cd $COMPONENT 33 | 34 | sudo chown -R $OWNER . 35 | 36 | echo "Fix nexus repo path" 37 | repo_path=$(echo "$GROUP" | tr . /) 38 | sed -i.bak "s|org/opendevstack/projectId|$repo_path|g" $SCRIPT_DIR/files/docker/Dockerfile 39 | rm $SCRIPT_DIR/files/docker/Dockerfile.bak 40 | 41 | echo "Copy files from quickstart to generated project" 42 | cp -rv $SCRIPT_DIR/files/. . 43 | -------------------------------------------------------------------------------- /boilerplates/fe-react/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Project Key (required) 2 | sonar.projectKey=@project_id@-@component_id@ 3 | 4 | # Project Name (optional) 5 | sonar.projectName=@project_id@-@component_id@ 6 | 7 | # Comma-separated paths to directories with sources (required) 8 | sonar.sources=src 9 | 10 | # Forced Language (optional) 11 | sonar.language=js 12 | 13 | # Encoding of the source files (optional but recommended as default is ASCII) 14 | sonar.sourceEncoding=UTF-8 15 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM cd/jenkins-slave-nodejs8-angular 2 | 3 | LABEL maintainer="Akhil Soman " 4 | 5 | ARG VUE_CLI_VERSION=3.4.0 6 | 7 | RUN npm install -g @vue/cli@$VUE_CLI_VERSION && \ 8 | vue --version 9 | 10 | WORKDIR /data 11 | 12 | ENTRYPOINT ["vue"] 13 | 14 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/README.md: -------------------------------------------------------------------------------- 1 | # Frontend Vue (fe-vue) 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | /tests/e2e/videos/ 6 | /tests/e2e/screenshots/ 7 | 8 | # local env files 9 | .env.local 10 | .env.*.local 11 | 12 | # Log files 13 | npm-debug.log* 14 | yarn-debug.log* 15 | yarn-error.log* 16 | 17 | # Editor directories and files 18 | .idea 19 | .vscode 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw* 25 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/.npmrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/.npmrc -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/README.md: -------------------------------------------------------------------------------- 1 | # fe-vue 2 | 3 | ## Project setup 4 | 5 | ### Configure .npmrc 6 | Configure the `.npmrc` file to download the npm dependencies from the internal Nexus Host. 7 | 8 | ``` 9 | registry= 10 | always-auth=true 11 | _auth= 12 | email= 13 | ``` 14 | 15 | ### Install npm dependencies 16 | ``` 17 | npm install 18 | ``` 19 | 20 | ### Compiles and hot-reloads for development 21 | ``` 22 | npm run serve 23 | ``` 24 | 25 | ### Compiles and minifies for production 26 | ``` 27 | npm run build 28 | ``` 29 | 30 | ### Lints and fixes files 31 | ``` 32 | npm run lint 33 | ``` 34 | 35 | ### Run your end-to-end tests 36 | ``` 37 | npm run test:e2e 38 | ``` 39 | 40 | ### Run your unit tests 41 | ``` 42 | npm run test:unit 43 | ``` 44 | 45 | ### Customize configuration 46 | See [Configuration Reference](https://cli.vuejs.org/config/). 47 | 48 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "pluginsFile": "tests/e2e/plugins/index.js" 3 | } 4 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.15.0-alpine 2 | 3 | RUN chmod -R 777 /var/log/nginx /var/cache/nginx /var/run \ 4 | && chgrp -R 0 /etc/nginx \ 5 | && chmod -R g+rwX /etc/nginx 6 | 7 | COPY dist /docroot 8 | COPY nginx.vh.default.conf.nginx /etc/nginx/conf.d/default.conf 9 | 10 | RUN chown -R nginx: /docroot 11 | 12 | EXPOSE 8080 13 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/favicon.ico -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/img/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/img/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/img/icons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/img/icons/android-chrome-512x512.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/img/icons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/img/icons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/img/icons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/img/icons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/img/icons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/img/icons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/img/icons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/img/icons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/img/icons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/img/icons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/img/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/img/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/img/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/img/icons/favicon-16x16.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/img/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/img/icons/favicon-32x32.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/img/icons/msapplication-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/img/icons/msapplication-icon-144x144.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/img/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/public/img/icons/mstile-150x150.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | fe-vue 8 | 9 | 10 | 13 |
14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fe-vue", 3 | "short_name": "fe-vue", 4 | "icons": [ 5 | { 6 | "src": "./img/icons/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "./img/icons/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "start_url": "./index.html", 17 | "display": "standalone", 18 | "background_color": "#000000", 19 | "theme_color": "#4DBA87" 20 | } 21 | 22 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/src/App.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 30 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/boilerplates/fe-vue/files/src/assets/logo.png -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/src/main.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | import './registerServiceWorker' 5 | 6 | Vue.config.productionTip = false 7 | 8 | new Vue({ 9 | router, 10 | render: h => h(App) 11 | }).$mount('#app') 12 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/src/registerServiceWorker.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | import { register } from 'register-service-worker' 4 | 5 | if (process.env.NODE_ENV === 'production') { 6 | register(`${process.env.BASE_URL}service-worker.js`, { 7 | ready () { 8 | console.log( 9 | 'App is being served from cache by a service worker.\n' + 10 | 'For more details, visit https://goo.gl/AFskqB' 11 | ) 12 | }, 13 | registered () { 14 | console.log('Service worker has been registered.') 15 | }, 16 | cached () { 17 | console.log('Content has been cached for offline use.') 18 | }, 19 | updatefound () { 20 | console.log('New content is downloading.') 21 | }, 22 | updated () { 23 | console.log('New content is available; please refresh.') 24 | }, 25 | offline () { 26 | console.log('No internet connection found. App is running in offline mode.') 27 | }, 28 | error (error) { 29 | console.error('Error during service worker registration:', error) 30 | } 31 | }) 32 | } 33 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/src/router.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import Home from './views/Home.vue' 4 | 5 | Vue.use(Router) 6 | 7 | export default new Router({ 8 | mode: 'history', 9 | routes: [ 10 | { 11 | path: '/', 12 | name: 'home', 13 | component: Home 14 | }, 15 | { 16 | path: '/about', 17 | name: 'about', 18 | // route level code-splitting 19 | // this generates a separate chunk (about.[hash].js) for this route 20 | // which is lazy-loaded when the route is visited. 21 | component: () => import(/* webpackChunkName: "about" */ './views/About.vue') 22 | } 23 | ] 24 | }) 25 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/src/shims-tsx.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode } from 'vue' 2 | 3 | declare global { 4 | namespace JSX { 5 | // tslint:disable no-empty-interface 6 | interface Element extends VNode {} 7 | // tslint:disable no-empty-interface 8 | interface ElementClass extends Vue {} 9 | interface IntrinsicElements { 10 | [elem: string]: any 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import Vue from 'vue' 3 | export default Vue 4 | } 5 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/tests/e2e/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | 'cypress' 4 | ], 5 | env: { 6 | mocha: true, 7 | 'cypress/globals': true 8 | }, 9 | rules: { 10 | strict: 'off' 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/tests/e2e/plugins/index.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/guides/guides/plugins-guide.html 2 | 3 | // if you need a custom webpack configuration you can uncomment the following import 4 | // and then use the `file:preprocessor` event 5 | // as explained in the cypress docs 6 | // https://docs.cypress.io/api/plugins/preprocessors-api.html#Examples 7 | 8 | /* eslint-disable import/no-extraneous-dependencies, global-require, arrow-body-style */ 9 | // const webpack = require('@cypress/webpack-preprocessor') 10 | 11 | module.exports = (on, config) => { 12 | // on('file:preprocessor', webpack({ 13 | // webpackOptions: require('@vue/cli-service/webpack.config'), 14 | // watchOptions: {} 15 | // })) 16 | 17 | return Object.assign({}, config, { 18 | fixturesFolder: 'tests/e2e/fixtures', 19 | integrationFolder: 'tests/e2e/specs', 20 | screenshotsFolder: 'tests/e2e/screenshots', 21 | videosFolder: 'tests/e2e/videos', 22 | supportFile: 'tests/e2e/support/index.js' 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/tests/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('Visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'Welcome to Your Vue.js + TypeScript App') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/tests/e2e/support/commands.js: -------------------------------------------------------------------------------- 1 | // *********************************************** 2 | // This example commands.js shows you how to 3 | // create various custom commands and overwrite 4 | // existing commands. 5 | // 6 | // For more comprehensive examples of custom 7 | // commands please read more here: 8 | // https://on.cypress.io/custom-commands 9 | // *********************************************** 10 | // 11 | // 12 | // -- This is a parent command -- 13 | // Cypress.Commands.add("login", (email, password) => { ... }) 14 | // 15 | // 16 | // -- This is a child command -- 17 | // Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) 18 | // 19 | // 20 | // -- This is a dual command -- 21 | // Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) 22 | // 23 | // 24 | // -- This is will overwrite an existing command -- 25 | // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) 26 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/tests/e2e/support/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands' 18 | 19 | // Alternatively you can use CommonJS syntax: 20 | // require('./commands') 21 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/tests/unit/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | mocha: true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/tests/unit/example.spec.ts: -------------------------------------------------------------------------------- 1 | import { expect } from 'chai' 2 | import { shallowMount } from '@vue/test-utils' 3 | import HelloWorld from '@/components/HelloWorld.vue' 4 | 5 | describe('HelloWorld.vue', () => { 6 | it('renders props.msg when passed', () => { 7 | const msg = 'new message' 8 | const wrapper = shallowMount(HelloWorld, { 9 | propsData: { msg } 10 | }) 11 | expect(wrapper.text()).to.include(msg) 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/files/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "module": "esnext", 5 | "strict": true, 6 | "jsx": "preserve", 7 | "importHelpers": true, 8 | "moduleResolution": "node", 9 | "experimentalDecorators": true, 10 | "esModuleInterop": true, 11 | "allowSyntheticDefaultImports": true, 12 | "sourceMap": true, 13 | "baseUrl": ".", 14 | "types": [ 15 | "webpack-env", 16 | "mocha", 17 | "chai" 18 | ], 19 | "paths": { 20 | "@/*": [ 21 | "src/*" 22 | ] 23 | }, 24 | "lib": [ 25 | "esnext", 26 | "dom", 27 | "dom.iterable", 28 | "scripthost" 29 | ] 30 | }, 31 | "include": [ 32 | "src/**/*.ts", 33 | "src/**/*.tsx", 34 | "src/**/*.vue", 35 | "tests/**/*.ts", 36 | "tests/**/*.tsx" 37 | ], 38 | "exclude": [ 39 | "node_modules" 40 | ] 41 | } 42 | 43 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | # Get directory of this script 5 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | while [[ "$#" > 0 ]]; do case $1 in 8 | -p=*|--project=*) PROJECT="${1#*=}";; 9 | -p|--project) PROJECT="$2"; shift;; 10 | 11 | -c=*|--component=*) COMPONENT="${1#*=}";; 12 | -c|--component) COMPONENT="$2"; shift;; 13 | 14 | -g=*|--group=*) GROUP="${1#*=}";; 15 | -g|--group) GROUP="$2"; shift;; 16 | 17 | -t=*|--target-dir=*) TARGET_DIR="${1#*=}";; 18 | -t|--target-dir) TARGET_DIR="$2"; shift;; 19 | 20 | -o=*|--owner=*) OWNER="${1#*=}";; 21 | -o|--owner) OWNER="$2"; shift;; 22 | 23 | *) echo "Unknown parameter passed: $1"; exit 1;; 24 | esac; shift; done 25 | 26 | cd $TARGET_DIR 27 | 28 | mkdir -p $COMPONENT 29 | 30 | cd $COMPONENT 31 | 32 | sudo chown -R $OWNER . 33 | 34 | echo "copy custom files from quickstart to generated project" 35 | cp -rv $SCRIPT_DIR/files/. . 36 | -------------------------------------------------------------------------------- /boilerplates/fe-vue/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Project Key (required) 2 | sonar.projectKey=@project_id@-@component_id@ 3 | 4 | # Project Name (optional) 5 | sonar.projectName=@project_id@-@component_id@ 6 | 7 | # Comma-separated paths to directories with sources (required) 8 | sonar.sources=src 9 | 10 | # Forced Language (optional) 11 | sonar.language=js 12 | 13 | # Encoding of the source files (optional but recommended as default is ASCII) 14 | sonar.sourceEncoding=UTF-8 15 | -------------------------------------------------------------------------------- /boilerplates/git_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eux 3 | 4 | while [[ "$#" > 0 ]]; do case $1 in 5 | -d=*|--dir=*) directory="${1#*=}";; 6 | -d|--dir) directory="$2"; shift;; 7 | 8 | -u=*|--url=*) git_url_ssh="${1#*=}";; 9 | -u|--url) git_url_ssh="$2"; shift;; 10 | 11 | *) echo "Unknown parameter passed: $1"; exit 1;; 12 | esac; shift; done 13 | 14 | cd $directory 15 | git config --global user.email "undefined" 16 | git config --global user.name "CD System User" 17 | 18 | # clone first (there is ALWAYS a remote repo!) 19 | git clone "$git_url_ssh" 20 | # step inside cloned git repo 21 | basename=$(basename $git_url_ssh) 22 | cloned_git_fld_name=${basename%.*} 23 | 24 | files=$( ls $cloned_git_fld_name | grep -v ^l | wc -l) 25 | 26 | if [ $files == 0 ]; then 27 | echo "Init project from scratch $(pwd)" 28 | git init . 29 | git remote add origin "$git_url_ssh" 30 | else 31 | echo "Upgrading existing project: ${git_url_ssh}" 32 | mv "$cloned_git_fld_name"/* . 33 | mv "$cloned_git_fld_name"/.[!.]* . 34 | fi 35 | 36 | rm -rf "$cloned_git_fld_name" 37 | 38 | git add --all . 39 | git commit -m "Initial opendevstack commit" 40 | git push -u origin master 41 | -------------------------------------------------------------------------------- /boilerplates/jupyter-notebook/Jenkinsfile: -------------------------------------------------------------------------------- 1 | /* generated jenkins file used for building and deploying @component_id@ in projects @project_id@ */ 2 | def final projectId = '@project_id@' 3 | def final componentId = '@component_id@' 4 | def final credentialsId = "${projectId}-cd-cd-user-with-password" 5 | def sharedLibraryRepository 6 | def dockerRegistry 7 | node { 8 | sharedLibraryRepository = env.SHARED_LIBRARY_REPOSITORY 9 | dockerRegistry = env.DOCKER_REGISTRY 10 | } 11 | 12 | library identifier: 'ods-library@production', retriever: modernSCM( 13 | [$class: 'GitSCMSource', 14 | remote: sharedLibraryRepository, 15 | credentialsId: credentialsId]) 16 | 17 | /* 18 | See readme of shared library for usage and customization 19 | @ https://github.com/opendevstack/ods-jenkins-shared-library/blob/master/README.md 20 | eg. to create and set your own builder slave instead of 21 | the base slave used here - the code of the base slave can be found at 22 | https://github.com/opendevstack/ods-core/tree/master/jenkins/slave-base 23 | */ 24 | odsPipeline( 25 | image: "${dockerRegistry}/cd/jenkins-slave-base", 26 | projectId: projectId, 27 | componentId: componentId, 28 | branchToEnvironmentMapping: [ 29 | 'master': 'test', 30 | '*': 'dev' 31 | ] 32 | ) { context -> 33 | stageStartOpenshiftBuild(context, [nexusHostWithBasicAuth: context.nexusHostWithBasicAuth, nexusHostWithoutScheme: context.nexusHost.tokenize('//')[1]]) 34 | stageDeployToOpenshift(context) 35 | } 36 | -------------------------------------------------------------------------------- /boilerplates/jupyter-notebook/README.md: -------------------------------------------------------------------------------- 1 | # Jupyter Notebook 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | -------------------------------------------------------------------------------- /boilerplates/jupyter-notebook/files/docker/jupyter_notebook_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "NotebookApp": { 3 | "token": "", 4 | "ip": "0.0.0.0", 5 | "notebook_dir": "/opt/app-root/src/work", 6 | "port": 8080, 7 | "open_browser": false 8 | } 9 | } -------------------------------------------------------------------------------- /boilerplates/jupyter-notebook/files/docker/requirements.txt: -------------------------------------------------------------------------------- 1 | jupyter 2 | ipywidgets 3 | jupyterlab 4 | numpy 5 | scipy 6 | scikit-learn 7 | pandas 8 | seaborn 9 | nltk 10 | singledispatch 11 | -------------------------------------------------------------------------------- /boilerplates/jupyter-notebook/files/docker/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if ! whoami &> /dev/null; then 6 | if [ -w /etc/passwd ]; then 7 | echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd 8 | fi 9 | fi 10 | 11 | # create work directory 12 | mkdir -p /opt/app-root/src/work 13 | 14 | # set the home directories to a folder with read/write access 15 | export XDG_DATA_HOME=/opt/app-root/src 16 | export HOME=/opt/app-root/src 17 | 18 | # link jupyter configs 19 | export JUPYTER_CONFIG_DIR=/opt/app-root/src/.jupyter 20 | export JUPYTER_PATH=/opt/app-root/src/work/.jupyter 21 | export JUPYTER_RUNTIME_DIR=/opt/app-root/src/work/.jupyter/runtime 22 | 23 | exec $@ 24 | -------------------------------------------------------------------------------- /boilerplates/jupyter-notebook/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | # Get directory of this script 5 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | while [[ "$#" > 0 ]]; do case $1 in 8 | -p=*|--project=*) PROJECT="${1#*=}";; 9 | -p|--project) PROJECT="$2"; shift;; 10 | 11 | -c=*|--component=*) COMPONENT="${1#*=}";; 12 | -c|--component) COMPONENT="$2"; shift;; 13 | 14 | -t=*|--target-dir=*) TARGET_DIR="${1#*=}";; 15 | -t|--target-dir) TARGET_DIR="$2"; shift;; 16 | 17 | -o=*|--owner=*) OWNER="${1#*=}";; 18 | -o|--owner) OWNER="$2"; shift;; 19 | 20 | *) echo "Unknown parameter passed: $1"; exit 1;; 21 | esac; shift; done 22 | 23 | cd $TARGET_DIR 24 | 25 | mkdir -p $COMPONENT 26 | 27 | cd $COMPONENT 28 | 29 | sudo chown -R $OWNER . 30 | 31 | echo "copy custom files from quickstart to generated project" 32 | cp -rv $SCRIPT_DIR/files/. . 33 | -------------------------------------------------------------------------------- /boilerplates/release-manager/README.md: -------------------------------------------------------------------------------- 1 | # Release Manager (release-manager) 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) -------------------------------------------------------------------------------- /boilerplates/release-manager/files/Jenkinsfile: -------------------------------------------------------------------------------- 1 | @Library('ods-mro-jenkins-shared-library@production') 2 | 3 | @Library('ods-jenkins-shared-library@production') 4 | 5 | def project = [:] 6 | def repos = [] 7 | 8 | /* 9 | * Use classic pipeline here because of blue ocean (1.18+) rendering bugs 10 | * with declarative pipelines. 11 | */ 12 | node { 13 | 14 | checkout scm 15 | 16 | def debugOn = true 17 | withEnv (mroEnvironment(debugOn)) { 18 | 19 | stage('Init') { 20 | def result = phaseInit() 21 | project = result.project 22 | repos = result.repos 23 | } 24 | 25 | stage('Build') { 26 | phaseBuild(project, repos) 27 | } 28 | 29 | stage('Deploy') { 30 | phaseDeploy(project, repos) 31 | } 32 | 33 | stage('Test') { 34 | phaseTest(project, repos) 35 | } 36 | 37 | stage('Release') { 38 | phaseRelease(project, repos) 39 | } 40 | 41 | stage('Finalize') { 42 | phaseFinalize(project, repos) 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /boilerplates/release-manager/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | # Get directory of this script 5 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | while [[ "$#" > 0 ]]; do case $1 in 8 | -p=*|--project=*) PROJECT="${1#*=}";; 9 | -p|--project) PROJECT="$2"; shift;; 10 | 11 | -c=*|--component=*) COMPONENT="${1#*=}";; 12 | -c|--component) COMPONENT="$2"; shift;; 13 | 14 | -g=*|--group=*) GROUP="${1#*=}";; 15 | -g|--group) GROUP="$2"; shift;; 16 | 17 | -t=*|--target-dir=*) TARGET_DIR="${1#*=}";; 18 | -t|--target-dir) TARGET_DIR="$2"; shift;; 19 | 20 | -o=*|--owner=*) OWNER="${1#*=}";; 21 | -o|--owner) OWNER="$2"; shift;; 22 | 23 | *) echo "Unknown parameter passed: $1"; exit 1;; 24 | esac; shift; done 25 | 26 | cd $TARGET_DIR 27 | 28 | mkdir -p $COMPONENT 29 | 30 | cd $COMPONENT 31 | 32 | sudo chown -R $OWNER . 33 | 34 | echo "project-id: $PROJECT" 35 | sed 's|@project_id@|'$PROJECT'|g' $SCRIPT_DIR/metadata.yml.tmpl > $SCRIPT_DIR/files/metadata.yml 36 | 37 | echo "copy files from quickstart to generated project" 38 | cp -rv $SCRIPT_DIR/files/. . 39 | -------------------------------------------------------------------------------- /boilerplates/release-manager/metadata.yml.tmpl: -------------------------------------------------------------------------------- 1 | id: @project_id@ 2 | name: Project @project_id@ 3 | description: Description of @project_id@. 4 | 5 | services: 6 | bitbucket: 7 | credentials: 8 | id: @project_id@-cd-cd-user-with-password 9 | jira: 10 | credentials: 11 | id: @project_id@-cd-cd-user-with-password 12 | nexus: 13 | repository: 14 | name: leva-documentation 15 | 16 | #repositories: 17 | # - id: A 18 | # url: https://github.com/my-org/my-repo-A.git 19 | # branch: master 20 | # type: ods 21 | # - id: B 22 | # name: my-repo-B 23 | # branch: master 24 | # type: ods 25 | # - id: C 26 | # type: ods 27 | 28 | repositories: [] 29 | -------------------------------------------------------------------------------- /boilerplates/renderSonarqubeTemplate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Use -gt 1 to consume two arguments per pass in the loop (e.g. each 4 | # argument has a corresponding value to go with it). 5 | # Use -gt 0 to consume one or more arguments per pass in the loop (e.g. 6 | # some arguments don't have a corresponding value to go with it such 7 | # as in the --default example). 8 | # note: if this is set to -gt 0 the /etc/hosts part is not recognized ( may be a bug ) 9 | while [[ $# -gt 1 ]] 10 | do 11 | key="$1" 12 | 13 | case $key in 14 | -t|--target) 15 | target="$2" 16 | shift # past argument 17 | ;; 18 | -p|--project-id) 19 | project_id="$2" 20 | shift # past argument 21 | ;; 22 | -c|--component-id) 23 | component_id="$2" 24 | shift # past argument 25 | ;; 26 | -t|--component-type) 27 | component_type="$2" 28 | shift # past argument 29 | ;; 30 | *) 31 | # unknown option 32 | ;; 33 | esac 34 | shift # past argument or value 35 | done 36 | 37 | 38 | # change to directory of this script 39 | cd $(dirname "$0") 40 | # replace placeholders 41 | if [ -e ./$component_type/sonar-project.properties ]; then 42 | echo "target: $target, project-id: $project_id, component-id: $component_id, component-type: $component_type" 43 | sed 's|@project_id@|'$project_id'|g; s|@component_id@|'$component_id'|g' ./$component_type/sonar-project.properties > $target 44 | else 45 | echo "no sonar-project.properties template found" 46 | fi 47 | -------------------------------------------------------------------------------- /boilerplates/rshiny-app/Jenkinsfile: -------------------------------------------------------------------------------- 1 | /* generated jenkins file used for building and deploying @component_id@ in projects @project_id@ */ 2 | def final projectId = '@project_id@' 3 | def final componentId = '@component_id@' 4 | def final credentialsId = "${projectId}-cd-cd-user-with-password" 5 | def sharedLibraryRepository 6 | def dockerRegistry 7 | node { 8 | sharedLibraryRepository = env.SHARED_LIBRARY_REPOSITORY 9 | dockerRegistry = env.DOCKER_REGISTRY 10 | } 11 | 12 | library identifier: 'ods-library@production', retriever: modernSCM( 13 | [$class: 'GitSCMSource', 14 | remote: sharedLibraryRepository, 15 | credentialsId: credentialsId]) 16 | 17 | /* 18 | See readme of shared library for usage and customization 19 | @ https://github.com/opendevstack/ods-jenkins-shared-library/blob/master/README.md 20 | eg. to create and set your own builder slave instead of 21 | the base slave used here - the code of the base slave can be found at 22 | https://github.com/opendevstack/ods-core/tree/master/jenkins/slave-base 23 | */ 24 | odsPipeline( 25 | image: "${dockerRegistry}/cd/jenkins-slave-base", 26 | projectId: projectId, 27 | componentId: componentId, 28 | branchToEnvironmentMapping: [ 29 | 'master': 'test', 30 | '*': 'dev' 31 | ] 32 | ) { context -> 33 | stageStartOpenshiftBuild(context) 34 | stageDeployToOpenshift(context) 35 | } 36 | -------------------------------------------------------------------------------- /boilerplates/rshiny-app/README.md: -------------------------------------------------------------------------------- 1 | # Rshiny Application 2 | 3 | Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-project-quickstarters/latest/index.html) 4 | 5 | Please update documentation in the [antora page direcotry](https://github.com/opendevstack/ods-project-quickstarters/tree/master/docs/modules/ROOT/pages) 6 | -------------------------------------------------------------------------------- /boilerplates/rshiny-app/docker/app.R: -------------------------------------------------------------------------------- 1 | options(java.parameters = c("-Xss2560k", "-Xmx4g")) 2 | 3 | library(DBI) 4 | library(rJava) 5 | library(RJDBC) 6 | library(shiny) 7 | library(shinythemes) 8 | library(d3heatmap) 9 | library(ggplot2) 10 | library(reshape2) 11 | 12 | # ================================================= UI PART ======================================================= 13 | ui <- fluidPage( 14 | # Application title 15 | titlePanel("Hello Shiny!"), 16 | 17 | # Sidebar with a slider input for number of observations 18 | sidebarLayout( 19 | sidebarPanel( 20 | sliderInput("obs", 21 | "Number of observations:", 22 | min = 1, 23 | max = 1000, 24 | value = 500) 25 | ), 26 | 27 | # Show a plot of the generated distribution 28 | mainPanel( 29 | plotOutput("distPlot") 30 | ) 31 | ) 32 | ) 33 | 34 | # ====================================== SERVER PART ======================================================= 35 | server <- function(input, output) { 36 | 37 | # Expression that generates a plot of the distribution. The expression 38 | # is wrapped in a call to renderPlot to indicate that: 39 | # 40 | # 1) It is "reactive" and therefore should be automatically 41 | # re-executed when inputs change 42 | # 2) Its output type is a plot 43 | # 44 | output$distPlot <- renderPlot({ 45 | 46 | # generate an rnorm distribution and plot it 47 | dist <- rnorm(input$obs) 48 | hist(dist) 49 | }) 50 | 51 | } 52 | 53 | 54 | shinyApp(ui, server) -------------------------------------------------------------------------------- /docs/antora.yml: -------------------------------------------------------------------------------- 1 | name: ods-project-quickstarters 2 | title: ODS Project Quickstarters 3 | version: latest 4 | nav: 5 | - modules/ROOT/nav.adoc 6 | 7 | -------------------------------------------------------------------------------- /docs/modules/ROOT/assets/images/Airflow Architecture Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/docs/modules/ROOT/assets/images/Airflow Architecture Diagram.png -------------------------------------------------------------------------------- /docs/modules/ROOT/nav.adoc: -------------------------------------------------------------------------------- 1 | * xref:ROOT:index.adoc[Introduction] 2 | //Backend Quickstarters 3 | * xref:ROOT:be-docker-plain.adoc[BE Docker Plain] 4 | * xref:ROOT:be-golang.adoc[BE Golang] 5 | * xref:ROOT:be-java-springboot.adoc[BE Java / Spring Boot] 6 | * xref:ROOT:be-node-express.adoc[BE Node Express] 7 | * xref:ROOT:be-python-flask.adoc[BE Python Flask] 8 | * xref:ROOT:be-scala-akka.adoc[BE Scala Akka] 9 | 10 | 11 | //Frontend Quickstarters 12 | * xref:ROOT:fe-angular.adoc[FE Angular] 13 | * xref:ROOT:fe-ionic.adoc[FE Ionic] 14 | * xref:ROOT:fe-react.adoc[FE React] 15 | * xref:ROOT:fe-vue.adoc[FE Vue] 16 | 17 | // Data Science Quickstarters 18 | * xref:ROOT:ds-ml-service.adoc[Data Science Machine Learning Service] 19 | * xref:ROOT:ds-jupyter-notebook.adoc[Data Science Jupyter Notebook] 20 | * xref:ROOT:ds-rshiny-app.adoc[Data Science RShiny app] 21 | //Other Quickstarters 22 | * xref:ROOT:airflow.adoc[Airflow] 23 | * xref:ROOT:e2e-cypress.adoc[Cypress E2E testing Quickstarters] 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/modules/ROOT/pages/__JENKINS_SLAVE_TEMPLATE_README.adoc: -------------------------------------------------------------------------------- 1 | = (jenkins slave name) 2 | 3 | == Introduction / Used for building `<language>` 4 | 5 | … 6 | The image is built in the global `cd` project and is named `jenkins-slave-<NAME>`.
7 | it can be referenced in a `Jenkinsfile` with `cd/jenkins-slave-<NAME>` 8 | 9 | == Features / what's in, which plugins, … 10 | 11 | == Known limitations -------------------------------------------------------------------------------- /docs/modules/ROOT/pages/__QS_BOILERPLATE_TEMPLATE_README.adoc: -------------------------------------------------------------------------------- 1 | = (quickstarter name) 2 | 3 | == Purpose of this quickstarter (use this when you want to … ) 4 | 5 | == What files / architecture is generated? 6 | 7 | == Frameworks used 8 | 9 | == Usage - how do you start after you provisioned this quickstarter 10 | 11 | == How this quickstarter is built thru jenkins 12 | 13 | == Builder Slave used 14 | 15 | == Known limitations -------------------------------------------------------------------------------- /docs/modules/ROOT/pages/be-golang.adoc: -------------------------------------------------------------------------------- 1 | = Backend - Go (be-golang) 2 | 3 | == Purpose of this quickstarter 4 | 5 | Use this quickstarter when you want to use https://golang.org[Go]. Go is well 6 | suited for CLI tools, network/operational related things and microservices. 7 | 8 | == What files / which architecture is generated? 9 | 10 | ---- 11 | ├── Jenkinsfile - Contains Jenkins build configuration 12 | ├── README.md 13 | ├── docker - Contains Dockerfile for the build 14 | │ └── Dockerfile 15 | ├── sonar-project.properties - SonarQube Configuration 16 | ├── main.go - Example Go file 17 | ---- 18 | 19 | == Frameworks used 20 | 21 | None, except the ODS https://github.com/opendevstack/ods-jenkins-shared-library[Jenkins Shared Library] 22 | 23 | == Usage - how do you start after you provisioned this quickstarter 24 | 25 | Simply start to write Go code, e.g. by extending `main.go`. No further adjustments 26 | should be necessary. Typically, you'd want to use Go modules: 27 | 28 | ---- 29 | go mod init example.com/project/component 30 | ---- 31 | 32 | == How this quickstarter is built through Jenkins 33 | 34 | There are six steps: 35 | 36 | * Check that all files are gofmt'd. 37 | * Run SonarQube analysis. 38 | * Run all package tests. 39 | * Build the binary (placing it into the `docker` directory). 40 | * Build the container image. 41 | * Deploy. 42 | 43 | == Builder Slave used 44 | 45 | This quickstarter uses 46 | https://github.com/opendevstack/ods-project-quickstarters/tree/master/jenkins-slaves/golang[Golang builder slave]. 47 | 48 | == Known limitations 49 | 50 | N/A 51 | -------------------------------------------------------------------------------- /docs/modules/ROOT/pages/ds-rshiny-app.adoc: -------------------------------------------------------------------------------- 1 | = Data Science Rshiny Application 2 | 3 | == Purpose of this quickstarter 4 | 5 | Provisions a Rshiny application within openshift using crowd authentification. 6 | 7 | == What files / architecture is generated? 8 | 9 | ---- 10 | . 11 | ├── Jenkinsfile - This file contains Jenkins build configuration settings 12 | ├── README.md - This readme file 13 | ├── docker - This folder contains Docker configuration settings and main R shiny app 14 | ├── Dockerfile 15 | └── app.R 16 | ---- 17 | 18 | == Frameworks used 19 | 20 | https://www.tutorialspoint.com/r/index.htm[R]/https://shiny.rstudio.com/tutorial/[Rshiny] 21 | 22 | == Usage - how do you start after you provisioned this quickstarter 23 | 24 | The quickstarter sets up two pods in openshift. The rshiny application is routed through a https://github.com/opendevstack/ods-core/tree/master/shared-images/nginx-authproxy-crowd[crowd authentication proxy]. 25 | 26 | == How this quickstarter is built through jenkins 27 | 28 | The build pipeline is defined in the `Jenkinsfile` in the project root. The main stages of the pipeline are: 29 | 30 | . Start openshift build 31 | . Deploy image to openshift 32 | 33 | == Builder slave used 34 | 35 | https://github.com/opendevstack/ods-core/tree/master/jenkins/slave-base[jenkins-slave-base] 36 | 37 | == Known limitions 38 | 39 | N/A 40 | -------------------------------------------------------------------------------- /jenkins-slaves/README.md: -------------------------------------------------------------------------------- 1 | # Jenkins Slaves 2 | 3 | Hosts all the jenkins slaves that are part of the OpenDevStack distribution. 4 | 5 | All these slaves inherit from the [slave-base](https://github.com/opendevstack/ods-core/tree/master/jenkins/slave-base), and are built in the global `CD` project. 6 | 7 | Inside your `jenkinsfile` you can configure which slave is used by changing the `image` property to your imagestream (e.g. in case it's in a `project`-cd namespace and not in the global `CD` one). 8 | ``` 9 | odsPipeline( 10 | image: "${dockerRegistry}/cd/jenkins-slave-maven" 11 | ``` 12 | the ODS [jenkins shared library](https://github.com/opendevstack/ods-jenkins-shared-library) takes care about starting the `jenkins slave` during the build as pod in your `project`s `cd` namespace with the `jenkins` service account. 13 | 14 | ### Currently available slaves 15 | 1. [Maven / Gradle](maven/README.md) 16 | 1. [nodeJS 10](nodejs10-angular/README.md) 17 | 1. [Scala & SBT](scala/README.md) 18 | 1. [Python](python/README.md) 19 | 20 | If you create a new slave please add a `README.md` inside its directory, based on [this template](../__JENKINS_SLAVE_TEMPLATE_README.md). 21 | 22 | ## OCP config / installation 23 | 24 | Config can be created / updated / deleted with Tailor. 25 | 26 | Example: 27 | ``` 28 | cd /ocp-config && tailor status 29 | ``` 30 | -------------------------------------------------------------------------------- /jenkins-slaves/airflow/README.md: -------------------------------------------------------------------------------- 1 | # Airflow Jenkins Slave 2 | 3 | ## Introduction / Used for building / testing `airflow` 4 | This slave is used to build / execute / test [Airflow](https://airflow.apache.org/) code for `airflow-cluster` quickstarter. 5 | 6 | The image is built in the global `cd` project and is named `jenkins-slave-airflow`. 7 | It can be referenced in a `Jenkinsfile` with `cd/jenkins-slave-airflow` 8 | 9 | ## Features / what's in, which plugins, ... 10 | 1. Python 3.6 11 | 2. PIP 12 | 3. NodeJS 8.x 13 | 4. Airflow 1.10.2 14 | 15 | ## Known limitations 16 | Not (yet) Nexus package manager aware and no special HTTP Proxy configuration 17 | -------------------------------------------------------------------------------- /jenkins-slaves/airflow/contrib/bin/scl_enable: -------------------------------------------------------------------------------- 1 | # This will make scl collection binaries work out of box. 2 | unset BASH_ENV PROMPT_COMMAND ENV 3 | source scl_source enable rh-python36 4 | source scl_source enable rh-nodejs8 5 | -------------------------------------------------------------------------------- /jenkins-slaves/airflow/contrib/npmrc: -------------------------------------------------------------------------------- 1 | registry=NEXUS_HOST/repository/npmjs/ 2 | always-auth=true 3 | _auth=NEXUS_AUTH 4 | email=no-reply@opendevstack.org 5 | -------------------------------------------------------------------------------- /jenkins-slaves/airflow/ocp-config/Tailorfile: -------------------------------------------------------------------------------- 1 | namespace cd 2 | selector app=jenkins-slave-airflow 3 | param-dir ../../../../ods-configuration/ods-project-quickstarters/jenkins-slaves/airflow/ocp-config 4 | 5 | bc,is 6 | -------------------------------------------------------------------------------- /jenkins-slaves/airflow/ocp-config/bc.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-airflow 5 | objects: 6 | - apiVersion: v1 7 | kind: BuildConfig 8 | metadata: 9 | name: jenkins-slave-airflow 10 | labels: 11 | app: jenkins-slave-airflow 12 | spec: 13 | nodeSelector: null 14 | output: 15 | to: 16 | kind: ImageStreamTag 17 | name: jenkins-slave-airflow:latest 18 | postCommit: {} 19 | resources: {} 20 | runPolicy: Serial 21 | source: 22 | contextDir: jenkins-slaves/airflow 23 | git: 24 | ref: production 25 | uri: ${REPO_BASE}/opendevstack/ods-project-quickstarters.git 26 | sourceSecret: 27 | name: cd-user-token 28 | type: Git 29 | strategy: 30 | dockerStrategy: 31 | dockerfilePath: Dockerfile.rhel7 32 | env: 33 | - name: NEXUS_HOST 34 | value: ${NEXUS_URL} 35 | - name: NEXUS_AUTH 36 | value: ${NEXUS_AUTH} 37 | from: 38 | kind: ImageStreamTag 39 | name: jenkins-slave-base:latest 40 | type: Docker 41 | triggers: [] 42 | parameters: 43 | - name: NEXUS_URL 44 | required: true 45 | - name: NEXUS_AUTH 46 | required: true 47 | - name: REPO_BASE 48 | required: true 49 | -------------------------------------------------------------------------------- /jenkins-slaves/airflow/ocp-config/is.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-airflow 5 | objects: 6 | - apiVersion: v1 7 | kind: ImageStream 8 | metadata: 9 | name: jenkins-slave-airflow 10 | labels: 11 | app: jenkins-slave-airflow 12 | spec: 13 | dockerImageRepository: jenkins-slave-airflow 14 | lookupPolicy: 15 | local: false 16 | -------------------------------------------------------------------------------- /jenkins-slaves/golang/Dockerfile.rhel7: -------------------------------------------------------------------------------- 1 | FROM cd/jenkins-slave-base 2 | 3 | LABEL maintainer="Michael Sauter " 4 | 5 | ENV GO_VERSION 1.12.6 6 | 7 | RUN cd /tmp && \ 8 | curl -LO https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz && \ 9 | tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz && \ 10 | rm -f *.tar.gz && \ 11 | cd - && \ 12 | mkdir /go 13 | 14 | ENV PATH $PATH:/usr/local/go/bin 15 | ENV GOBIN /usr/local/bin 16 | 17 | RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin v1.17.1 18 | 19 | RUN go get -u github.com/jstemmer/go-junit-report 20 | 21 | WORKDIR /go 22 | -------------------------------------------------------------------------------- /jenkins-slaves/golang/ocp-config/Tailorfile: -------------------------------------------------------------------------------- 1 | namespace cd 2 | selector app=jenkins-slave-golang 3 | param-dir ../../../../ods-configuration/ods-project-quickstarters/jenkins-slaves/golang/ocp-config 4 | 5 | bc,is 6 | -------------------------------------------------------------------------------- /jenkins-slaves/golang/ocp-config/bc.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-golang 5 | objects: 6 | - apiVersion: v1 7 | kind: BuildConfig 8 | metadata: 9 | name: jenkins-slave-golang 10 | labels: 11 | app: jenkins-slave-golang 12 | spec: 13 | failedBuildsHistoryLimit: 5 14 | nodeSelector: null 15 | output: 16 | to: 17 | kind: ImageStreamTag 18 | name: jenkins-slave-golang:latest 19 | postCommit: {} 20 | resources: {} 21 | runPolicy: Serial 22 | source: 23 | contextDir: jenkins-slaves/golang 24 | git: 25 | ref: production 26 | uri: ${REPO_BASE}/opendevstack/ods-project-quickstarters.git 27 | sourceSecret: 28 | name: cd-user-token 29 | type: Git 30 | strategy: 31 | dockerStrategy: 32 | dockerfilePath: Dockerfile.rhel7 33 | from: 34 | kind: ImageStreamTag 35 | name: jenkins-slave-base:latest 36 | type: Docker 37 | successfulBuildsHistoryLimit: 5 38 | triggers: [] 39 | parameters: 40 | - name: REPO_BASE 41 | required: true 42 | -------------------------------------------------------------------------------- /jenkins-slaves/golang/ocp-config/is.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-golang 5 | objects: 6 | - apiVersion: v1 7 | kind: ImageStream 8 | metadata: 9 | name: jenkins-slave-golang 10 | labels: 11 | app: jenkins-slave-golang 12 | spec: 13 | dockerImageRepository: jenkins-slave-golang 14 | lookupPolicy: 15 | local: false 16 | -------------------------------------------------------------------------------- /jenkins-slaves/maven/README.md: -------------------------------------------------------------------------------- 1 | # Maven / Gradle Jenkins Slave 2 | 3 | ## Introduction / Used for building `java` 4 | This slave is used to build java code, both thru `maven` and `gradle` 5 | 6 | The image is built in the global `cd` project and is named `jenkins-slave-maven`. 7 | It can be referenced in a `Jenkinsfile` with `cd/jenkins-slave-maven` 8 | 9 | ## Features / what's in, which plugins, ... 10 | 1. Nexus configuration for `Maven` & `Gradle` 11 | 1. HTTP Proxy awareness for both builders 12 | 13 | ## Known limitations 14 | n/a 15 | -------------------------------------------------------------------------------- /jenkins-slaves/maven/contrib/bin/configure-slave: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -n "$MAVEN_MIRROR_URL" ]; then 4 | xml=" \ 5 | mirror.default\ 6 | $MAVEN_MIRROR_URL\ 7 | external:*\ 8 | " 9 | sed -i "s||$xml|" $HOME/.m2/settings.xml 10 | fi 11 | 12 | CONTAINER_MEMORY_IN_BYTES=$(cat /sys/fs/cgroup/memory/memory.limit_in_bytes) 13 | CONTAINER_MEMORY_IN_MB=$((CONTAINER_MEMORY_IN_BYTES/2**20)) 14 | 15 | # multi-arch check ... if not x86_64, leave alone 16 | if [[ "$(uname -m)" == "x86_64" ]]; then 17 | # Set the JVM architecture used. Follow OPENSHIFT_JENKINS_JVM_ARCH if set. If 18 | # not, use 32 bit JVM for space efficiency if container size < 2GiB 19 | if [[ "${OPENSHIFT_JENKINS_JVM_ARCH}" == "x86_64" || \ 20 | ( "${OPENSHIFT_JENKINS_JVM_ARCH}" == "" && "${CONTAINER_MEMORY_IN_MB}" -ge 2048 ) ]]; then 21 | alternatives --set javac $(alternatives --display javac | awk '/family.*x86_64/ { print $1; }') 22 | else 23 | alternatives --set javac $(alternatives --display javac | awk '/family.*i386/ { print $1; }') 24 | fi 25 | fi 26 | 27 | echo "OPENSHIFT_JENKINS_JVM_ARCH='${OPENSHIFT_JENKINS_JVM_ARCH}', CONTAINER_MEMORY_IN_MB='${CONTAINER_MEMORY_IN_MB}', using $(readlink /etc/alternatives/javac)" 28 | -------------------------------------------------------------------------------- /jenkins-slaves/maven/contrib/bin/scl_enable: -------------------------------------------------------------------------------- 1 | # This will make scl collection binaries work out of box. 2 | unset BASH_ENV PROMPT_COMMAND ENV 3 | source scl_source enable rh-maven33 4 | -------------------------------------------------------------------------------- /jenkins-slaves/maven/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/jenkins-slaves/maven/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /jenkins-slaves/maven/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Jul 03 16:54:12 CEST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip 7 | -------------------------------------------------------------------------------- /jenkins-slaves/maven/ocp-config/Tailorfile: -------------------------------------------------------------------------------- 1 | namespace cd 2 | selector app=jenkins-slave-maven 3 | param-dir ../../../../ods-configuration/ods-project-quickstarters/jenkins-slaves/maven/ocp-config 4 | 5 | bc,is 6 | -------------------------------------------------------------------------------- /jenkins-slaves/maven/ocp-config/bc.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-maven 5 | objects: 6 | - apiVersion: v1 7 | kind: BuildConfig 8 | metadata: 9 | name: jenkins-slave-maven 10 | labels: 11 | app: jenkins-slave-maven 12 | spec: 13 | nodeSelector: null 14 | output: 15 | to: 16 | kind: ImageStreamTag 17 | name: jenkins-slave-maven:latest 18 | postCommit: {} 19 | resources: {} 20 | runPolicy: Serial 21 | source: 22 | contextDir: jenkins-slaves/maven 23 | git: 24 | ref: production 25 | uri: ${REPO_BASE}/opendevstack/ods-project-quickstarters.git 26 | sourceSecret: 27 | name: cd-user-token 28 | type: Git 29 | strategy: 30 | dockerStrategy: 31 | dockerfilePath: Dockerfile.rhel7 32 | env: 33 | - name: NEXUS_HOST 34 | value: ${NEXUS_URL} 35 | - name: NEXUS_USERNAME 36 | value: ${NEXUS_USERNAME} 37 | - name: NEXUS_PASSWORD 38 | value: ${NEXUS_PASSWORD} 39 | from: 40 | kind: ImageStreamTag 41 | name: jenkins-slave-base:latest 42 | type: Docker 43 | triggers: [] 44 | parameters: 45 | - name: REPO_BASE 46 | required: true 47 | - name: NEXUS_URL 48 | required: true 49 | - name: NEXUS_USERNAME 50 | required: true 51 | - name: NEXUS_PASSWORD 52 | required: true 53 | -------------------------------------------------------------------------------- /jenkins-slaves/maven/ocp-config/is.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-maven 5 | objects: 6 | - apiVersion: v1 7 | kind: ImageStream 8 | metadata: 9 | name: jenkins-slave-maven 10 | labels: 11 | app: jenkins-slave-maven 12 | spec: 13 | dockerImageRepository: jenkins-slave-maven 14 | lookupPolicy: 15 | local: false 16 | -------------------------------------------------------------------------------- /jenkins-slaves/maven/set_maven_proxy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # this script checks for env variable HTTP_PROXY and add them to settings.xml 3 | # 4 | if [[ $HTTP_PROXY != "" ]]; then 5 | 6 | mvn_proxy="internaltruehttp" 7 | 8 | proxy=$(echo $HTTP_PROXY | sed -e "s|https://||g" | sed -e "s|http://||g") 9 | proxy_hostp=$(echo $proxy | cut -d "@" -f2) 10 | 11 | proxy_host=$(echo $proxy_hostp | cut -d ":" -f1) 12 | mvn_proxy=$mvn_proxy"$proxy_host" 13 | 14 | proxy_port=$(echo $proxy_hostp | cut -d ":" -f2) 15 | mvn_proxy=$mvn_proxy"$proxy_port" 16 | 17 | proxy_userp=$(echo $proxy | cut -d "@" -f1) 18 | if [[ $proxy_userp != $proxy_hostp ]]; 19 | then 20 | proxy_user=$(echo $proxy_userp | cut -d ":" -f1) 21 | mvn_proxy=$mvn_proxy"$proxy_user" 22 | proxy_pw=$(echo $proxy_userp | sed -e "s|$proxy_user:||g") 23 | mvn_proxy=$mvn_proxy"$proxy_pw" 24 | fi 25 | fi 26 | 27 | if [[ $NO_PROXY != "" ]]; then 28 | noproxy_host=$(echo $NO_PROXY | sed -e 's|\,\.|\,\*\.|g') 29 | noproxy_host=$(echo $noproxy_host | sed -e "s/,/|/g") 30 | mvn_proxy=$mvn_proxy"$noproxy_host" 31 | fi 32 | 33 | if [[ $HTTP_PROXY != "" ]]; then 34 | mvn_proxy=$mvn_proxy"" 35 | fi 36 | 37 | echo -e $mvn_proxy > /tmp/mvn_proxy 38 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs10-angular/README.md: -------------------------------------------------------------------------------- 1 | # Node.js 10 - Angular Jenkins Slave 2 | 3 | ## Introduction / Used for building `node.js` 4 | This slave is used to build node.js based projects, both thru `npm` and `yarn` 5 | 6 | The image is built in the global `cd` project and is named `jenkins-slave-nodejs10-angular`. 7 | It can be referenced in a `Jenkinsfile` with `cd/jenkins-slave-nodejs10-angular`. 8 | 9 | ## Features / what's in, which plugins, ... 10 | 1. Nexus configuration 11 | 2. HTTP Proxy awareness 12 | 3. Angular CLI & cypress dependencies pre-installed 13 | 14 | ## Known limitations 15 | n/a 16 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs10-angular/contrib/bin/scl_enable: -------------------------------------------------------------------------------- 1 | # This will make scl collection binaries work out of box. 2 | unset BASH_ENV PROMPT_COMMAND ENV 3 | source scl_source enable rh-nodejs10 4 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs10-angular/npmrc: -------------------------------------------------------------------------------- 1 | registry=NEXUS_HOST/repository/npmjs/ 2 | always-auth=true 3 | _auth=NEXUS_AUTH 4 | email=no-reply@opendevstack.org 5 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs10-angular/ocp-config/Tailorfile: -------------------------------------------------------------------------------- 1 | namespace cd 2 | selector app=jenkins-slave-nodejs10-angular 3 | param-dir ../../../../ods-configuration/ods-project-quickstarters/jenkins-slaves/nodejs10-angular/ocp-config 4 | 5 | bc,is 6 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs10-angular/ocp-config/bc.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-nodejs10-angular 5 | objects: 6 | - apiVersion: v1 7 | kind: BuildConfig 8 | metadata: 9 | name: jenkins-slave-nodejs10-angular 10 | labels: 11 | app: jenkins-slave-nodejs10-angular 12 | spec: 13 | failedBuildsHistoryLimit: 5 14 | nodeSelector: null 15 | output: 16 | to: 17 | kind: ImageStreamTag 18 | name: jenkins-slave-nodejs10-angular:latest 19 | postCommit: {} 20 | resources: {} 21 | runPolicy: Serial 22 | source: 23 | contextDir: jenkins-slaves/nodejs10-angular 24 | git: 25 | ref: production 26 | uri: ${REPO_BASE}/opendevstack/ods-project-quickstarters.git 27 | sourceSecret: 28 | name: cd-user-token 29 | type: Git 30 | strategy: 31 | dockerStrategy: 32 | dockerfilePath: Dockerfile.rhel7 33 | env: 34 | - name: NEXUS_HOST 35 | value: ${NEXUS_URL} 36 | - name: NEXUS_AUTH 37 | value: ${NEXUS_AUTH} 38 | from: 39 | kind: ImageStreamTag 40 | name: jenkins-slave-base:latest 41 | type: Docker 42 | successfulBuildsHistoryLimit: 5 43 | triggers: [] 44 | parameters: 45 | - name: NEXUS_URL 46 | required: true 47 | - name: NEXUS_AUTH 48 | required: true 49 | - name: REPO_BASE 50 | required: true 51 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs10-angular/ocp-config/is.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-nodejs10-angular 5 | objects: 6 | - apiVersion: v1 7 | kind: ImageStream 8 | metadata: 9 | name: jenkins-slave-nodejs10-angular 10 | labels: 11 | app: jenkins-slave-nodejs10-angular 12 | spec: 13 | dockerImageRepository: jenkins-slave-nodejs10-angular 14 | lookupPolicy: 15 | local: false 16 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs10-angular/test/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # 3 | # Test the Jenkins image. 4 | # 5 | # IMAGE_NAME specifies the name of the candidate image used for testing. 6 | # The image has to be available before this script is executed. 7 | # 8 | 9 | # make sure oc is installed 10 | docker run ${IMAGE_NAME} oc 11 | # make sure npm and nodejs are available 12 | # the default entrypoint for the image assumes if you supply more than 13 | # one arg, you are trying to invoke the slave logic, so we have to 14 | # override the entrypoing to run complicated commands for testing. 15 | docker run --entrypoint=/bin/sh ${IMAGE_NAME} -ic 'npm --version' 16 | docker run --entrypoint=/bin/sh ${IMAGE_NAME} -ic 'node --version' 17 | 18 | echo "SUCCESS!" 19 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs8-angular/contrib/bin/scl_enable: -------------------------------------------------------------------------------- 1 | # This will make scl collection binaries work out of box. 2 | unset BASH_ENV PROMPT_COMMAND ENV 3 | source scl_source enable rh-nodejs8 4 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs8-angular/npmrc: -------------------------------------------------------------------------------- 1 | registry=NEXUS_HOST/repository/npmjs/ 2 | always-auth=true 3 | _auth=NEXUS_AUTH 4 | email=no-reply@opendevstack.org 5 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs8-angular/ocp-config/Tailorfile: -------------------------------------------------------------------------------- 1 | namespace cd 2 | selector app=jenkins-slave-nodejs8-angular 3 | param-dir ../../../../ods-configuration/ods-project-quickstarters/jenkins-slaves/nodejs8-angular/ocp-config 4 | 5 | bc,is 6 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs8-angular/ocp-config/bc.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-nodejs8-angular 5 | objects: 6 | - apiVersion: v1 7 | kind: BuildConfig 8 | metadata: 9 | name: jenkins-slave-nodejs8-angular 10 | labels: 11 | app: jenkins-slave-nodejs8-angular 12 | spec: 13 | nodeSelector: null 14 | output: 15 | to: 16 | kind: ImageStreamTag 17 | name: jenkins-slave-nodejs8-angular:latest 18 | postCommit: {} 19 | resources: {} 20 | runPolicy: Serial 21 | source: 22 | contextDir: jenkins-slaves/nodejs8-angular 23 | git: 24 | ref: production 25 | uri: ${REPO_BASE}/opendevstack/ods-project-quickstarters.git 26 | sourceSecret: 27 | name: cd-user-token 28 | type: Git 29 | strategy: 30 | dockerStrategy: 31 | dockerfilePath: Dockerfile.rhel7 32 | env: 33 | - name: NEXUS_HOST 34 | value: ${NEXUS_URL} 35 | - name: NEXUS_AUTH 36 | value: ${NEXUS_AUTH} 37 | from: 38 | kind: ImageStreamTag 39 | name: jenkins-slave-base:latest 40 | type: Docker 41 | triggers: [] 42 | parameters: 43 | - name: NEXUS_URL 44 | required: true 45 | - name: NEXUS_AUTH 46 | required: true 47 | - name: REPO_BASE 48 | required: true 49 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs8-angular/ocp-config/is.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-nodejs8-angular 5 | objects: 6 | - apiVersion: v1 7 | kind: ImageStream 8 | metadata: 9 | name: jenkins-slave-nodejs8-angular 10 | labels: 11 | app: jenkins-slave-nodejs8-angular 12 | spec: 13 | dockerImageRepository: jenkins-slave-nodejs8-angular 14 | lookupPolicy: 15 | local: false 16 | -------------------------------------------------------------------------------- /jenkins-slaves/nodejs8-angular/test/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # 3 | # Test the Jenkins image. 4 | # 5 | # IMAGE_NAME specifies the name of the candidate image used for testing. 6 | # The image has to be available before this script is executed. 7 | # 8 | 9 | # make sure oc is installed 10 | docker run ${IMAGE_NAME} oc 11 | # make sure npm and nodejs are available 12 | # the default entrypoint for the image assumes if you supply more than 13 | # one arg, you are trying to invoke the slave logic, so we have to 14 | # override the entrypoing to run complicated commands for testing. 15 | docker run --entrypoint=/bin/sh ${IMAGE_NAME} -ic 'npm --version' 16 | docker run --entrypoint=/bin/sh ${IMAGE_NAME} -ic 'node --version' 17 | 18 | echo "SUCCESS!" 19 | -------------------------------------------------------------------------------- /jenkins-slaves/python/Dockerfile.rhel7: -------------------------------------------------------------------------------- 1 | FROM cd/jenkins-slave-base 2 | 3 | MAINTAINER Michael Sauter 4 | 5 | ENV PYTHON_VERSION=3.6.0 6 | ENV INSTALL_PKGS="yum-utils gcc make openssl-devel zlib-devel" 7 | 8 | RUN set -x \ 9 | && yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS \ 10 | && yum clean all \ 11 | && rm -rf /var/cache/yum/* 12 | 13 | RUN cd /tmp \ 14 | && curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz \ 15 | && tar xzf Python-${PYTHON_VERSION}.tgz -C / \ 16 | && rm -rf Python-${Python_VERSION}.tgz 17 | 18 | RUN cd /Python-${PYTHON_VERSION} \ 19 | && ./configure \ 20 | && make altinstall \ 21 | && ln -s /Python-${PYTHON_VERSION}/python /usr/local/sbin/python3 \ 22 | && python3 -V \ 23 | && chmod a+rx /Python-${PYTHON_VERSION} \ 24 | && chmod a+rx /Python-${PYTHON_VERSION}/python \ 25 | && yum remove -y $INSTALL_PKGS 26 | 27 | RUN curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" \ 28 | && python3 get-pip.py 29 | 30 | # Upgrade PIP 31 | RUN pip3 install --upgrade pip \ 32 | && pip3 -V \ 33 | && pip3 install virtualenv pycodestyle 34 | 35 | # Configure PIP SSL validation 36 | RUN pip config set global.cert /etc/ssl/certs/ca-bundle.crt \ 37 | && pip config list 38 | 39 | # Enables default user to access $HOME folder 40 | RUN chgrp -R 0 $HOME && \ 41 | chmod -R g+rw $HOME 42 | 43 | -------------------------------------------------------------------------------- /jenkins-slaves/python/README.md: -------------------------------------------------------------------------------- 1 | # Python Jenkins Slave 2 | 3 | ## Introduction / Used for building `python` 4 | This slave is used to build / execute python code 5 | 6 | The image is built in the global `cd` project and is named `jenkins-slave-python`. 7 | It can be referenced in a `Jenkinsfile` with `cd/jenkins-slave-python` 8 | 9 | ## Features / what's in, which plugins, ... 10 | 1. Python 3.6 11 | 1. PIP 12 | 13 | ## Known limitations 14 | Not (yet) Nexus package manager aware and no special HTTP Proxy configuration 15 | -------------------------------------------------------------------------------- /jenkins-slaves/python/ocp-config/Tailorfile: -------------------------------------------------------------------------------- 1 | namespace cd 2 | selector app=jenkins-slave-python 3 | param-dir ../../../../ods-configuration/ods-project-quickstarters/jenkins-slaves/python/ocp-config 4 | 5 | bc,is 6 | -------------------------------------------------------------------------------- /jenkins-slaves/python/ocp-config/bc.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-python 5 | objects: 6 | - apiVersion: v1 7 | kind: BuildConfig 8 | metadata: 9 | name: jenkins-slave-python 10 | labels: 11 | app: jenkins-slave-python 12 | spec: 13 | nodeSelector: null 14 | output: 15 | to: 16 | kind: ImageStreamTag 17 | name: jenkins-slave-python:latest 18 | postCommit: {} 19 | resources: {} 20 | runPolicy: Serial 21 | source: 22 | contextDir: jenkins-slaves/python 23 | git: 24 | ref: production 25 | uri: ${REPO_BASE}/opendevstack/ods-project-quickstarters.git 26 | sourceSecret: 27 | name: cd-user-token 28 | type: Git 29 | strategy: 30 | dockerStrategy: 31 | dockerfilePath: Dockerfile.rhel7 32 | from: 33 | kind: ImageStreamTag 34 | name: jenkins-slave-base:latest 35 | type: Docker 36 | triggers: [] 37 | parameters: 38 | - name: REPO_BASE 39 | required: true 40 | -------------------------------------------------------------------------------- /jenkins-slaves/python/ocp-config/is.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-python 5 | objects: 6 | - apiVersion: v1 7 | kind: ImageStream 8 | metadata: 9 | name: jenkins-slave-python 10 | labels: 11 | app: jenkins-slave-python 12 | spec: 13 | dockerImageRepository: jenkins-slave-python 14 | lookupPolicy: 15 | local: false 16 | -------------------------------------------------------------------------------- /jenkins-slaves/scala/README.md: -------------------------------------------------------------------------------- 1 | # Scala / SBT Jenkins Slave 2 | 3 | ## Introduction / Used for building `scala` 4 | This slave is used to build scala code thru SBT (Scala build tool) 5 | 6 | The image is built in the global `cd` project and is named `jenkins-slave-scala`. 7 | It can be referenced in a `Jenkinsfile` with `cd/jenkins-slave-scala` 8 | 9 | ## Features / what's in, which plugins, ... 10 | 1. SBT 1.1.6 11 | 1. HTTP Proxy aware 12 | 1. Nexus aware 13 | 14 | ## Known limitations 15 | In case HTTP Proxy config is injected thru environment variables (including NO_PROXY), Nexus configuration is disabled because of an SBT bug 16 | -------------------------------------------------------------------------------- /jenkins-slaves/scala/contrib/bin/scl_enable: -------------------------------------------------------------------------------- 1 | # This will make scl collection binaries work out of box. 2 | unset BASH_ENV PROMPT_COMMAND ENV 3 | source scl_source enable rh-nodejs6 4 | -------------------------------------------------------------------------------- /jenkins-slaves/scala/contrib/bin/scl_enable.rhel7: -------------------------------------------------------------------------------- 1 | # This will make scl collection binaries work out of box. 2 | true 3 | -------------------------------------------------------------------------------- /jenkins-slaves/scala/ocp-config/Tailorfile: -------------------------------------------------------------------------------- 1 | namespace cd 2 | selector app=jenkins-slave-scala 3 | param-dir ../../../../ods-configuration/ods-project-quickstarters/jenkins-slaves/scala/ocp-config 4 | 5 | bc,is 6 | -------------------------------------------------------------------------------- /jenkins-slaves/scala/ocp-config/bc.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-scala 5 | objects: 6 | - apiVersion: v1 7 | kind: BuildConfig 8 | metadata: 9 | name: jenkins-slave-scala 10 | labels: 11 | app: jenkins-slave-scala 12 | spec: 13 | nodeSelector: null 14 | output: 15 | to: 16 | kind: ImageStreamTag 17 | name: jenkins-slave-scala:latest 18 | postCommit: {} 19 | resources: {} 20 | runPolicy: Serial 21 | source: 22 | contextDir: jenkins-slaves/scala 23 | git: 24 | ref: production 25 | uri: ${REPO_BASE}/opendevstack/ods-project-quickstarters.git 26 | sourceSecret: 27 | name: cd-user-token 28 | type: Git 29 | strategy: 30 | dockerStrategy: 31 | dockerfilePath: Dockerfile.rhel7 32 | env: 33 | - name: NEXUS_HOST 34 | value: ${NEXUS_URL} 35 | - name: NEXUS_USERNAME 36 | value: ${NEXUS_USERNAME} 37 | - name: NEXUS_PASSWORD 38 | value: ${NEXUS_PASSWORD} 39 | from: 40 | kind: ImageStreamTag 41 | name: jenkins-slave-base:latest 42 | type: Docker 43 | triggers: [] 44 | parameters: 45 | - name: NEXUS_URL 46 | required: true 47 | - name: NEXUS_USERNAME 48 | required: true 49 | - name: NEXUS_PASSWORD 50 | required: true 51 | - name: REPO_BASE 52 | required: true 53 | -------------------------------------------------------------------------------- /jenkins-slaves/scala/ocp-config/is.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | name: jenkins-slave-scala 5 | objects: 6 | - apiVersion: v1 7 | kind: ImageStream 8 | metadata: 9 | name: jenkins-slave-scala 10 | labels: 11 | app: jenkins-slave-scala 12 | spec: 13 | dockerImageRepository: jenkins-slave-scala 14 | lookupPolicy: 15 | local: false 16 | -------------------------------------------------------------------------------- /jenkins-slaves/scala/sbtconfig/credentials: -------------------------------------------------------------------------------- 1 | realm=Sonatype Nexus Repository Manager 2 | host=NEXUS_HOST 3 | user=NEXUS_USERNAME 4 | password=NEXUS_PASSWORD 5 | -------------------------------------------------------------------------------- /jenkins-slaves/scala/sbtconfig/credentials.sbt: -------------------------------------------------------------------------------- 1 | credentials += Credentials(new File("/home/jenkins/.sbt/credentials")) -------------------------------------------------------------------------------- /jenkins-slaves/scala/sbtconfig/repositories: -------------------------------------------------------------------------------- 1 | [repositories] 2 | local 3 | my-ivy-proxy-releases: NEXUS_HOST/repository/ivy-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext] 4 | my-maven-proxy-releases: NEXUS_HOST/repository/maven-public 5 | -------------------------------------------------------------------------------- /jenkins-slaves/scala/sbtopts: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------ # 2 | # The SBT Configuration file. # 3 | # ------------------------------------------------ # 4 | 5 | 6 | # Disable ANSI color codes 7 | # 8 | #-no-colors 9 | 10 | # Starts sbt even if the current directory contains no sbt project. 11 | # 12 | -sbt-create 13 | 14 | # Path to global settings/plugins directory (default: ~/.sbt) 15 | # 16 | #-sbt-dir /etc/sbt 17 | 18 | # Path to shared boot directory (default: ~/.sbt/boot in 0.11 series) 19 | # 20 | -sbt-boot /home/jenkins/.sbt/boot 21 | 22 | # Path to local Ivy repository (default: ~/.ivy2) 23 | # 24 | -ivy /home/jenkins/.ivy2 25 | 26 | # set memory options 27 | # 28 | #-mem 29 | 30 | # Use local caches for projects, no sharing. 31 | # 32 | #-no-share 33 | 34 | # Put SBT in offline mode. 35 | # 36 | #-offline 37 | 38 | # Sets the SBT version to use. 39 | #-sbt-version 0.11.3 40 | 41 | # Scala version (default: latest release) 42 | # 43 | #-scala-home 44 | #-scala-version 45 | 46 | # java version (default: java from PATH, currently $(java -version |& grep version)) 47 | # 48 | #-java-home 49 | 50 | -Dsbt.override.build.repos=true 51 | -Dsbt.boot.credentials=/home/jenkins/.sbt/credentials 52 | -Dsbt.repository.config=/home/jenkins/.sbt/repositories -------------------------------------------------------------------------------- /jenkins-slaves/scala/test/hw.scala: -------------------------------------------------------------------------------- 1 | object Hi { 2 | def main(args: Array[String]) = println("Hi!") 3 | } -------------------------------------------------------------------------------- /ocp-templates/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM cd/jenkins-slave-base 2 | 3 | MAINTAINER "Andreas Bellmann" 4 | 5 | RUN oc version 6 | 7 | WORKDIR /data 8 | COPY scripts /data/ 9 | 10 | ENTRYPOINT [""] 11 | -------------------------------------------------------------------------------- /ocp-templates/Dockerfile-with-config: -------------------------------------------------------------------------------- 1 | FROM cd/jenkins-slave-base 2 | 3 | MAINTAINER "Andreas Bellmann" 4 | 5 | RUN oc version 6 | 7 | WORKDIR /data/ods-project-quickstarters/ocp-templates/scripts 8 | COPY ods-project-quickstarters/ocp-templates/scripts /data/ods-project-quickstarters/ocp-templates/scripts 9 | COPY ods-project-quickstarters/ocp-templates/ocp-config /data/ods-project-quickstarters/ocp-templates/ocp-config 10 | COPY ods-configuration /data/ods-configuration 11 | 12 | ENTRYPOINT [""] 13 | -------------------------------------------------------------------------------- /ocp-templates/README.md: -------------------------------------------------------------------------------- 1 | # OCP Templates & Openshift (Project / Component) creation shell scripts 2 | 3 | ## Introduction 4 | This folder contains [shell scripts](scripts) and [OCP templates](templates) needed to provision the various OCP components, such as projects, BuildConfigs, Routes and DeploymentConfigs. 5 | 6 | Except import/export scripts, all others are triggered from the various [rundeck jobs](rundeck-jobs), as rundeck is just an `executor` 7 | -------------------------------------------------------------------------------- /ocp-templates/ocp-config/cd-docgen/Tailorfile: -------------------------------------------------------------------------------- 1 | param-file ../../../../ods-configuration/ods-project-quickstarters/ocp-templates/templates/templates.env 2 | 3 | ignore-unknown-parameters true 4 | ignore-path bc:/spec/output/to/name,bc:/spec/output/imageLabels 5 | 6 | svc,dc,bc 7 | -------------------------------------------------------------------------------- /ocp-templates/ocp-config/cd-jenkins-master/Tailorfile: -------------------------------------------------------------------------------- 1 | param-file ../../../../ods-configuration/ods-project-quickstarters/ocp-templates/templates/templates.env 2 | 3 | ignore-unknown-parameters true 4 | 5 | svc,route,secret,pvc,dc,rolebinding,serviceaccount 6 | 7 | -------------------------------------------------------------------------------- /ocp-templates/ocp-config/cd-user/Tailorfile: -------------------------------------------------------------------------------- 1 | param-file ../../../../ods-configuration/ods-project-quickstarters/ocp-templates/templates/templates.env 2 | 3 | ignore-unknown-parameters true 4 | 5 | secret 6 | -------------------------------------------------------------------------------- /ocp-templates/ocp-config/cd-user/secret.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | labels: 4 | template: secrets-template 5 | objects: 6 | - apiVersion: v1 7 | kind: Secret 8 | metadata: 9 | name: cd-user-token 10 | type: kubernetes.io/basic-auth 11 | data: 12 | password: ${CD_USER_PWD} 13 | parameters: 14 | - name: CD_USER_PWD 15 | description: cd_user password (base64 encoded) 16 | required: true 17 | -------------------------------------------------------------------------------- /ocp-templates/ocp-config/component-environment/Tailorfile: -------------------------------------------------------------------------------- 1 | svc,dc,is,bc 2 | 3 | ignore-path bc:/spec/output/to/name,bc:/spec/output/imageLabels 4 | -------------------------------------------------------------------------------- /ocp-templates/ocp-config/component-route/Tailorfile: -------------------------------------------------------------------------------- 1 | param-file ../../../../ods-configuration/ods-project-quickstarters/ocp-templates/templates/templates.env 2 | route -------------------------------------------------------------------------------- /ocp-templates/ocp-config/component-route/route.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | labels: 4 | template: component-route-template 5 | app: '${PROJECT}-${COMPONENT}' 6 | metadata: 7 | name: component-route 8 | objects: 9 | - apiVersion: v1 10 | kind: Route 11 | metadata: 12 | name: ${COMPONENT} 13 | spec: 14 | host: ${COMPONENT}-${PROJECT}-${ENV}.${OD_OCP_SOURCE_APP_DOMAIN} 15 | tls: 16 | insecureEdgeTerminationPolicy: Redirect 17 | termination: edge 18 | to: 19 | kind: Service 20 | name: ${COMPONENT} 21 | weight: 100 22 | wildcardPolicy: None 23 | parameters: 24 | - description: The name of the application project. 25 | displayName: Project 26 | name: PROJECT 27 | required: true 28 | - description: The environment stage. 29 | displayName: Environment 30 | name: ENV 31 | required: true 32 | - description: The name of the component 33 | displayName: Component 34 | name: COMPONENT 35 | required: true 36 | - description: The application domain 37 | displayName: app domain 38 | name: OD_OCP_SOURCE_APP_DOMAIN 39 | required: true 40 | -------------------------------------------------------------------------------- /ocp-templates/ocp-config/rshiny-app/Tailorfile: -------------------------------------------------------------------------------- 1 | param-file ../../../../ods-configuration/ods-project-quickstarters/ocp-templates/templates/templates.env 2 | 3 | ignore-unknown-parameters true 4 | 5 | serviceaccount,secret,svc,route,bc,is,dc 6 | -------------------------------------------------------------------------------- /ocp-templates/root.ca/ca-bundle.crt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/ocp-templates/root.ca/ca-bundle.crt -------------------------------------------------------------------------------- /ocp-templates/root.ca/ca-bundle.trust.crt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendevstack/ods-project-quickstarters/7c25cf7023151a3d1968aab91a8c30754afe77c8/ocp-templates/root.ca/ca-bundle.trust.crt -------------------------------------------------------------------------------- /ocp-templates/scripts/delete-projects.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # This script creates the 3 OCP projects we currently require for every 3 | # OD project. 4 | 5 | # Use -gt 1 to consume two arguments per pass in the loop (e.g. each 6 | # argument has a corresponding value to go with it). 7 | # Use -gt 0 to consume one or more arguments per pass in the loop (e.g. 8 | # some arguments don't have a corresponding value to go with it such 9 | # as in the --default example). 10 | # note: if this is set to -gt 0 the /etc/hosts part is not recognized ( may be a bug ) 11 | while [[ $# -gt 1 ]] 12 | do 13 | key="$1" 14 | 15 | case $key in 16 | -p|--project) 17 | PROJECT="$2" 18 | shift # past argument 19 | ;; 20 | *) 21 | echo "Unknown option: $1. Exiting in case you did not intend to invoke this script." 22 | exit 1 23 | ;; 24 | esac 25 | shift # past argument or value 26 | done 27 | 28 | if [ -z ${PROJECT+x} ]; then 29 | echo "PROJECT is unset"; 30 | exit 1; 31 | else echo "PROJECT=${PROJECT}"; fi 32 | 33 | oc delete project ${PROJECT}-cd 34 | oc delete project ${PROJECT}-dev 35 | oc delete project ${PROJECT}-test 36 | 37 | -------------------------------------------------------------------------------- /rundeck-jobs/README.md: -------------------------------------------------------------------------------- 1 | # Rundeck jobs 2 | 3 | ## Introduction 4 | This folder contains all job definitions used by Rundeck. They are mainly used for provisioniong components and projects, and triggered by the [provision application](https://github.com/opendevstack/ods-provisioning-app) 5 | 6 | ## Setup / installation of jobs into rundeck 7 | 8 | 1. clone this repo and create a branch called rundeck-changes from master - push into your bitbucket 9 | 1. in Rundeck create a new project called `quickstarts` 10 | 1. add / change the below parameters in the project's settings
11 | ``` 12 | project.globals.bitbucket_host= 13 | project.globals.bitbucket_sshhost=
14 | project.globals.nexus_host= 15 | project.globals.openshift_apihost= 16 | project.globals.rundeck_os_user= 17 | project.globals.openshift_dockerregistry= 18 | project.globals.openshift_user= 19 | ``` 20 | 1. configure the scm import plugin against this repository - against branch `rundeck-changes` with pattern `*.yaml` 21 | 1. disable scm import, and configure scm export - ensure the file path does NOT contain rundeck directory
22 | `File Path Template`: `${job.group}${job.name}.${config.format}` 23 | 24 | More details on the overall installation process can be found in the [install guide](http://www.opendevstack.org/doc/getting-started.html) 25 | -------------------------------------------------------------------------------- /rundeck-jobs/common/cleanup-tmp.yaml: -------------------------------------------------------------------------------- 1 | - defaultTab: summary 2 | description: remove all tmp directories & docker containers running older than specified days 3 | executionEnabled: true 4 | group: common 5 | id: 5cc8e676-b38d-4f2c-82b4-59ea2d7c0261 6 | loglevel: INFO 7 | name: cleanup-tmp 8 | nodeFilterEditable: false 9 | options: 10 | - description: number of days to retain (+1 for last day etc, -1 for everyting) 11 | name: days_to_retain 12 | required: true 13 | value: '+7' 14 | schedule: 15 | month: '*' 16 | time: 17 | hour: '07' 18 | minute: '00' 19 | seconds: '0' 20 | weekday: 21 | day: '*' 22 | year: '*' 23 | scheduleEnabled: true 24 | sequence: 25 | commands: 26 | - description: find and delete directorys /tmp/rundeck_* older than ${option.days_to_retain} 27 | script: |- 28 | #!/bin/bash 29 | 30 | found_dirs=$(sudo find /tmp -name "rundeck_*" -mtime @option.days_to_retain@ -type d) 31 | echo "Directories to delete:" 32 | echo $found_dirs 33 | echo $found_dirs | xargs sudo rm -rf 34 | 35 | echo "Pruning unused Docker data" 36 | sudo docker system prune --force 37 | 38 | echo "Pruning running docker containers" 39 | docker ps | grep 'day[s]* ago' | awk '{print $1}' | xargs docker rm -f 40 | keepgoing: false 41 | strategy: node-first 42 | uuid: 5cc8e676-b38d-4f2c-82b4-59ea2d7c0261 43 | 44 | --------------------------------------------------------------------------------