Skip to content

Latest commit

 

History

History
134 lines (96 loc) · 4.49 KB

File metadata and controls

134 lines (96 loc) · 4.49 KB

Open Build Service Integration

This container is currently being built in SUSE:ALP:Workloads/ansible-container.

The built container images are available from registry.opensuse.org.

Source services have been configured in the _service file to simplify maintenance activities.

Maintenance Worflow

The following assumes a working knowledge of the SUSE Open Build Service (OBS). For more details see the official documentation and the Wiki.

The maintenance workflow can leverage the provided source service integration, using the following workflow:

  • Branch the main package
  • Update the sources
  • Test build the container
  • Commit the updates
  • Test the published container
  • Submit the updates to the main package

Branch the main package

Create a branch of the main package under your home area, using the osc command:

% osc bco SUSE:ALP:Workloads/ansible-container

This will create a local checkout home:username:branches:SUSE:ALP:Workloads/ansible-container, where username will be whatever your OBS account username is.

Note that you should ensure that publishing is enabled for your image to be able to see it in registry.opensuse.org.

Update the sources

To update the container build to use the latest sources from SUSE/ansible-container you can trigger the remote source services, which will update the sources in the build servuce, as follows:

% cd home:username:branches:SUSE:ALP:Workloads/ansible-container
% osc service remoterun

Note this will also update the ansible-container.changes file based upon the Github PR titles.

To see the updated sources you can additionally run services locally:

% osc service localrun

The services defined in the _service file will extract the Dockerfile and associated files from the sources which should allow local building of the container.

Test build the container

To test that the container will build correctly in the build service you can try building it locally as follows:

% osc service localrun
% osc build --vm-type=kvm --vm-disk-size=8192 Tumbleweed_containerfiles x86_64

The osc service localrun is required to ensure that the relevant files, that are required to be able to perform the image build, have been extracted locally from the sources.

Note that --vm-disk-size=8192 is required to ensure that sufficient disk space is available for the container build process to complete.

Also you may have to respond to prompts to trust package source repos as part of running the build.

Remember to cleanup any temporary files that may have been created by the osc service localrun once you are happy that the container builds successfully.

Commit the updates

As part of commiting the changes you should ensure that your changes are included in osc version control:

  • add any required new files
  • removed any deleted old files.

You should also ensure that temporary files removed, such as those created by running osc service localrun. An easy way to do this, so long as you have already ensured your required files are included in the osc version control system, is to run osc clean which will remove all files that are not managed by the version control system, or the osc command itself, from the working directory.

When you are satisfied that the updated sources are viable you can commit any changes to the repo as follows:

% osc commit

Test the published container

Once the updated container has been built you can retrieve it from your area in registry.suse.de, changing username to your build service username.

Note that you may need to enable publishing for your project to be able to see the published image.

Perform relevant verification testing for any changes pulled in by the updated sources.

Submit the updates to the main package

Once you are happy with the candidate changes to the ansible-container you can submit them to the main package using:

% osc submitrequest