-
Notifications
You must be signed in to change notification settings - Fork 0
Build Pipeline
Vadim edited this page May 22, 2024
·
6 revisions
We are using GitHub Actions to build and deploy our projects. The actions are made up of one parent action, the Palladio-Build-ActionsPipeline, which defines pipeline steps for the build.
For deployment, there exists an additional action, the Palladio-Build-ActionsPipeline-Deployment.
The ActionsPipeline calls the ActionsPipeline-Deployment action to deploy the created artifacts to our updatesite.
- Set up job: Sets some GitHub specific information
- Build PalladioSimulator/Palladio-Build-ActionsPipeline-Deployment@...: Builds the action used for deployment. This is done using docker
- Checkout Repository: Does what the name suggests
- Set up JDK: Installs the specified version of java
- Verify with Maven: Calls mvn clean verify
- Check Deployment: Checks if the build was triggered by a push on the main branch (or nightly build). If not the following jobs are skipped.
- Create folder name: Creates the folder name from the repository naming
- Create project deployment path: Builds the first part of the path for deployment (path on server and repository name)
- Create Deployment path: Builds the full path, where the build artifacts are going to be deployed (adds either nightly, release or branch folder structure)
- Deploy to Updatesite: Calls Palladio-Build-ActionsPipeline-Deployment. This uses SCP and SFTP to deploy the files to the server.
- Post and Cleanup Stages
⚠️ Deprecated: Use GitHub actions instead
- We are using Jenkins build pipeline support to automatically configure the build server
- Jenkins management: use Multibranch Pipeline
- Jenkins file (= script) must be added to each project root to automatically create build job on build server (presence of new files will be checked periodically)
- Modulare Pipeline library (MPL)
- shared library, to describe pipeline as skeleton for each stage and provide hooks to plugin your own modules (documentation ref. MPL
- we use this library to write our own pipeline skeleton
- Global dependencies of a build job are defined by a Jenkins template
Our Jenkins pipeline includes the following stages:
- Prepare
- Checkout: src checkout
- Build: usually runs mvn clean verify
- Archive: copies Java doc
- Quality Metrics: evaluates code coverage + checkstyle results
- Deploy: opens ssh connection and deploys artefacts to webserver
- Declarative: Post Actions
Check out the documentation.
The project is a fork of the MPL repository.
- specialization of MDSDTools pipeline
- folder \vars contains all Groovy scripts that will be directly called by stages of pipeline
- script PalladioPipeline: entry point
- contains all Groovy scripts that are called from Palladio-Build-JenkinsPipeline.PalladioPipeline script
- AbstractMDSDToolsPipeline:
- defines the available stages of our pipeline
- called from MDSD tools pipeline
- AbstractMDSDToolsDSLPipeline
- MDSDToolsDSL
- methodMissing contains all logic
- automatically called by Groovy if you call a non-existing method on an object
- splits the incoming method names into tokens (argument: name, args: params of method)
- builds a string:value map (e.g. cfg.mavenSettingsId: 'xyc')
The Palladio Component Model (PCM) is licensed under the Eclipse Public License (EPL), Version 1.0.