Merge ~jasonlo/jenkins-agent-charm:ps5-stg-enablement into jenkins-agent-charm:master

Proposed by lo
Status: Merged
Approved by: Tom Haddon
Approved revision: fedc6da47a1744d18e93e1f82ac44f55b83138b9
Merged at revision: 27b9eb25c17c39388cedef3c22818f3a2e2e3112
Proposed branch: ~jasonlo/jenkins-agent-charm:ps5-stg-enablement
Merge into: jenkins-agent-charm:master
Diff against target: 55 lines (+23/-0)
3 files modified
metadata.yaml (+1/-0)
tests/functional/bundles/base-focal.yaml (+19/-0)
tests/functional/tests.yaml (+3/-0)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Canonical IS Reviewers Pending
Rex Tsai Pending
Review via email: mp+410929@code.launchpad.net

Commit message

To add series focal into jenkins-slave.

Description of the change

1. Current version (stable 13) on https://charmhub.io/jenkins-slave only provides up-to bionic series. This MP is to add series focal (20.04) into the option.

2. make test result:
Normalising python layout with black.
black installed: black==21.9b0,click==8.0.3,mypy-extensions==0.4.3,pathspec==0.9.0,platformdirs==2.4.0,regex==2021.10.23,tomli==1.2.2,typing-extensions==3.10.0.2
black run-test-pre: PYTHONHASHSEED='1703982544'
black run-test: commands[0] | black --skip-string-normalization --line-length=120 .
All done! ✨ 🍰 ✨
3 files left unchanged.
___________________________________ summary ____________________________________
  black: commands succeeded
  congratulations :)
Running flake8
lint installed: flake8==4.0.1,mccabe==0.6.1,pycodestyle==2.8.0,pyflakes==2.4.0
lint run-test-pre: PYTHONHASHSEED='1943368726'
lint run-test: commands[0] | flake8
___________________________________ summary ____________________________________
  lint: commands succeeded
  congratulations :)
unit installed: attrs==21.2.0,charmhelpers==0.20.23,charms.reactive==1.4.1,coverage==6.0.2,iniconfig==1.1.1,Jinja2==3.0.2,MarkupSafe==2.0.1,mock==4.0.3,netaddr==0.8.0,packaging==21.0,pbr==5.6.0,pluggy==1.0.0,py==1.10.0,pyaml==21.10.1,pyparsing==3.0.3,pytest==6.2.5,pytest-cov==3.0.0,PyYAML==6.0,six==1.16.0,Tempita==0.5.2,toml==0.10.2,tomli==1.2.2
unit run-test-pre: PYTHONHASHSEED='1128645834'
unit run-test: commands[0] | pytest -v --ignore /home/lo/Workspace/jenkins-slave-charm-lo/tests/functional --cov=reactive --cov-report=term-missing --cov-branch
============================= test session starts ==============================
platform linux -- Python 3.8.10, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 -- /home/lo/Workspace/jenkins-slave-charm-lo/.tox/unit/bin/python
cachedir: .tox/unit/.pytest_cache
rootdir: /home/lo/Workspace/jenkins-slave-charm-lo, configfile: pytest.ini
plugins: cov-3.0.0
collecting ... collected 24 items

tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_configure_jenkins_slave_master_url PASSED [ 4%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_configure_jenkins_slave_no_url PASSED [ 8%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_configure_jenkins_slave_relation_url PASSED [ 12%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_configure_jenkins_slave_relation_url_with_secret PASSED [ 16%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_configure_nagios PASSED [ 20%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_file_to_units_executable_py PASSED [ 25%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_file_to_units_executable_sh PASSED [ 29%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_file_to_units_non_executable PASSED [ 33%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_file_to_units_non_executable_x_on_disk PASSED [ 37%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_file_to_units_with_perms PASSED [ 41%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_hook_config_changed PASSED [ 45%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_hook_install PASSED [ 50%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_hook_install_trusty PASSED [ 54%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_hook_slave_relation PASSED [ 58%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_hook_slave_relation_changed_flags PASSED [ 62%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_hook_slave_relation_master_url_set PASSED [ 66%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_hook_slave_relation_relation_url_not_set PASSED [ 70%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_hook_slave_relation_removed_flags PASSED [ 75%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_hook_upgrade_charm_flags PASSED [ 79%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_set_active_master_url_or_relation PASSED [ 83%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_set_active_not_running PASSED [ 87%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_set_active_running PASSED [ 91%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_write_default_conf_reset PASSED [ 95%]
tests/unit/test_jenkins_slave.py::TestSetDefaultConf::test_write_default_conf_update PASSED [100%]

---------- coverage: platform linux, python 3.8.10-final-0 -----------
Name Stmts Miss Branch BrPart Cover Missing
-----------------------------------------------------------------------
reactive/jenkins_slave.py 161 0 32 0 100%
-----------------------------------------------------------------------
TOTAL 161 0 32 0 100%

============================== 24 passed in 1.16s ==============================
___________________________________ summary ____________________________________
  unit: commands succeeded
  congratulations :)
functional installed: aiohttp==3.7.4.post0,argcomplete==1.12.3,async-generator==1.10,async-timeout==3.0.1,attrs==21.2.0,bcrypt==3.2.0,cachetools==4.2.4,certifi==2021.10.8,cffi==1.15.0,chardet==4.0.0,charset-normalizer==2.0.7,colorclass==2.2.0,cryptography==3.3.2,debtcollector==2.3.0,google-auth==2.3.2,hvac==0.6.4,idna==3.3,Jinja2==3.0.2,juju==2.9.4,juju-wait==2.8.4,jujubundlelib==0.5.6,kubernetes==19.15.0,macaroonbakery==1.3.1,MarkupSafe==2.0.1,multidict==5.2.0,mypy-extensions==0.4.3,netaddr==0.8.0,oauthlib==3.1.1,oslo.config==6.11.3,oslo.i18n==5.1.0,paramiko==2.8.0,pbr==5.6.0,protobuf==3.19.0,pyasn1==0.4.8,pyasn1-modules==0.2.8,pycparser==2.20,pymacaroons==0.13.0,pymongo==3.12.1,PyNaCl==1.4.0,pyRFC3339==1.1,python-dateutil==2.8.2,python-libmaas==0.6.6,pytz==2021.3,PyYAML==6.0,requests==2.26.0,requests-oauthlib==1.3.0,rfc3986==1.5.0,rsa==4.7.2,six==1.16.0,stevedore==3.5.0,tenacity==8.0.1,terminaltables==3.1.0,theblues==0.5.2,toposort==1.7,typing-extensions==3.10.0.2,typing-inspect==0.7.1,urllib3==1.26.7,websocket-client==1.2.1,websockets==7.0,wrapt==1.13.2,yarl==1.7.0,zaza @ git+https://github.com/openstack-charmers/zaza.git@39ee47cf683eb45b98fbab7d2daa2f03b6d54f5d
functional run-test-pre: PYTHONHASHSEED='2557581413'
functional run-test: commands[0] | functest-run-suite --keep-model
2021-10-29 08:59:51 [WARNING] unknown facade CAASModelConfigManager
2021-10-29 08:59:51 [WARNING] unexpected facade CAASModelConfigManager found, unable to decipher version to use
2021-10-29 08:59:51 [WARNING] unknown facade RaftLease
2021-10-29 08:59:51 [WARNING] unexpected facade RaftLease found, unable to decipher version to use
2021-10-29 08:59:51 [WARNING] unknown facade Secrets
2021-10-29 08:59:51 [WARNING] unexpected facade Secrets found, unable to decipher version to use
2021-10-29 08:59:51 [WARNING] unknown facade SecretsManager
2021-10-29 08:59:51 [WARNING] unexpected facade SecretsManager found, unable to decipher version to use
2021-10-29 08:59:51 [WARNING] unknown facade SecretsRotationWatcher
2021-10-29 08:59:51 [WARNING] unexpected facade SecretsRotationWatcher found, unable to decipher version to use
2021-10-29 08:59:51 [INFO] Deploying bundle '/home/lo/Workspace/jenkins-slave-charm-lo/tests/bundles/base-focal.yaml' on to 'zaza-dc6b7e92dc47' model
2021-10-29 08:59:51 [INFO] Rendered template '<Template 'local-charm-overlay.yaml.j2'>' to file '/tmp/tmp7ntrqg_n/local-charm-overlay.yaml'
2021-10-29 08:59:51 [INFO] Deploying overlay '/tmp/tmp7ntrqg_n/local-charm-overlay.yaml' on to 'zaza-dc6b7e92dc47' model
2021-10-29 08:59:57 [INFO] Located charm "jenkins" in charm-store, channel stable
2021-10-29 08:59:57 [INFO] Located charm "nrpe" in charm-store, channel stable
2021-10-29 08:59:57 [INFO] Executing changes:
2021-10-29 08:59:57 [INFO] - upload charm jenkins from charm-store for series focal with architecture=amd64
2021-10-29 09:01:31 [INFO] - deploy application jenkins from charm-store on focal
2021-10-29 09:01:31 [INFO] - expose all endpoints of jenkins and allow access from CIDRs 0.0.0.0/0 and ::/0
2021-10-29 09:01:31 [INFO] - upload charm /tmp/charm-builds/jenkins-slave for series focal with architecture=amd64
2021-10-29 09:01:32 [INFO] - deploy application jenkins-slave on focal
2021-10-29 09:01:32 [INFO] - upload charm nrpe from charm-store for series focal with architecture=amd64
2021-10-29 09:01:46 [INFO] - deploy application nrpe from charm-store on focal
2021-10-29 09:01:46 [INFO] - add relation jenkins - jenkins-slave
2021-10-29 09:01:46 [INFO] - add relation jenkins-slave - nrpe
2021-10-29 09:01:46 [INFO] - add unit jenkins/0 to new machine 0
2021-10-29 09:01:46 [INFO] - add unit jenkins-slave/0 to new machine 1
2021-10-29 09:01:46 [INFO] Deploy of bundle completed.
2021-10-29 09:01:46 [INFO] Waiting for environment to settle
2021-10-29 09:01:46 [INFO] Timeout for deployment to settle set to: 3600
2021-10-29 09:01:46 [INFO] Waiting for application states to reach targeted states.
2021-10-29 09:01:46 [WARNING] unknown facade CAASModelConfigManager
2021-10-29 09:01:46 [WARNING] unexpected facade CAASModelConfigManager found, unable to decipher version to use
2021-10-29 09:01:46 [WARNING] unknown facade RaftLease
2021-10-29 09:01:46 [WARNING] unexpected facade RaftLease found, unable to decipher version to use
2021-10-29 09:01:46 [WARNING] unknown facade Secrets
2021-10-29 09:01:46 [WARNING] unexpected facade Secrets found, unable to decipher version to use
2021-10-29 09:01:46 [WARNING] unknown facade SecretsManager
2021-10-29 09:01:46 [WARNING] unexpected facade SecretsManager found, unable to decipher version to use
2021-10-29 09:01:46 [WARNING] unknown facade SecretsRotationWatcher
2021-10-29 09:01:46 [WARNING] unexpected facade SecretsRotationWatcher found, unable to decipher version to use
2021-10-29 09:01:46 [INFO] Waiting for an application to be present
2021-10-29 09:01:48 [WARNING] DEPRECATION: Application jenkins-slave uses 'workload-status-message'; please use 'workload-status-message-prefix' instead.
2021-10-29 09:01:48 [WARNING] DEPRECATION: Application jenkins uses 'workload-status-message'; please use 'workload-status-message-prefix' instead.
2021-10-29 09:01:48 [INFO] Now checking workload status and status messages

3. I use this repo. (https://code.launchpad.net/~jasonlo/+git/jenkins-slave-charm-build) to commit build result after doing "charm build" and shared to bot (https://launchpad.net/~stg-enablement-jenkins). I have tried deploying using the following instruction on PS5:
"juju deploy -n 1 ." and it deploys focal slave successfully.

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Tom Haddon (mthaddon) wrote :

One minor question inline

Revision history for this message
lo (jasonlo) wrote :

Update accordingly and run test again. The test result in description is also updated.
> One minor question inline

Revision history for this message
Tom Haddon (mthaddon) wrote :

LGTM, thx

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 27b9eb25c17c39388cedef3c22818f3a2e2e3112

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/metadata.yaml b/metadata.yaml
2index 5ba905e..0f7eb5d 100644
3--- a/metadata.yaml
4+++ b/metadata.yaml
5@@ -12,6 +12,7 @@ description: |
6 tags:
7 - applications
8 series:
9+ - focal
10 - bionic
11 - xenial
12 - trusty
13diff --git a/tests/functional/bundles/base-focal.yaml b/tests/functional/bundles/base-focal.yaml
14new file mode 100644
15index 0000000..786b92a
16--- /dev/null
17+++ b/tests/functional/bundles/base-focal.yaml
18@@ -0,0 +1,19 @@
19+series: focal
20+
21+applications:
22+ jenkins:
23+ charm: cs:jenkins
24+ num_units: 1
25+ expose: true
26+
27+ jenkins-slave:
28+ num_units: 1
29+
30+ nrpe:
31+ charm: cs:nrpe
32+
33+relations:
34+ - - jenkins
35+ - jenkins-slave
36+ - - jenkins-slave
37+ - nrpe
38diff --git a/tests/functional/tests.yaml b/tests/functional/tests.yaml
39index fcc9515..25f3335 100644
40--- a/tests/functional/tests.yaml
41+++ b/tests/functional/tests.yaml
42@@ -4,10 +4,13 @@ tests:
43 configure:
44 - zaza.charm_tests.noop.setup.basic_setup
45 gate_bundles:
46+ - base-focal
47 - base-bionic
48 dev_bundles:
49+ - base-focal
50 - base-bionic
51 smoke_bundles:
52+ - base-focal
53 - base-bionic
54 target_deploy_status:
55 jenkins:

Subscribers

People subscribed via source and target branches

to all changes: