Skip to content

devon4j pl

travis edited this page Dec 11, 2019 · 3 revisions
400
400

devon4j Template for Production Line

Overview

This template will configure your PL instance to have a 'ready to use' devon4j template. It can be used as a starting point for your Java projects.
This includes CICD files for a devonfw technology stack with configuration for:

  • docker deployment

  • pushing artifacts to nexus3

Prerequisites

To be able to run Jenkins devon4j job under ProductionLine you need to configure below settings in Jenkins and Gitlab

  • Jenkins

    • Add Jenkins Shared Library using documentation https://github.com/devonfw/production-line-shared-lib

    • Install required plugins:
      HTTP Request Plugin
      Allure Jenkins Plugin
      NodeJS Plugin
      Jobs DSL Plugin

    • In Jenkins Global Tool Configuration configure Allure Commandline and Maven like

500
500
  • Gitlab

    • Generate User Private Token
      Go to your Profile in Gitlab

500

Next click on the pen icon

500

On the left menu choose Access Tokens and put token name and check fields like below

600

Click "Create personal access token", you should receive notification about created token and token string. Copy the token string.

800

The GitLab API user needs to have API access and the rights to create a new group. To set this permission follow the next steps:

  • Enter the Admin control panel

  • Select 'Users'

  • Select the user(s) in question and click 'Edit'

  • Scroll down to 'Access' and enable 'Can Create Group'

How to insert the Template

  • Create new Jenkins Pipeline Job

  • In job configuration check "This project is parametrized", choose "String parameter and provide
    Name: GITLAB_USER_PRIVATE_TOKEN
    Default Value: <GITLAB_TOKEN_STRING_YOU_JUST_CREATED>

Name: USERNAME
Default Value: <YOUR_LAM_CORP_ID>

800
  • Save job configuration

How to run the Template

  • Build the job

  • As output of the build new Jenkins Pipline job "devon4j_build_template" under Java directory will be created and also new repository "devonfw/devon4j" will be created in Gitlab.

  • Run "devon4j_build_template" job