JP2024075116A - Pipeline setting update device, pipeline setting update method, and program - Google Patents
Pipeline setting update device, pipeline setting update method, and program Download PDFInfo
- Publication number
- JP2024075116A JP2024075116A JP2022186322A JP2022186322A JP2024075116A JP 2024075116 A JP2024075116 A JP 2024075116A JP 2022186322 A JP2022186322 A JP 2022186322A JP 2022186322 A JP2022186322 A JP 2022186322A JP 2024075116 A JP2024075116 A JP 2024075116A
- Authority
- JP
- Japan
- Prior art keywords
- module
- pipeline
- program modules
- program
- execution order
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
本開示は、パイプライン設定更新装置、パイプライン設定更新方法、及びプログラムに関する。 The present disclosure relates to a pipeline setting update device, a pipeline setting update method, and a program.
プログラムの開発手法の1つとして、継続的インテグレーション(CI:Continuous Integration)と呼ばれる手法が知られている。CIを実現するプログラムはCIツール等と呼ばれ、近年、プログラム開発の現場で広く用いられている。なお、CIに関する従来技術の1つとして、例えば、不具合に係る内容等が管理されるチケットの属性情報に応じて、CIにおける自動実行を効率的に実施する技術が知られている(特許文献1)。 One method for developing programs is known as Continuous Integration (CI). Programs that realize CI are called CI tools, and in recent years have come to be widely used in program development. One prior art technique for CI is a technique that efficiently executes automatic execution in CI according to attribute information of tickets that manage details related to defects, etc. (Patent Document 1).
CIツールではビルドやテスト等を自動実行することができるが、ビルド対象となるプログラムの依存関係が変更された場合、その都度、ビルドの実行順等が定義されるパイプライン設定を手動で更新する必要がある。 CI tools can automatically execute builds and tests, but if the dependencies of the programs to be built change, the pipeline settings, which define the build execution order, must be manually updated each time.
本開示は、上記の点に鑑みてなされたもので、ビルド対象のプログラムの依存関係に応じて、パイプライン設定を更新する技術を提供する。 The present disclosure has been made in consideration of the above points, and provides a technology for updating pipeline settings according to the dependencies of the programs to be built.
本開示の一態様によるパイプライン設定更新装置は、継続的インテグレーションにおけるパイプライン処理の設定情報を更新するパイプライン設定更新装置であって、開発対象プログラムを構成する1以上のプログラムモジュールのソースコードがバージョン管理システムに登録されると、前記1以上のプログラムモジュールに含まれる各プログラムモジュール間の依存関係を表す依存関係情報を作成するように構成されている依存関係情報作成部と、前記依存関係情報に基づいて、前記1以上のプログラムモジュールを前記パイプライン処理により順にビルドする場合の実行順を決定するように構成されている実行順決定部と、前記実行順に基づいて、前記設定情報を更新するように構成されている設定更新部と、を有する。 A pipeline setting update device according to one aspect of the present disclosure is a pipeline setting update device that updates setting information for pipeline processing in continuous integration, and includes a dependency information creation unit configured to create dependency information representing dependencies between each of the program modules included in one or more program modules when source code for the one or more program modules constituting a program to be developed is registered in a version control system, an execution order determination unit configured to determine an execution order when the one or more program modules are built in sequence by the pipeline processing based on the dependency information, and a setting update unit configured to update the setting information based on the execution order.
ビルド対象のプログラムの依存関係に応じて、パイプライン設定を更新する技術が提供される。 Technology is provided to update pipeline configurations based on the dependencies of the programs being built.
以下、本発明の一実施形態について説明する。 One embodiment of the present invention is described below.
<継続的インテグレーション/継続的デリバリー>
まず、継続的インテグレーション(CI)とそれに関連又は類似する開発手法である継続的デリバリー(CD:Continuous Delivery)の概略について説明する。
<Continuous integration/continuous delivery>
First, an overview of continuous integration (CI) and continuous delivery (CD), which is a development method related to or similar to CI, will be provided.
CI及びCDはいずれもプログラム開発手法の1つであり、ビルド、テスト、デプロイといった処理(ジョブ)の内容をスクリプトとして定義し、ソースコードを管理するバージョン管理システム(VCS:Version Control System)への登録(コミット)等をトリガーにスクリプトを自動で実行する手法のことである。1つ以上のジョブの実行で実現される一連の処理は「パイプライン」又は「パイプライン処理」と呼ばれる。一般に、CIはビルドやテストを自動化する手法のことを指し、CDはデプロイを自動化する手法のことを指す。 CI and CD are both program development methods in which the contents of processes (jobs) such as build, test, and deploy are defined as scripts, and the scripts are automatically executed when triggered by registration (commit) to a version control system (VCS) that manages the source code. A series of processes achieved by executing one or more jobs is called a "pipeline" or "pipeline processing." In general, CI refers to a method for automating builds and tests, and CD refers to a method for automating deployment.
CI/CDを実現するプログラムはそれぞれCIツール/CDツールと呼ばれる。これらのツールでは、パイプライン設定ファイルに定義された処理内容(スクリプト)やその処理の実行順等に従ってジョブが実行される。このため、ユーザは、自動化したいジョブの処理内容やその処理の実行順等をパイプライン設定ファイルに定義する必要がある。 The programs that realize CI/CD are called CI tools/CD tools, respectively. These tools execute jobs according to the processing content (scripts) and execution order of those processing defined in the pipeline configuration file. For this reason, users need to define the processing content of the jobs they want to automate and the execution order of those processing in the pipeline configuration file.
以下では、複数のプログラムで構成されるアプリケーションを開発することを想定し、CIツールにより各プログラムのビルドを自動実行する場合を対象とする。このため、以下では、開発対象のアプリケーションを構成する各プログラム(ライブラリ等も含む。)のことを「モジュール」とも呼ぶことにする。 In what follows, we will assume that you are developing an application that is made up of multiple programs, and that you will automatically build each program using a CI tool. For this reason, in what follows, each program (including libraries, etc.) that makes up the application you are developing will also be referred to as a "module."
<モジュールの依存関係とビルドの実行順との関係>
複数のモジュールでアプリケーションが構成されている場合、これら複数のモジュールの中には依存関係を持つモジュールが存在することが多い。例えば、或るモジュールが別のモジュールの処理結果等を参照しており、モジュール間に親子関係がある場合等である。このような場合、参照元である親モジュールは参照先である子モジュールに依存していることになり、親モジュールのビルドよりも子モジュールのビルドを先に実行する必要がある。
<Relationship between module dependencies and build execution order>
When an application is composed of multiple modules, there are often modules that have dependencies among them. For example, a certain module may refer to the processing results of another module, creating a parent-child relationship between the modules. In such a case, the parent module that refers to the module depends on the child module that refers to the module, and the child module must be built before the parent module is built.
例えば、図1に示すように、モジュールA、モジュールB、及びモジュールCが存在し、モジュールAはモジュールBに依存し、モジュールBはモジュールCに依存しているものとする。この場合、モジュールC→モジュールB→モジュールAの順にビルドを実行する必要する。 For example, as shown in Figure 1, assume that there are modules A, B, and C, and that module A depends on module B, and module B depends on module C. In this case, it is necessary to execute the build in the order of module C → module B → module A.
このとき、例えば、モジュールBが依存するモジュールとしてモジュールDが追加された場合、モジュールC→モジュールD→モジュールB→モジュールA、又は、モジュールD→モジュールC→モジュールB→モジュールAの順にビルドを実行する必要がある。このため、ユーザは、モジュールDの追加に伴って、CIツールのパイプライン設定ファイルに対してモジュールDをビルドするためのビルド実行内容の定義を追加すると共に、当該パイプライン設定ファイルに定義されているビルド実行順を変更する必要がある。 At this time, for example, if module D is added as a module on which module B depends, the builds must be executed in the order of module C → module D → module B → module A, or module D → module C → module B → module A. For this reason, when module D is added, the user must add a definition of the build execution content for building module D to the pipeline setting file of the CI tool, and change the build execution order defined in the pipeline setting file.
以上のように、開発対象のアプリケーションを構成するモジュールの追加・変更・削除に伴ってそれらのモジュールの依存関係が変更された場合、ユーザはパイプライン設定ファイルを手動で更新する必要があり、その更新作業に手間を要している。そこで、以下では、CIツールによりプログラムのビルドを自動実行する際に、ビルド対象のモジュールの依存関係に応じて、パイプライン設定ファイルを自動的に更新することができる開発支援システム1について説明する。
As described above, when the dependencies of modules that make up the application being developed change as a result of adding, modifying, or deleting those modules, the user must manually update the pipeline setting file, which is a time-consuming process. Therefore, below we will explain a
<開発支援システム1の全体構成例>
本実施形態に係る開発支援システム1の全体構成例を図2に示す。図2に示すように、本実施形態に係る開発支援システム1には、パイプライン設定更新システム10と、継続的インテグレーションシステム20と、バージョン管理システム30と、開発者端末40とが含まれる。ここで、パイプライン設定更新システム10と継続的インテグレーションシステム20との間、バージョン管理システム30と開発者端末40との間、継続的インテグレーションシステム20とバージョン管理システム30との間は、例えば、社内ネットワーク等といった通信ネットワークを介して相互に通信可能に接続される。
<Example of overall configuration of
An example of the overall configuration of the
パイプライン設定更新システム10は、モジュールのソースコード(又は、ソースコードを含む必要なファイル群を管理するプロジェクトでもよい。)がバージョン管理システム30に登録された場合、開発対象のアプリケーションを構成する各モジュールの依存関係からビルド実行順を決定した上で、このビルド実行順等により、後述するCIツール210のパイプライン設定ファイル212を更新する。また、パイプライン設定更新システム10は、パイプライン設定ファイル212を更新した後、開発対象のアプリケーションを構成する各モジュールのビルドを順に実行するためのパイプライン実行指示を継続的インテグレーションシステム20に送信する。
When the source code of a module (or a project that manages a group of necessary files including the source code) is registered in the
ここで、パイプライン設定更新システム10は、パイプライン設定更新アプリケーション110と、依存関係テーブル120とを有している。パイプライン設定更新アプリケーション110は、ビルド実行順の決定、パイプライン設定ファイル212の更新、パイプライン実行指示等を行うプログラムである。依存関係テーブル120は、開発対象のアプリケーションを構成する各モジュールの依存関係を表す情報が格納されるテーブル形式のデータである。なお、パイプライン設定更新アプリケーション110と依存関係テーブル120の詳細については後述する。
Here, the pipeline
継続的インテグレーションシステム20は、パイプライン設定更新システム10からパイプライン実行指示を受信した場合、CIツール210により、開発対象のアプリケーションを構成する各モジュールのビルドをビルドツール220に対して順に指示する。ここで、CIツール210にはビルド実行指示部211とパイプライン設定ファイル212とが含まれており、ビルド実行指示部211は、パイプライン設定ファイル212に定義されているビルド実行内容とビルド実行順に従って、ビルドツール220に対して各モジュールのビルドを順に指示する。これにより、ビルドツール220によって当該ビルド実行順に各モジュール(のソースコード)のビルドが実行され、パイプライン処理が実現される。
When the
なお、CIツール210としては既知の任意のCIツールを用いることが可能であり、例えば、GitLab、Jenkins、Travis CI等を用いることが可能である。また、ビルドツール220としては既知の任意のビルドツールを用いることが可能であり、例えば、Maven、Ant、Gradle等を用いることが可能である。
The
バージョン管理システム30は、モジュールのソースコード及びそのバージョンを管理するリポジトリを備えている。バージョン管理システム30は、モジュールのソースコード(又は、そのプロジェクト)がリポジトリに登録された場合、登録通知をパイプライン設定更新システム10に送信する。なお、バージョン管理システム30としては既知の任意のバージョン管理システムを用いることが可能であり、例えば、Git、GitHub等を用いることが可能である。
The
開発者端末40は、モジュールのソースコード(又は、そのプロジェクト)をバージョン管理システム30のリポジトリに登録する者(例えば、モジュールの開発者等)が利用する端末である。
The
なお、図2に示す開発支援システム1の全体構成は一例であって、開発支援システム1の全体構成はこれに限られるものではない。例えば、パイプライン設定更新システム10、継続的インテグレーションシステム20及びバージョン管理システム30のうちの2つ以上のシステムが一体で構成されていてもよい。
Note that the overall configuration of the
<パイプライン設定更新システム10のハードウェア構成例>
本実施形態に係るパイプライン設定更新システム10のハードウェア構成例を図3に示す。図3に示すように、本実施形態に係るパイプライン設定更新システム10は、入力装置11と、表示装置12と、外部I/F13と、通信I/F14と、RAM(Random Access Memory)15と、ROM(Read Only Memory)16と、補助記憶装置17と、プロセッサ18とを有する。これらの各ハードウェアは、それぞれがバス19を介して通信可能に接続される。
<Example of Hardware Configuration of Pipeline
An example of a hardware configuration of the pipeline
入力装置11は、例えば、キーボード、マウス、タッチパネル、物理ボタン等である。表示装置12は、例えば、ディスプレイ、表示パネル等である。なお、パイプライン設定更新システム10は、例えば、入力装置11及び表示装置12のうちの少なくとも一方を有していなくてもよい。
The
外部I/F13は、記録媒体13a等の外部装置とのインタフェースである。記録媒体13aとしては、例えば、CD(Compact Disc)、DVD(Digital Versatile Disk)、SDメモリカード(Secure Digital memory card)、USB(Universal Serial Bus)メモリカード等が挙げられる。
The external I/
通信I/F14は、パイプライン設定更新システム10を通信ネットワークに接続するためのインタフェースである。RAM15は、プログラムやデータを一時保持する揮発性の半導体メモリ(記憶装置)である。ROM16は、電源を切ってもプログラムやデータを保持することができる不揮発性の半導体メモリ(記憶装置)である。補助記憶装置17は、例えば、HDD(Hard Disk Drive)やSSD(Solid State Drive)等の不揮発性の記憶装置である。プロセッサ18は、例えば、CPU(Central Processing Unit)等の各種演算装置である。
The communication I/
なお、図3に示すハードウェア構成は一例であって、パイプライン設定更新システム10のハードウェア構成はこれに限られるものではない。例えば、パイプライン設定更新システム10は、複数の補助記憶装置17や複数のプロセッサ18を有していてもよいし、図示したハードウェアの一部を有していなくてもよいし、図示したハードウェア以外の種々のハードウェアを有していてもよい。
Note that the hardware configuration shown in FIG. 3 is an example, and the hardware configuration of the pipeline
<パイプライン設定更新アプリケーション110の機能構成例>
図4に示すように、本実施形態に係るパイプライン設定更新アプリケーション110は、プロセッサ18等に実行させる処理により、登録通知受信部111と、モジュール構成情報取得部112と、依存関係テーブル作成・更新部113と、ビルド実行順決定部114と、パイプライン設定ファイル更新部115と、パイプライン実行指示部116とを実現することができる。
<Example of Functional Configuration of Pipeline
As shown in FIG. 4, the pipeline
登録通知受信部111は、バージョン管理システム30からの登録通知を受信する。
The registration
モジュール構成情報取得部112は、登録通知受信部111によって登録通知が受信されると、開発対象のアプリケーションを構成する各モジュールに関して、当該モジュールのソースコード又はプロジェクトからモジュール構成情報を取得する。モジュール構成情報とは、当該モジュールが依存するモジュール(以下、依存モジュールともいう。)を表す情報のことである。
When the registration
ただし、開発対象のアプリケーションを構成する各モジュールに関して、バージョン管理システム30には複数バージョンのソースコード又はプロジェクトが登録され得る。このため、モジュール構成情報取得部112は、開発対象のアプリケーションを構成する各モジュールに関して、当該モジュールの最新バージョンのソースコード又はプロジェクトからモジュール構成情報を取得する。
However, for each module that constitutes the application to be developed, multiple versions of source code or projects may be registered in the
依存関係テーブル作成・更新部113は、モジュール構成情報取得部112によってモジュール構成情報が取得されると、それらのモジュール構成情報を用いて新たな依存関係テーブル120を作成し、既存の依存関係テーブル120を上書き更新する。ただし、既存の依存関係テーブル120が存在しない場合、依存関係テーブル作成・更新部113は、新たな依存関係テーブル120をそのまま補助記憶装置17等の記憶領域に保存すればよい。
When the module configuration information is acquired by the module configuration
ビルド実行順決定部114は、依存関係テーブル作成・更新部113によって作成・更新された依存関係テーブル120を用いて、開発対象のアプリケーションを構成する各モジュールのビルド実行順を決定する。
The build execution
パイプライン設定ファイル更新部115は、ビルド実行順決定部114によってビルド実行順が決定されると、開発対象のアプリケーションを構成する各モジュールのビルド実行内容の定義に必要な情報と当該ビルド実行順とを用いて、パイプライン設定ファイル212を更新する。ここで、各モジュールのビルド実行内容の定義に必要な情報とは、ビルド実行内容としてパイプライン設定ファイル212に定義されるパラメータとその値のことである。
When the build execution order is determined by the build execution
パイプライン実行指示部116は、パイプライン設定ファイル更新部115によってパイプライン設定ファイル212が更新されると、パイプライン実行指示を継続的インテグレーションシステム20に送信する。
When the
<依存関係テーブル120>
一例として、モジュールA、モジュールB、モジュールC、モジュールDが存在し、これらのモジュール名をそれぞれ「moduleA」、「moduleB」、「moduleC」、「moduleD」とする。このとき、モジュールAがモジュールBに依存し、モジュールBがモジュールC及びDに依存している場合の依存関係テーブル120を図5に示す。図5に示すように、依存関係テーブル120では、開発対象のアプリケーションを構成する各モジュールのモジュール名を表す「モジュール名」と、そのモジュール名のモジュールが依存しているモジュール(依存モジュール)のモジュール名を表す「依存モジュール名」とが対応付けられている。
<Dependency Table 120>
As an example, assume that there are modules A, B, C, and D, and these modules are named "module A", "module B", "module C", and "module D", respectively. In this case, Fig. 5 shows a dependency relationship table 120 in the case where module A depends on module B, and module B depends on modules C and D. As shown in Fig. 5, in the dependency relationship table 120, a "module name" indicating the module name of each module constituting the application to be developed is associated with a "dependent module name" indicating the module name of a module on which the module with that module name depends (dependent module).
例えば、モジュール名「moduleA」には依存モジュール名「moduleB」が対応付けられている。これは、モジュールAはモジュールBに依存していることを表している。 For example, the module name "moduleA" is associated with the dependent module name "moduleB". This indicates that module A depends on module B.
また、例えば、モジュール名「moduleB」には依存モジュール名「moduleC」及び「moduleD」が対応付けられている。これは、モジュールBはモジュールCとモジュールDに依存していることを表している。 For example, the module name "module B" is associated with the dependent module names "module C" and "module D." This indicates that module B depends on module C and module D.
このように、依存関係テーブル120には、開発対象のアプリケーションを構成する各モジュールの依存関係を表す情報が格納されている。 In this way, the dependency table 120 stores information that represents the dependencies of each module that constitutes the application being developed.
<パイプライン設定更新アプリケーション110によって実行される処理>
一例として、以下の条件の下でパイプライン設定更新アプリケーション110によって実行される処理について、図6を参照しながら説明する。
<Processing Executed by Pipeline
As an example, the process performed by the pipeline
・開発対象のアプリケーションのプログラミング言語はJavaであるものとする。 -The programming language of the application to be developed is assumed to be Java.
・ビルドツール220はMavenであるものとする。
-The
・CIツール210はGitLabであるものとする。
-The
・開発者はモジュール毎にMavenプロジェクトを作成し、それらのMavenプロジェクトがバージョン管理システム30に登録されるものとする。
- Developers create Maven projects for each module, and these Maven projects are registered in the
・図1に示すように、モジュールA、モジュールB、モジュールCが存在し、モジュールAがモジュールBに依存し、モジュールBがモジュールCに依存している場合に、モジュールBの依存モジュールとしてモジュールDが追加されるものとする。 -As shown in Figure 1, when there are modules A, B, and C, and module A depends on module B, and module B depends on module C, module D is added as a dependent module of module B.
ただし、上記の条件はいずれも一例であって、以下で説明する処理は上記の条件に限定されるものではない。例えば、プログラミング言語はJavaに限られるものではなく、ビルドが存在するプログラミング言語であれば任意のプログラミング言語を対象とすることが可能である。また、ビルドツール220はMavenに限られるものではなく、またCIツール210はGitLabに限られるものではない。
However, the above conditions are only examples, and the process described below is not limited to the above conditions. For example, the programming language is not limited to Java, and any programming language for which a build exists can be targeted. In addition, the
このとき、或る開発者の開発者端末40によってモジュールDのソースコードが含まれるMavenプロジェクトがバージョン管理システム30に登録され、その登録通知がパイプライン設定更新システム10に送信されたものとする。
At this time, it is assumed that a Maven project including the source code of module D is registered in the
まず、登録通知受信部111は、バージョン管理システム30からの登録通知を受信する(ステップS101)。
First, the registration
次に、モジュール構成情報取得部112は、開発対象のアプリケーションを構成する各モジュール(つまり、モジュールA、モジュールB、モジュールC、モジュールD)に関して、当該モジュールのMavenプロジェクトからモジュール構成情報を取得する(ステップS102)。ただし、同一モジュールのMavenプロジェクトが複数存在する場合、モジュール構成情報取得部112は、最新バージョンのMavenプロジェクトからモジュール構成情報を取得する。
Next, the module configuration
ここで、Mavenプロジェクトには、当該モジュールのソースコードの他に、当該モジュールのモジュール構成情報が定義されたpom.xmlと呼ばれるファイルが含まれている。このため、モジュール構成情報取得部112は、当該モジュールのpom.xmlから当該モジュールのモジュール構成情報を取得すればよい。
Here, in addition to the source code of the module, the Maven project contains a file called pom.xml in which the module configuration information of the module is defined. Therefore, the module configuration
モジュールA~モジュールDのpom.xmlの一例を図7(a)~図7(d)にそれぞれ示す。 Examples of pom.xml for modules A to D are shown in Figures 7(a) to 7(d), respectively.
図7(a)に示すように、モジュールAのpom.xmlには、モジュールAの依存モジュール(ライブラリも含む。)が定義される依存情報1100が含まれる。このため、モジュール構成情報取得部112は、モジュールAのpom.xmlに含まれる依存情報1100を解析し、その解析結果として得られた依存モジュールの識別情報(例えば、モジュール名やモジュールID等)をモジュール構成情報として取得すればよい。図7(a)に示す例では、依存情報1100にはアーティファクトIDとして依存モジュールのモジュール名「moduleB」が定義されており、このモジュール名「moduleB」がモジュールAのモジュール構成情報として取得される。
As shown in FIG. 7(a), the pom.xml of module A includes
同様に、図7(b)に示すように、モジュールBのpom.xmlには、モジュールAの依存モジュール(ライブラリも含む。)が定義される依存情報1200が含まれる。このため、モジュール構成情報取得部112は、モジュールBのpom.xmlに含まれる依存情報1200を解析し、その解析結果として得られた依存モジュールの識別情報をモジュール構成情報として取得すればよい。図7(b)に示す例では、依存情報1200にはアーティファクトIDとして依存モジュールのモジュール名「moduleC」及び「moduleD」が定義されており、これらのモジュール名「moduleC」及び「moduleD」がモジュールBのモジュール構成情報として取得される。
Similarly, as shown in FIG. 7(b), the pom.xml of module B includes
一方で、図7(c)及び(d)に示すように、モジュールCのpom.xmlとモジュールDのpom.xmlには依存情報が含まれていない。このため、例えば、「依存関係なし」を表す情報がモジュールCのモジュール構成情報として取得され、同様に「依存関係なし」を表す情報がモジュールDのモジュール構成情報として取得される。ただし、この場合、モジュール構成情報が取得されなくてもよい。 On the other hand, as shown in Figures 7(c) and (d), the pom.xml of module C and the pom.xml of module D do not contain dependency information. For this reason, for example, information indicating "no dependency" is obtained as the module configuration information of module C, and similarly, information indicating "no dependency" is obtained as the module configuration information of module D. However, in this case, the module configuration information does not have to be obtained.
次に、依存関係テーブル作成・更新部113は、上記のステップS102で取得されたモジュール構成情報を用いて新たな依存関係テーブル120を作成し、既存の依存関係テーブル120を上書き更新する(ステップS103)。すなわち、依存関係テーブル作成・更新部113は、モジュールAのモジュール構成情報~モジュールDのモジュール構成情報を用いて、図5に示す依存関係テーブル120を作成し、既存の依存関係テーブル120を上書き更新する。
Next, the dependency table creation/
次に、ビルド実行順決定部114は、上記のステップS103で作成・更新された依存関係テーブル120を用いて、開発対象のアプリケーションを構成する各モジュールのビルド実行順を決定する(ステップS104)。例えば、ビルド実行順決定部114は、互いに依存関係がないモジュールに関しては予め決められた順(例えば、モジュール名やモジュールID順)でビルド順を決定し、依存関係があるモジュールに関しては依存モジュールが先、その依存モジュールに依存するモジュールが後となるようにビルド順を決定する。
Next, the build execution
例えば、図5に示す依存関係テーブル120では、モジュールBのビルド順はモジュールAのビルド順よりも先となる。また、モジュールCのビルド順とモジュールDのビルド順はモジュールBのビルド順よりも先となる。一方で、モジュールCとモジュールDは互いに依存関係がないため、予め決められた順(例えば、モジュール名順)にビルド順が決定され、モジュールCのビルド順はモジュールDのビルド順よりも先となる。したがって、図5に示す依存関係テーブル120では、モジュールC→モジュールD→モジュールB→モジュールAとビルド順が決定される。 For example, in the dependency relationship table 120 shown in FIG. 5, the build order of module B comes before the build order of module A. Furthermore, the build order of modules C and D both come before the build order of module B. On the other hand, since modules C and D have no dependency relationship with each other, the build order is determined in a predetermined order (for example, in the order of module names), and the build order of module C comes before the build order of module D. Therefore, in the dependency relationship table 120 shown in FIG. 5, the build order is determined as follows: module C → module D → module B → module A.
次に、パイプライン設定ファイル更新部115は、開発対象のアプリケーションを構成する各モジュールのビルド実行内容の定義に必要な情報と、上記のステップS104で決定されたビルド順とを用いて、パイプライン設定ファイル212を更新する(ステップS105)。
Next, the pipeline setting
上記のステップS105における更新前のパイプライン設定ファイル212の一例と更新後のパイプライン設定ファイル212の一例とを図8に示す。図8に示すように、パイプライン設定ファイル212には、ビルド実行順定義部310と、ビルド実行内容定義部320とが含まれる。
Figure 8 shows an example of the
更新前のパイプライン設定ファイル212のビルド実行内容定義部320には、モジュールAのビルド実行内容320Aと、モジュールBのビルド実行内容320Bと、モジュールCのビルド実行内容320Cとが定義されている。また、更新前のパイプライン設定ファイル212のビルド実行順定義部310には、ビルド実行内容320Cで定義されたジョブ(ビルド)のステージ名「buildC」と、ビルド実行内容320Bで定義されたジョブ(ビルド)のステージ名「buildB」と、ビルド実行内容320Aで定義されたジョブ(ビルド)のステージ名「buildA」とが上から順に定義されている。これは、モジュールC→モジュールB→モジュールAの順にビルドを実行することを表している。
In the build execution
このとき、パイプライン設定ファイル更新部115は、開発対象のアプリケーションを構成する各モジュールのビルド実行内容の定義に必要な情報を用いてビルド実行内容定義部320を更新すると共に、上記のステップS104で決定されたビルド順を用いてビルド実行順定義部310を更新する。具体的には、パイプライン設定ファイル更新部115は、モジュールDのビルド実行内容の定義に必要な情報を用いてビルド実行内容320Dをビルド実行内容定義部320に追加すると共に、上記のステップS104で決定されたビルド順「モジュールC→モジュールD→モジュールB→モジュールA」を用いてビルド実行内容320Dで定義されたジョブ(ビルド)のステージ名「buildD」を「buildC」の後に追加する。これにより、更新後のパイプライン設定ファイル212が得られ、このパイプライン設定ファイル212によって「モジュールC→モジュールD→モジュールB→モジュールA」の順にビルドを実行することが可能となる。
At this time, the pipeline setting
なお、開発対象のアプリケーションを構成する各モジュールのビルド実行内容の定義に必要な情報に含まれる一部のパラメータとその値は予め決められており、他のパラメータとその値は当該モジュールのMavenプロジェクトから取得可能である。例えば、図8に示す例では、パラメータ「script」の値は予め決められている。一方で、例えば、パラメータ「image」や「artifacts」、「stage」の値はMavenプロジェクトから取得可能である。 Some of the parameters and their values included in the information required to define the build execution content of each module that constitutes the application to be developed are predetermined, while other parameters and their values can be obtained from the Maven project of the module. For example, in the example shown in Figure 8, the value of the parameter "script" is predetermined. On the other hand, the values of the parameters "image", "artifacts", and "stage", for example, can be obtained from the Maven project.
そして、パイプライン実行指示部116は、パイプライン実行指示を継続的インテグレーションシステム20に送信する(ステップS106)。これにより、継続的インテグレーションシステム20では、ビルド実行指示部211により、パイプライン設定ファイル212のビルド実行順定義部310に定義されているビルド実行順に従って、ビルド実行内容定義部320に定義されているビルド実行内容のビルド指示がビルドツール220に対して行われ、当該ビルドツール220によりモジュール(のソースコード)のビルドが行われる。
Then, the pipeline
<まとめ>
以上のように、本実施形態に係る開発支援システム1では、開発対象のアプリケーションを構成するモジュールをビルドする際に、それらのモジュールの依存関係に応じて、CIツール210のパイプライン設定ファイル212を更新し、ビルドの実行順を動的に変更することができる。このため、開発対象のアプリケーションを構成するモジュールの依存関係に変更が生じた場合であっても、ユーザがその都度パイプライン設定ファイル212を手動で更新する必要がなくなり、その手間が削減される。
<Summary>
As described above, in the
なお、上記の実施形態では、開発対象のアプリケーションを構成するモジュールの追加に伴って依存関係が変更された場合について説明したが、これに限られるものではなく、モジュールの変更や削除に伴って依存関係が変更された場合にも同様に適用することが可能である。 In the above embodiment, we have described a case where dependencies change due to the addition of modules that make up the application to be developed, but this is not limited to this, and the same can be applied to a case where dependencies change due to the modification or deletion of modules.
また、上記の実施形態では、既にパイプライン設定ファイル212が存在し、これを更新する場合について説明したが、例えば、パイプライン設定ファイル212が存在せず、これを新規に作成する場合にも同様に適用することが可能である。
In addition, in the above embodiment, a case has been described in which a
更に、上記の実施形態では、ソースコード又はプロジェクトがバージョン管理システム30に登録された場合、その登録通知がパイプライン設定更新システム10に送信されるものとしたが、これに限られるものではなく、例えば、パイプライン設定更新システム10がバージョン管理システム30を定期的にポーリングし、ソースコード又はプロジェクトの新規登録有無を確認してもよい。
Furthermore, in the above embodiment, when source code or a project is registered in the
本発明は、具体的に開示された上記の実施形態に限定されるものではなく、特許請求の範囲の記載から逸脱することなく、種々の変形や変更、既知の技術との組み合わせ等が可能である。 The present invention is not limited to the specifically disclosed embodiments above, and various modifications, changes, and combinations with known technologies are possible without departing from the scope of the claims.
1 開発支援システム
10 パイプライン設定更新システム
11 入力装置
12 表示装置
13 外部I/F
13a 記録媒体
14 通信I/F
15 RAM
16 ROM
17 補助記憶装置
18 プロセッサ
19 バス
20 継続的インテグレーションシステム
30 バージョン管理システム
40 開発者端末
110 パイプライン設定更新アプリケーション
111 登録通知受信部
112 モジュール構成情報取得部
113 依存関係テーブル作成・更新部
114 ビルド実行順決定部
115 パイプライン設定ファイル更新部
116 パイプライン実行指示部
120 依存関係テーブル
210 CIツール
211 ビルド実行指示部
212 パイプライン設定ファイル
220 ビルドツール
REFERENCE SIGNS
13a Recording medium 14 Communication I/F
15 RAM
16 ROM
17
Claims (7)
開発対象プログラムを構成する1以上のプログラムモジュールのソースコードがバージョン管理システムに登録されると、前記1以上のプログラムモジュールに含まれる各プログラムモジュール間の依存関係を表す依存関係情報を作成するように構成されている依存関係情報作成部と、
前記依存関係情報に基づいて、前記1以上のプログラムモジュールを前記パイプライン処理により順にビルドする場合の実行順を決定するように構成されている実行順決定部と、
前記実行順に基づいて、前記設定情報を更新するように構成されている設定更新部と、
を有するパイプライン設定更新装置。 A pipeline setting update device that updates setting information of a pipeline process in continuous integration, comprising:
a dependency information creation unit configured to create dependency information representing dependencies between each of the program modules included in one or more program modules when source code of the one or more program modules constituting a development target program is registered in a version control system;
an execution order determination unit configured to determine an execution order when the one or more program modules are built in sequence by the pipeline processing based on the dependency information;
A setting update unit configured to update the setting information based on the execution order;
A pipeline setting update device having:
前記依存関係情報作成部は、
前記1以上のプログラムモジュールに含まれる各プログラムモジュールの構成情報に基づいて、前記依存関係情報を作成するように構成されている請求項1に記載のパイプライン設定更新装置。 an acquisition unit configured to acquire, when source code of one or more program modules constituting the development target program is registered in a version control system, configuration information representing identification information of other program modules on which the program module depends, for each program module included in the one or more program modules;
The dependency information creation unit
2. The pipeline setting update device according to claim 1, configured to create the dependency information based on configuration information of each program module included in the one or more program modules.
前記1以上のプログラムモジュールに含まれる各プログラムモジュールに関して、前記プログラムモジュールのソースコード毎に作成されたプロジェクトから前記構成情報を取得するように構成されている請求項2に記載のパイプライン設定更新装置。 The acquisition unit is
3. The pipeline setting update device according to claim 2, configured to acquire, for each program module included in the one or more program modules, the configuration information from a project created for each source code of the program module.
前記依存関係情報に基づいて、互いに依存関係がないプログラムモジュールに関しては予め決められた順序で前記実行順を決定し、依存関係があるプログラムモジュールに関しては前記プログラムモジュールよりも前記プログラムモジュールが依存する他のプログラムモジュールの方が先の順序となるように前記実行順を決定するように構成されている請求項2又は3に記載のパイプライン設定更新装置。 The execution order determination unit is
4. The pipeline setting update device according to claim 2 or 3, configured to determine the execution order in a predetermined order for program modules that are not dependent on each other based on the dependency information, and to determine the execution order for program modules that are dependent on each other such that another program module on which the program module depends is executed before the program module.
前記設定情報に含まれる情報のうち、前記パイプライン処理における前記1以上のプログラムモジュールのビルド実行順を表す情報を、前記実行順で更新するように構成されている請求項4に記載のパイプライン設定更新装置。 The setting update unit is
The pipeline setting update device according to claim 4 , configured to update information included in the setting information, which indicates a build execution order of the one or more program modules in the pipeline processing, with the execution order.
開発対象プログラムを構成する1以上のプログラムモジュールのソースコードがバージョン管理システムに登録されると、前記1以上のプログラムモジュールに含まれる各プログラムモジュール間の依存関係を表す依存関係情報を作成する依存関係情報作成手順と、
前記依存関係情報に基づいて、前記1以上のプログラムモジュールを前記パイプライン処理により順にビルドする場合の実行順を決定する実行順決定手順と、
前記実行順に基づいて、前記設定情報を更新する設定更新手順と、
をコンピュータが実行するパイプライン設定更新方法。 A pipeline setting update method for updating setting information of a pipeline process in continuous integration, comprising:
a dependency information creation step of creating dependency information representing dependencies between each of the program modules included in one or more program modules when source code of the one or more program modules constituting a program to be developed is registered in a version control system;
an execution order determination step for determining an execution order when the one or more program modules are built in sequence by the pipeline processing based on the dependency information;
a setting update procedure for updating the setting information based on the execution order;
The computer runs a pipeline set up to update the method.
開発対象プログラムを構成する1以上のプログラムモジュールのソースコードがバージョン管理システムに登録されると、前記1以上のプログラムモジュールに含まれる各プログラムモジュール間の依存関係を表す依存関係情報を作成する依存関係情報作成手順と、
前記依存関係情報に基づいて、前記1以上のプログラムモジュールを前記パイプライン処理により順にビルドする場合の実行順を決定する実行順決定手順と、
前記実行順に基づいて、前記設定情報を更新する設定更新手順と、
をコンピュータに実行させるプログラム。 A program for updating configuration information of a pipeline process in continuous integration,
a dependency information creation step of creating dependency information representing dependencies between each of the program modules included in one or more program modules when source code of the one or more program modules constituting a program to be developed is registered in a version control system;
an execution order determination step for determining an execution order when the one or more program modules are built in sequence by the pipeline processing based on the dependency information;
a setting update procedure for updating the setting information based on the execution order;
A program that causes a computer to execute the following.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022186322A JP2024075116A (en) | 2022-11-22 | 2022-11-22 | Pipeline setting update device, pipeline setting update method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022186322A JP2024075116A (en) | 2022-11-22 | 2022-11-22 | Pipeline setting update device, pipeline setting update method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2024075116A true JP2024075116A (en) | 2024-06-03 |
Family
ID=91321557
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022186322A Pending JP2024075116A (en) | 2022-11-22 | 2022-11-22 | Pipeline setting update device, pipeline setting update method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2024075116A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US12386615B2 (en) * | 2022-12-20 | 2025-08-12 | Red Hat, Inc. | Executing a continuous integration pipeline based on a type of change to source code |
-
2022
- 2022-11-22 JP JP2022186322A patent/JP2024075116A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US12386615B2 (en) * | 2022-12-20 | 2025-08-12 | Red Hat, Inc. | Executing a continuous integration pipeline based on a type of change to source code |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8065672B2 (en) | Simplifying rollback to prior versions of patches used to fix errors in pre-installed software | |
US7975264B2 (en) | Deploying patches in batch mode to fix errors in pre-installed software | |
JP4828271B2 (en) | Software generation apparatus for multiple OS versions and software generation support program for multiple OS versions | |
US7984424B2 (en) | Isolating declarative code to preserve customizations | |
US8135813B2 (en) | Method, system and program product for remotely deploying and automatically customizing workstation images | |
US8490082B2 (en) | System and method for representing user processes as software packages in a software package management system | |
US8266588B2 (en) | Creating projects in a rational application developer workspace | |
US7937698B2 (en) | Extensible mechanism for automatically migrating resource adapter components in a development environment | |
US20100251206A1 (en) | Avoiding conflict in update in distributed environment employing multiple clients | |
US8782636B2 (en) | Information processing apparatus, control method thereof, and program | |
US10409567B2 (en) | Trimming unused dependencies using package graph and module graph | |
CN107562419B (en) | Software development support method and system | |
US20070169114A1 (en) | Application suite installer with automatic detection of content and configurable options | |
CN113238795A (en) | Component distribution method, device, electronic equipment, storage medium and program product | |
US7900202B2 (en) | Identification of software execution data | |
JP2015162067A (en) | Application development support program and application development support system | |
US7900199B2 (en) | Method and apparatus for reusing a computer software library | |
US11392364B2 (en) | Adaptive hot reload for class changes | |
JP2024075116A (en) | Pipeline setting update device, pipeline setting update method, and program | |
US10514940B2 (en) | Virtual application package reconstruction | |
CN113220279A (en) | Code index management method, device, equipment and medium | |
JP2006294019A (en) | Generic software requirement analyzer | |
US9519470B2 (en) | Information processing system, information processing apparatus, device, software installation method, and storage medium for executing software installation | |
CN117891478A (en) | Application program upgrading method, device, equipment and storage medium | |
JP6013315B2 (en) | Application development support program and application development support system |