Merge lp:~maxiberta/ols-jenkaas/packagereview-job-add-build-setup-command into lp:~ols-jenkaas-admins/ols-jenkaas/trunk

Proposed by Maximiliano Bertacchini
Status: Rejected
Rejected by: Maximiliano Bertacchini
Proposed branch: lp:~maxiberta/ols-jenkaas/packagereview-job-add-build-setup-command
Merge into: lp:~ols-jenkaas-admins/ols-jenkaas/trunk
Diff against target: 57 lines (+7/-11)
2 files modified
jobs/packagereview.yaml (+2/-0)
jobs/project-charm.yaml (+5/-11)
To merge this branch: bzr merge lp:~maxiberta/ols-jenkaas/packagereview-job-add-build-setup-command
Reviewer Review Type Date Requested Status
Online Services Jenkaas Administrators Pending
Review via email: mp+427115@code.launchpad.net

Commit message

Update deps prior to building the packagereview charm

Description of the change

The landing job has a "setup" setup prior to running, where most projects run `make update-dependencies`. The charm build job, otoh, has no explicit setup step (it's /bin/true, actually).

Should fix "ERROR: Could not find a version that satisfies the requirement snapstore-schemas==1.75 (from -r requirements.txt (line 96)) (from versions: 0.98, 1.13, 1.18, 1.19, 1.20, 1.23, 1.27, 1.28, 1.30, 1.31, 1.33, 1.34, 1.41, 1.61, 1.62, 1.63, 1.64, 1.65, 1.66, 1.67, 1.68, 1.69, 1.70, 1.71, 1.72, 1.73, 1.74)" (e.g. https://jenkins.ols.canonical.com/online-services/job/packagereview-build-charm/355/console). Most probably caused by the landing job and charm build job running in a different workers, and deps updated in the former only.

Alternatively, and more aggressively, could update the {name}-build-charm template to run '{setup}' instead of /bin/true.

Check commit messages for details.

To post a comment you must log in.

Unmerged revisions

837. By Maximiliano Bertacchini

Add a build-setup-command to the packagereview charm build job

836. By Maximiliano Bertacchini

Extend the {name}-build-charm job template to support a custom setup command

As a result, job templates {name}-build-charm and {name}-build-asset are identical.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'jobs/packagereview.yaml'
2--- jobs/packagereview.yaml 2021-07-08 18:40:05 +0000
3+++ jobs/packagereview.yaml 2022-07-19 19:48:16 +0000
4@@ -5,6 +5,7 @@
5 trunk: 'lp:packagereview'
6 setup: 'SNAPSTORE_DEPENDENCY_DIR=/workspace/siab-dependencies OLS_WHEELS_DIR=/workspace/ols-wheels make update-dependencies'
7 landing-tests: 'SNAPSTORE_DEPENDENCY_DIR=/workspace/siab-dependencies OLS_WHEELS_DIR=/workspace/ols-wheels make landing'
8+ build-setup-command: 'SNAPSTORE_DEPENDENCY_DIR=/workspace/siab-dependencies OLS_WHEELS_DIR=/workspace/ols-wheels make update-dependencies'
9 build-command: 'SNAPSTORE_DEPENDENCY_DIR=/workspace/siab-dependencies OLS_WHEELS_DIR=/workspace/ols-wheels make charm-publish CHARM_NAME=packagereview'
10 deps-trunk: 'lp:~siab/+git/siab-dependencies'
11 charm-repo: 'ssh://git.launchpad.net/~ubuntuone-pqm-team/packagereview/+git/charm-build-packagereview'
12@@ -22,6 +23,7 @@
13 vcs: 'git'
14 trunk: 'lp:packagereview'
15 setup: 'SNAPSTORE_DEPENDENCY_DIR=/workspace/siab-dependencies OLS_WHEELS_DIR=/workspace/ols-wheels make update-dependencies'
16+ build-setup-command: 'SNAPSTORE_DEPENDENCY_DIR=/workspace/siab-dependencies OLS_WHEELS_DIR=/workspace/ols-wheels make update-dependencies'
17 build-command: 'SNAPSTORE_DEPENDENCY_DIR=/workspace/siab-dependencies OLS_WHEELS_DIR=/workspace/ols-wheels make charm-publish CHARM_NAME=packagereview-worker'
18 charm-repo: 'ssh://git.launchpad.net/~ubuntuone-pqm-team/packagereview/+git/charm-build-packagereview-worker'
19 deploy-group: 'snap-store'
20
21=== modified file 'jobs/project-charm.yaml'
22--- jobs/project-charm.yaml 2021-05-05 13:18:49 +0000
23+++ jobs/project-charm.yaml 2022-07-19 19:48:16 +0000
24@@ -5,21 +5,11 @@
25 - '{charm-store}_{charm}'
26 - '{charm-store}_{charm}-landing-tests'
27
28-- job-template:
29+- job-template: &build-charm-job-template
30 name: '{name}-build-charm'
31 defaults: project
32 description: 'Build charm for {name}'
33 project-type: freestyle
34- builders:
35- - shell: annotate-output ~/jenkaas/project/run-tests {vcs} {trunk} {container} '/bin/true' 'with-credentials {build-command}' {workdir}
36- publishers:
37- - mattermost-snapstore
38-
39-- job-template:
40- name: '{name}-build-asset'
41- defaults: project
42- description: 'Build and publish assets for {name}'
43- project-type: freestyle
44 build-setup-command: '/bin/true'
45 builders:
46 - shell: annotate-output ~/jenkaas/project/run-tests {vcs} {trunk} {container} '{build-setup-command}' 'with-credentials {build-command}' {workdir}
47@@ -27,6 +17,10 @@
48 - mattermost-snapstore
49
50 - job-template:
51+ name: '{name}-build-asset'
52+ <<: *build-charm-job-template
53+
54+- job-template:
55 name: 'trigger-{charm-store}_{charm}'
56 description: 'Trigger {charm-store}_{charm} landings on approved proposals'
57 defaults: project

Subscribers

People subscribed via source and target branches