Commit Graph

9 Commits

Author SHA1 Message Date
Davlet Panech 2393b019f9 Add public-keys/ to .gitignore
New project "public-keys" was added to manifest by [1]. Add it to
.gitignore file.

[1] https://review.opendev.org/c/starlingx/manifest/+/873166

Story: 2009221
Task: 47097

Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: Iafe62c7060d0d3bd538be30e8afe52aeeee3ef44
2023-02-14 16:36:01 -05:00
Davlet Panech 6745f6839a debian: base docker image: add support for debian
* build-stx-base.sh:
  - add debian to list of supported OS's
  - $OS: autodetect from host's /etc/os-release, allow overriding on
    command line
  - $OS_VERSION: auto-detect from Dockerfile, allow overriding on
    command line
  - Generate sources.list for debian as necessary
  - Slightly different syntax for .cfg files:
    * allow comments and empty lines
    * split on newline, not whitespace

* build-stx-images.sh:
  add debian to list of supported OS's

* stx-debian/Dockerfile.stable:
  debian-based docker file for building the base image

TESTS
=====

* Build base image (build-stx-base.sh) on Debian and CentOS
* Build with multiple options in the .cfg file on Debian & CentOS

Story: 2009897
Task: 44692

Depends-On: https://review.opendev.org/c/starlingx/tools/+/832687
Depends-On: https://review.opendev.org/c/starlingx/tools/+/832290
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: If5fac9efdc0e99b7a9bb252a1bd48a78b0d848f9
2022-03-14 12:58:31 -04:00
Scott Little 5704ce13e4 Remove references to cgcs-3rd-party-repo
The concept of an independent 3rd party repo
was dropped when StarlingX went open source.

Delete this obsolete code.

Story: 2006387
Task: 40970
Change-Id: I16df261eb4ad86d52ae8f65917ae9d27eaea608b
Signed-off-by: Scott Little <scott.little@windriver.com>
2020-10-27 14:26:03 -04:00
Scott Little cf2c5804a4 rename repos
Modify .gitignore in prepartion for the renaming of:
- cgcs-centos-repo to centos-repo
- cgcs-tis-repo to local-repo

Story: 2006387
Task: 36912
Change-Id: Ife94d44514afc62918f28c026b8f5e6178e80ac2
Signed-off-by: Scott Little <scott.little@windriver.com>
2020-09-18 17:58:48 -04:00
Don Penney d184c69b7c Update tox.ini bashate to test all bash scripts
Currently, the tox.ini file is only running bashate against files that
end in a .sh extension. However, many of the build tools do not have
an extension, and therefore don't have bashate executed against them.
This commit enhances the tox command to search for shell scripts
regardless of file extension.

The bashate ignore list has been updated to ignore all existing
warnings. Future updates can perform cleanup to address the
outstanding issues and remove items from the ignore list one by one.

The original check of .sh is maintained with a smaller ignore list, to
ensure new issues are not introduced.

Change-Id: I07e8ac83c6ed3d81e7bfad19da1eee1747d60802
Signed-off-by: Don Penney <don.penney@windriver.com>
2020-02-12 19:20:43 +00:00
Scott Little b20ac0164d Build Avoidance
Purpose:
   Reduce build times after a repo sync by pulling in pre-generated
srpms and rpms and other build products created by a local reference build.

Usage:
  repo sync
  generate-cgcs-centos-repo.sh ...
  populate_downloads.sh ...
  build-pkgs --build-avoidance [--build-avoidance-user <user> \
     --build-avoidance-host <addr> --build-avoidance-dir <dir>]

Reference builds:
- A server performs a regular (daily?), automated builds using
  existing methods. Call these the reference builds.

- The builds are timestamped, and preserved for some time. (weeks?)
  The MY_WORKSPACE directory for the build shall have a common root
  directory, and a leaf directory that is a UTC time stamp of format
  YYYYMMDDThhmmssZ.
  e.g.
  MY_WORKSPACE=/localdisk/loadbuild/jenkins/StarlingX/20180719T113021Z

  Alternative formats are possible by setting values in ...
  "$MY_REPO/local-build-data/build_avoidance_source"
  e.g.
  BUILD_AVOIDANCE_DATE_FORMAT="%Y-%m-%d"
  BUILD_AVOIDANCE_TIME_FORMAT="%H-%M-%S"
  BUILD_AVOIDANCE_DATE_TIME_DELIM="_"
  BUILD_AVOIDANCE_DATE_TIME_POSTFIX=""
  BUILD_AVOIDANCE_DATE_UTC=0

  Which results in YYYY-MM-DD_hh-mm-ss format using local time.
  The one property that the timestamp must have is that they
  are sortable, and that the reference build and the consumer of
  the reference builds agree on the format.

- A build CONTEXT is captured, consisting of the SHA of each and every
  git that contributed to the build.

- For each package built, a file shall capture he md5sums of all the
  source code inputs to the build of that package.

- All these build products are accessible locally (e.g. a regional
  office) via rsync (other protocols can be added later).  ssh
  is also required to run remote query commands on the reference build.

  Initial ground work to support a selection variable ....
  BUILD_AVOIDANCE_FILE_TRANSFER="my-transfer-protocol"
  in $MY_REPO/local-build-data/build_avoidance_source"
  has been created, but "rsync" is the only valid value at this time.

- Location of the reference build can be specified via command line, or
  defaults can be put in $MY_REPO/local-build-data/build_avoidance_source.
  The local-build-data directory is gitignored by stx-root and so can be
  customized for local needs.
  e.g.
  cat $MY_REPO/local-build-data/build_avoidance_source
  BUILD_AVOIDANCE_USR="jenkins"
  BUILD_AVOIDANCE_HOST="stx-build-server.myco.com"
  BUILD_AVOIDANCE_DIR="/localdisk/loadbuild/jenkins/StarlingX"

Notes:
- Build avoidance is only used if requested.
- Build avoidance does not necessarily use the latest reference build.
  It compares the git context of all available reference builds vs your
  own git context, and chooses the most recent for which you gits have
  all the conent.  i.e. all your gits will be same or newer than that
  used by the reference build.  This also meens that some packages might
  still need to be rebuilt after the download step.
- Normally build avoidance remembers the last download context and will only
  consider reference builds newer than the last download.   You can reset
  using 'build-pkgs --build-avoidance --clear' to erase the download history.
  When might this matter to me?  If you change to an old branch that
  hasn't been synced recently and want to build in that context.
- The primary assumtion of Build Avoidance is that it is faster to
  download packages than to build them.  This is typically true of a
  good LAN, but likely not true of a WAN. This is why we emphasize the
  local nature of your reference build server.

Also in this update:
- reworked context generation to be relative to 'dirname $MY_REPO'
- Moved md5sum calculation to a common file, and fixed case where
  symlinks where canonacalized to paths outside of $MY_REPO.
  We'll make an exception to canonacalization to keep paths
  relative to $MY_REPO.
- In future other functions could be moved to the common file.

Story: 2002835
Task: 22754
Change-Id: I757780190cc6063d0a2d3ad9d0a6020ab5169e99
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-09-17 16:41:31 -04:00
Scott Little f31c793761 Remove empty repo stx-utils
Directory stx will now be owned by stx-root.
Relocate .gitignore from stx-utils for that directory.

Change-Id: I75ac350600e5dcce286e6a76cf3a985d9297a2a8
Story: 2002801
Task: 22687
Depends-On: https://review.openstack.org/588634
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-08-03 14:14:41 -04:00
Scott Little d2d96619a2 Shorten "addons/wr-cgcs/layers/cgcs" to just "stx"
Part of the project to remove cgcs references.
Replace and shorten the path the needlessly long and
complex "addons/wr-cgcs/layers/cgcs" path with just "stx".

This update just fixes up paths found in scripts, comments
and config files.

Depends-On: https://review.openstack.org/579954
Depends-On: https://review.openstack.org/579957
Depends-On: https://review.openstack.org/580170
Depends-On: https://review.openstack.org/579984
Change-Id: I04d653f740f17d8a9b2732f26d36907f635d8950
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-07-04 15:12:58 -04:00
Dean Troyer cfe45dadae StarlingX open source release updates
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-06-01 07:45:23 -07:00