Commit Graph

25 Commits

Author SHA1 Message Date
Sergiy Markin 0f2ab241f9 Restored ubuntu_bionic image build
This PS restores image build for ubuntu_bionic and adds appropriate
gates to keep it tested by appropriate functional and integrational
tests.

Change-Id: Id31d97ced8732d823937fb1f218e7ad8760d735c
2023-06-07 21:02:28 +00:00
Sergiy Markin c052d40277 Pegleg focal upgrade
This PS delivers focal version of Pegleg image and has the following updates:
- removed release-notes-jobs-python3 gate job because of incompartibility with Sphinx from current requirements
- added focal gate node and switched gates to use it
- added bindep.txt file into project root
- added bindep role into gate jobs
- added ubuntu_focal dockerfile for building focal pegleg image
- switched tox profiles to py38
- uplifted references to shipyard_client, promenade and deckhand projects
- resolved required dependencies conflicts by weakening constraints in Pipfile
- updated tox profile update-requirements for generate requirements.txt and test-requirements.txt
- generated new Pipfile.lock, requirements.txt and test-requirements.txt from Pipfile
- switched tox profiles to use requirements.txt and test-requirements.txt instead of pipenv because of upstream zuul nodes Pypi mirrorring issue
- updated reference to seaworthy site certificates in treasuremap repo
- fixed unit tests issues caused by pytest/mock updates and new openssl version
- fixed focal docker image publishing issue
- added multiprocessing into coverage tests running process
- made unit and coveraget tests more verbosive

Change-Id: I5c4c519dc725cfb8c7b4e14756347c9336028aff
2023-05-02 15:05:45 +00:00
Ruslan Aliev 6833800ecc Uplift k8s, promenade and shipyard dependencies
* disable python 35, leave only 36
* switch to bionic nodeset only
* update requirements.txt, Pipfile and lock

Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: Ia3c4df9d1f39f0f2cebf8ba0d89aebc5eec6f674
2022-07-20 18:40:42 -05:00
Ian H Pittwood 36b8e9fe60 Resolves installation problems in Docker
A recent change to implement Pipenv caused VCS dependencies (Promenade,
Deckhand, and Shipyard) to not be fully installed in Docker images. This
change removes the "editable" tags from the VCS dependencies to ensure a
full install as having "editable" enabled will only install dependencies
in development mode.

Unfortunately, the "editable" tag is required to install the
requirements.txt for a VCS dependency. To get the lower-level
dependencies installed from VCS dependencies, I implemented a few
commands in the Dockerfiles to retrieve the appropriate requirements.txt
and install them before fully installing Pegleg. An upcoming release of
Pipenv will fix the existing problems with VCS dependency resolution at
which point this temporary solution may be removed.

Adds manual installation of VCS dependency requirements.txt in Docker

Removes "editable" tags from VCS dependencies

Moves docker package to deployment packages from dev packages

Adds .env file to track VCS refs used by Docker for requirements.txt

Change-Id: Ifdb1fe960b32280dcb3c5308e56b2d608f848975
2019-08-16 12:24:57 -05:00
Alexander Hughes 1c8d92ef6b Standardize Pegleg code with YAPF
This patch addresses inconsistent code style and enforces it with a
gate for future submissions.

Separate work will be done in the future to address several of the
PEP8 ignores for docstrings, and attempt to bring the tests directory
to PEP8 compliance.

This patch:
1. Updates .style.yapf to set the knobs desired for YAPF.
2. Updates tox.ini to allow one of the knobs to work.
3. Removes unused code from several __init__.py files.
4. Updates the YAPF version in test-requirements.txt to latest (this
   is needed for several knobs to work).
5. Stylistic changes to the python codebase in Pegleg.
6. Updates to tox.ini to run YAPF during PEP8 check.

Change-Id: Ieaa0fdef2b601d01c875d64b840986e54df73abf
2019-07-25 17:28:18 +00:00
Roman Gorshunov 31e5b898a2 Fix: Pegleg Exceptions docs rendering on RTD
Readthedocs failed to render Pegleg exceptions with error:
> WARNING: autodoc: failed to import exception ... from module
> 'pegleg'; the following exception was raised: No module named 'click'

Trying to add Pegleg requirements to the installed requirements list,
so that Readthedocs has all modules, including those needed for the
Pegleg itself.

Change-Id: I1780a9be3aeb0c3e2e775cbb1f713c2033f13e08
2019-07-12 16:48:43 +02:00
Rajeshwari Dharwadkar 6ee2aaf845 Support pegleg to run on opensuse leap15 image
Add DISTRO parameter to support multiple distros
Add Dockerfile for opensuse to build leap 15 image.

Change-Id: I7a529476937494e042a4801117489325aa6621c7
2019-05-14 09:41:21 -07:00
Zuul 03634de6c8 Merge "Remove py35 support" 2018-11-11 22:22:13 +00:00
Roman Gorshunov d7740b0f40 Minor: meaningful default label
Making default label meaningful and conformant to "key=value" requirement.

Change-Id: Ibb915e3333d74f61742fbb9c4f3c7851d2fef040
2018-11-08 19:32:19 +01:00
Tin Lam 253b15cc33 Remove py35 support
As the default Docker image support for Pegleg is using py36 as a base
image, this patch set simply removes the support for py35. This allows
us to use py36 features such as secrets and f-strings without needing to
cope with backward compatibility.

Change-Id: Ic156ca67d2a0fe6fdc74c2c9da253a1cb8a3f456
Signed-off-by: Tin Lam <tin@irrational.io>
2018-11-07 13:04:34 -06:00
Roman Gorshunov 85d0dbd045 Fix: adding back the possibility to add arbitrary labels
Arbitrary labels could be added as `make` parameter `LABEL=`, which is used in
att-comdev/cicd Jenkins pipelines.

Sample parameter:
'LABEL=org.label-schema.vcs-url=${GERRIT_CHANGE_URL} \
--label org.label-schema.base-image=${base_sha256}'

Sample usage:
See Jenkinsfile files under images/ directory in att-comdev/cicd repo.

In addition to that, if `COMMIT` variable is undefined when invoking `make`, we
use result of `git rev-parse HEAD` command, which should output latest git
commit ID.

[0] https://github.com/att-comdev/cicd

Change-Id: I97fd1c44c31a8a815cc6873c5fd9de8e772ea226
2018-10-24 18:28:52 +02:00
Felipe Monteiro 57a6c6a84e Implement global lint and lint by site logic
With the implementation of revisioned repository to the CLI in
https://review.openstack.org/#/c/577886 there was a change to
the lint command [0], which changed it from being a global lint
to a site-level (targetted lint)... kind of: Only the CLI logic
was modified to support targetted single-site linting. Thus,
the first issue this patch set addresses is implementing the
back-end logic to realize targetted, single-site linting.

The second issue this patch set addresses is re-supporting global
linting (linting all sites within a repository) which means that
this partially reverts [0] which had (kind of) replaced global
linting with per-site linting.

So, this patch set:

1) Implements targetted, single-site linting back-end logic
2) Re-implements global linting for all sites in a repo
3) Adds unit tests for both
4) Adds some helper functions to util.engine.definition to
   help with 1) and 2)

[0] https://review.openstack.org/#/c/577886/4/src/bin/pegleg/pegleg/cli.py@191

Change-Id: I5147282556763d93dfaf06912d2c4c876e1bd69f
2018-10-02 21:41:56 +01:00
Zuul 6c6bea992d Merge "Fix: git commit id labels on images" 2018-10-01 12:07:52 +00:00
Felipe Monteiro 893ea9f4bb Standardize Pegleg directory structure
This patch set standardizes the Pegleg directory
structure because of the following reasons:

1) src/bin/pegleg is not necessary and only makes
building (e.g. documentation building) and running
of tox targets unnecessarily difficult.
2) src/bin/pegleg is a Java-like standard that
bears no relevance to Python.

Change-Id: I37d39d3d6186b92f8fbfe234221c9e44da48cf10
2018-09-23 10:33:40 -04:00
Roman Gorshunov de6486c380 Fix: git commit id labels on images
1) Use OCI Image Specs for labels instead of custom 'commit-id=xxxxx'
   or legacy "Label Schema"
2) Fix missing git commit id labels on images (.revision)
3) Add human-readable title (.title) of the image, URL (.url), and
   a few other properties (annotations) according to the latest Specs

Change-Id: I57318d4662d90b439d4b7766f7c67571e0f69f15
2018-09-21 03:31:12 +02:00
Jerome Brette 4727df6b80 Update Dockerfile to allow override of FROM variable
l is to let user customize the base image of the component
by passing FROM=myimage during the build process. This would let any
project leveraging Airship ensure that the base image is matching the
security requirements for that project and still use the same Dockerfile.
This will also ease the control of the /etc/apt/source.list
and thereby the result of apt-get update/upgrade procedure.
2. The above goal is achievable by using docker-ce feature such as:
ARG FROM="defaultbaseimage:xx"
FROM ${FROM}
For this reason, the installation of docker.io in the Zuul gating is beeing
replaced by docker-ce.
3. Third Goal is to bring consistency with the other compoenents leveraging
Helm such as the openstack-helm and potentially use bindep the same way
the LOCI images are to ensure
4. The new syntax in the Dockerfile is still commented out until the associated
image builder have been updated to use docker-ce as they have been for the LOCI
images.

Change-Id: I6703589f32487f5668d709f485dae5782b13c002
2018-07-17 14:37:08 -05:00
Roman Gorshunov d9722326e9 Unifying proxy variables for tox and docker build
This patch adds proxy-related variables to tox and 'docker build'
commands.

Change-Id: Ie749d6da8643abdb78c3d58e2ea2c1f2964bf186
2018-06-22 14:48:59 +02:00
Zuul a7f569ce2b Merge "[trivial] Rename tox jobs for zuul" 2018-06-01 13:09:49 +00:00
Scott Hussey 4ad86e0728 Basic zuul gates
- Pep8, bandit and unit tests
- Document build (no publish)

Change-Id: I2ca67e69f80aff63576bebd14da412e2f138f54a
2018-05-31 13:10:41 -05:00
Felipe Monteiro cf907430db [trivial] Rename tox jobs for zuul
This patchset renames the tox.ini jobs:

* lint => pep8

to comply with OpenStack standards [0]. This is needed so that [1]
works seamlessly (it will enable py35 and cover jobs for Pegleg).

[0] e.g. 04469a5181/tox.ini (L119)
[1] I174d5df008f6e000da1a3878afe75919312ea7aa

Change-Id: Ic3a5f2391e129cae32f60c0fb17197169df1b4c6
2018-05-31 17:03:26 +01:00
Scott Hussey f78258eb72 Support 'tests' make target
- 'make tests' will run local unit testing

Change-Id: Iec7a5e76ef56a5c097ead91b0da292202d9cc715
2018-05-04 11:37:00 -05:00
Felipe Monteiro eb8c4a2b17 Add tox target for running unit tests and Makefile alias
This is to add a tox target for running unit tests in
src/bin/pegleg and to add an alias to the Makefile in root
directory.

Change-Id: Ia138c57e8d732f6dbf19f00e452b0eac1a1aa9cb
2018-04-03 21:31:56 +01:00
Scott Hussey b5aed4df77 [Fix] Duplicate site_definition.yaml
- site_definition.yaml was collected twice.
- Update Makefile with format target and ignore
  pep8 rule that conflicts w/ YAPF formatting

Change-Id: I2bc6d40e9e9085558315224df7d9127a8945ee1c
2018-03-23 13:38:48 -05:00
Stacey Fletcher 610c4a8416 Makefile update
This patchset updates the makefile to use the same variables as
the other att-comdev Makefiles.

Change-Id: I3129e1627908ec50910091cf63bf8c7b7f1c85f8
2018-03-07 12:12:36 -06:00
Scott Hussey b3ea5de2b8 Update to UCP layout standard
- Create Makefile for image build
- Move Dockerfile into images/pegleg
- Move pegleg module src to src/bin/pegleg

Change-Id: I8fd728888ecfd75fe857da253d6c8cd4fd83f89c
2018-03-05 07:42:00 -06:00