2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-05 04:27:55 +00:00
Commit Graph

38 Commits

Author SHA1 Message Date
Daniel Hilst b8510e1be3 refactor(build): replace build-ubunturepo with builddebs.pl and BuildUtils.pm
build-ubunturepo was 710 lines of shell doing the Debian half of what
buildrpms.pl does for rpms, with no code in common and a different CLI. It also
carried paths that are dead: GSA uploads, the PROMOTE/PREGA release flows, and a
-d mode that built an xcat-dep repository from a different project's packages.

builddebs.pl replaces it and mirrors buildrpms.pl -- Getopt::Long options, one
package list, build then index then sign -- so the two builders read the same way
and share BuildUtils.pm.

The design rests on one fact: xcat-core debs are Perl. They are byte-identical
for every Ubuntu release, so they are built ONCE and the same files are published
into every codename. Only xCAT, xCATsn and xCAT-genesis-scripts carry an
architecture, and there the difference is packaging metadata, not compiled
output. That is why this needs no sbuild and no per-codename chroot -- unlike
xcat-dep, whose packages are compiled and genuinely differ per release.

BuildUtils.pm holds what both builders need and what was worth making testable:
the Version-Release derivation from the commit time, the xCAT-probe helper
staging, the deb arch and dist tables, the debian/control version pinning, the
changelog rewrite, the reprepro conf generation, and the build lock. Every
function is pure or takes its side effect as an argument, so build_utils.t (45
assertions) drives each one rather than grepping a builder for evidence that it
is called. Verified by mutation: shrinking the arch table reddens 1, dropping
the /g from the control pin reddens 2.

The env-var CLI maps to options: BUILDALL=1 -> --force, GPGSIGN=1 -> --gpg-sign,
GPG_HOME -> --gpg-home, DEST -> --dest, DISTS -> --dist (repeatable). UP=0 has no
equivalent because uploading is gone -- the CD pipeline's deploy step publishes.

Callers updated: github_action_xcat_test.pl and travis.pl. The comment in
github_action_xcat_test.pl explaining why CI copies the tree before building is
corrected -- build-ubunturepo rm -rf'd $curdir/../../xcat-core, which under
GitHub's work/<repo>/<repo> layout is the checkout's own parent; builddebs.pl
writes under dist/debs inside the checkout and restores every file it edits, so
the copy is now only isolating the tests from build residue.

Two tests moved with it. build_ubunturepo_lock.t extracted the lock out of the
shell with a regex and ran that; the lock is now a function, so builddebs_lock.t
calls it -- and asserts what actually matters, that two builds of one checkout
fail fast while two builds of different checkouts run concurrently.
ubuntu_2604_pkglist.t asserted that resolute appeared in a shell fragment of
build-ubunturepo's source; it now asks BuildUtils for the release list and checks
a resolute stanza reaches conf/distributions. That assertion would have passed on
any file containing the fragment and broken on a reflow that changed nothing.

Verified: prove -r xCAT-test/unit fails on 6 files here against 7 on
upstream/master, the difference being apache_config_sources.t, fixed by the
preceding commit. The remaining 6 are missing DB modules on the machine that ran
it and are identical on both.

NOT done here, and required before this can merge: the Ubuntu core CD pipelines
still invoke ./build-ubunturepo (ci/ubuntu/Jenkinsfile.core-ubuntu-{devel,stable}
in VersatusHPC/xcat-core-ci-cd, and the inline script in each live Jenkins job).
Those must be switched to builddebs.pl in the same change window.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-02 12:39:43 -03:00
Mark Gurevich 93d9eb72c6 Move to bionic release for Travis 2021-04-05 09:34:37 -04:00
Mark Gurevich 236d6ac7a1 Add xcatprobe to CI environment 2019-05-14 16:28:29 -04:00
Mark Gurevich 336a4b2839 Add some more debugs to travis 2019-04-09 13:21:34 -04:00
Weihua Hu a47c14523b change the filter test case method back to using label (#5837) 2018-11-27 15:22:49 +08:00
bxuxa 22cb310e22 fix makedhcp_n failed due to netmask is 32 length 2018-11-21 11:18:18 +08:00
bxuxa c2c5159128 remove unsuitable test cases 2018-11-20 23:49:42 +08:00
bxuxa efc209ca5c allow insecure 2018-11-20 19:07:35 +08:00
bxuxa adab82de4b upgrade to travis xenial env 2018-11-20 18:46:13 +08:00
Yuan Bai 317bb1f499 fix CI issue (#5821)
--force-yes is deprecated
2018-11-20 15:21:51 +08:00
bxuxa 30dec78b37 - Make travis continue to finish the real test when it failed to get the PR information from github
- and redo the non-finished PR format checking at the end if all testing is passed.
2018-11-07 10:51:09 +08:00
huweihua 25df1e12f2 reuse MN_basic.bundle as CI test scope to fast test 2018-09-06 06:02:10 -04:00
GONG Jie 50f2d2aca0 Remove trailing spaces in file travis.pl 2017-12-31 23:59:59 +00:00
huweihua 5871e21758 comment debug info out 2018-08-14 06:09:24 -04:00
huweihua 57896422a4 add some comment in code 2018-08-14 05:24:40 -04:00
huweihua 30997ee330 using label to enhance CI test 2018-08-14 03:01:33 -04:00
Gᴏɴɢ Jie 74113c6b17 Hack travis.pl to resolve the GPG signing problem (#5318) 2018-06-22 18:00:16 +08:00
Mark Gurevich 123dd66610 Verify commit owner id 2018-05-21 11:18:34 -04:00
Mark Gurevich f4f173f9ab TravisCI wording and JSON format check 2018-05-03 15:45:18 -04:00
Weihua Hu f9f5c4f8ad Change Milestone or Labels missing from error to warning in CI test (#4943)
* Change Milestone or Labels missing from error to warning

* Remove the plaintext of user name and password in CI log
2018-03-20 17:38:58 +08:00
Weihua Hu 7ff4d02fcb Add milestone and labels checking in the CI test system (#4825)
* Add milestone checking

* test for labels, please ignore this commit

* add labels checking

* test for labels, please ignore
2018-02-13 15:52:36 +08:00
bybai 1fa769373e work around CI failure 2018-01-18 21:39:38 -05:00
cxhong a030a7f59e Merge pull request #3398 from samveen/mariadbsetup
[perl-xCAT] Allow `mysqlsetup` to configure mariadb too.
2017-07-11 16:17:53 -04:00
hu-weihua aac78a0854 Remove the plain text of user name and password of xcatbot 2017-07-06 02:58:26 -04:00
hu-weihua 89df8e877e test regression 2017-07-05 04:36:00 -04:00
hu-weihua 496d7b407d build test 2017-07-05 04:07:28 -04:00
hu-weihua 8de802ba10 test build 2017-07-05 03:55:15 -04:00
hu-weihua 51ec3df5c0 build test 2017-07-05 03:31:14 -04:00
hu-weihua 37965e1a7c build test 2017-07-05 03:16:16 -04:00
hu-weihua aa42aca6ba using username and password back 2017-07-05 02:34:08 -04:00
hu-weihua c4d2215065 token test1 2017-07-05 02:18:42 -04:00
hu-weihua d653535de2 token test 2017-07-05 02:11:23 -04:00
hu-weihua f356b13e65 test token 1 2017-07-05 01:47:37 -04:00
hu-weihua 994e811e8e test token 2017-07-05 01:41:24 -04:00
hu-weihua 09e7964b5f Using token to instead of user name and password 2017-07-05 01:31:19 -04:00
Samveen Gulati ba6b62619e travis.pl: Show empty travis_env_attrs 2017-07-05 04:54:44 +00:00
hu-weihua 30ec8ec305 CI: change the user to common user 2017-07-04 23:31:23 -04:00
hu-weihua ca5107b23d Uploade CI code 2017-07-04 23:10:51 -04:00