Project

General

Profile

Actions

Task #3020

closed

Build IdM in new Jenkins

Added by Tomáš Doischer over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
High
Assignee:
Luděk Urban
Category:
Infrastructure
Target version:
Start date:
12/10/2021
Due date:
% Done:

0%

Estimated time:
Owner:
Actions #1

Updated by Tomáš Doischer about 2 years ago

  • Target version changed from 12.1.0 to 12.2.0
Actions #2

Updated by Tomáš Doischer about 2 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Roman Kučera almost 2 years ago

  • Target version changed from 12.2.0 to 13.0.0
Actions #4

Updated by Tomáš Doischer almost 2 years ago

  • Assignee changed from Tomáš Doischer to Luděk Urban

We assume the release process itself takes place in GitHub (merge to master, etc.).

The minimal requirements are:

  • build a war from a GitHub branch and upload it to the Nexus
  • builds will be from branches
    • master
    • develop (nightly build)

Nice to have:

  • build from master automatically after a merge to master
  • build from any branch in a job allowing to define the branch manually - this is currently done via GitHub Actions and is not necessary

Other stages (build a Docker image, an RPM package...) will follow in separate tickets and are not a goal of this ticket.

Actions #5

Updated by Tomáš Doischer almost 2 years ago

I forgot one thing: hotfixes. A hotfix is built from a custom branch and the war needs to be uploaded to the Nexus as well. So a job where you can specify the branch is needed here.

Actions #6

Updated by Tomáš Doischer over 1 year ago

  • Sprint set to Sprint 12.3-1 (srp 03 - srp 17)
Actions #7

Updated by Tomáš Doischer over 1 year ago

  • Sprint deleted (Sprint 12.3-1 (srp 03 - srp 17))
Actions #8

Updated by Luděk Urban over 1 year ago

I created jenkins job "czechidm-product-develop-build" which successfully build develop branch of IdM project.
Then war and product modules jars upload to nexus.
I discover that during artifact upload with name ends "SNAPSHOT" nexus will rename version to end with timestamp.
This is feature of nexus. Artifacts are still accessible through version-SNAPSHOT name.
Because develop build will be built daily, it's necessary to have clean jo o nexus develop repository.

I tested built war on my local virtual and it work normally.

Built modules

parent
core
app
example
ic
acc
vs
rpt
tool

It's remains to copy develop job and change it to build master a hotfix branch.

Actions #9

Updated by Luděk Urban over 1 year ago

I created and modified product build job to deploy to maven-release and maven-snapshot repositories.

czechidm-product-master-build
czechidm-product-hotfix-build
czechidm-product-develop-build

During the testing phase when I was changing of branches from master to develop in POM_VERSION variable appears version 12.2.2 and not 12.2.3.-SNAPSHOT.
I change the script to look pom specificaly.
Examle from master:

#POM verion check

AGGREGATOR_POM_VERSION="$(grep -A1 idm-aggregator Realization/backend/aggregator/pom.xml |tail -n1 |cut -d ">" -f2 |cut -d "<" -f1)" 

if [[ "X${AGGREGATOR_POM_VERSION}" == X*-SNAPSHOT ]]
then
    echo "POM version check failed. Production build does not allow to build *-SNAPSHOT version." 
    exit 1
else
    echo "POM version check OK." 
fi

On nexus repository "maven-snapshot" I set cleaning of snapshot builds which are older that 7 days.
I handover these jobs to the product team so they can now use them to release product.
When testing during operation don't find any problems I stop builds of snapshot on old jenkins.

Actions #10

Updated by Luděk Urban over 1 year ago

I fix problem with jenkins job "czechidm-product-develop-build" where was additional "/" in branch select for build and build failed.
Now it's fixed and job is completed successfully.

Actions #12

Updated by Luděk Urban over 1 year ago

  • Status changed from In Progress to Resolved

Jenkins jobs for product build works correctly.
I am closing the ticket.

Actions #13

Updated by Tomáš Doischer about 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF