Giter Site home page Giter Site logo

continuous-delivery's Introduction

Continuous delivery project

This project is used to store a docker container to upload new package updates to Open Build Service.

It uses a predefined oscrc file which has to be hacked by environment variables to update the user and password to give upload right to osc (OBS command line tool).

Disclaimer

In order to use this delivery process some conditions are required:

  1. OBS project and package must already exist. The process won't create a package.
  2. .spec and .changes file should be added to the git project or a OBS _service file should be used. Otherwise current .spec and .changes from the OBS package will be used, but this is not recommended if you want a real CD pipeline.
  3. In case the git repository owns a .spec and the OBS package uses a _service file integration, the .spec file will be copied before the service update, applying the changes. The RPM version will still be calculated by the OBS service.
  4. Build process is not currently executed, so make sure the project builds locally (this feature might be added in the future).
  5. Package version will be obtained from "Version: " in the .spec file or calculated in case of the _service file is in use.

How to use

These steps must be followed to run the delivery operation:

  1. Pull the docker image. The image is currently stored in: https://cloud.docker.com/u/shap/repository/docker/shap/continuous_deliver
docker pull shap/continuous_deliver:latest
  1. Set the environment variables. This is not mandatory but it will facilitate things:
export OBS_USER=my-user # my obs user name
export OBS_PASS=my-pass # my obs user password
export OBS_PROJECT=my-project # obs project
export PACKAGE_NAME=my-package # package name in obs project

Here other optional parameters:

export FOLDER=/package # used folder inside the docker container where our code is located
export TARGET_PROJECT=target-project # target project to create a submit request. If not set submission will b skipped
export TAR_NAME=my-tar # Custom tar name. Otherwise package name will be used
export [email protected] # email of the changes author.
  1. Run the docker container
docker run -t -v "$(pwd):/package" -e OBS_USER=$OBS_USER -e OBS_PASS=$OBS_PASS -e OBS_PROJECT=$OBS_PROJECT -e PACKAGE_NAME=$PACKAGE_NAME shap/continuous_deliver /bin/bash -c "cd /package;/scripts/upload.sh"
docker run -t -v "$(pwd):/package" -e OBS_USER=$OBS_USER -e OBS_PASS=$OBS_PASS -e OBS_PROJECT=$OBS_PROJECT -e PACKAGE_NAME=$PACKAGE_NAME shap/continuous_deliver /bin/bash -c "cd /package;/scripts/submit.sh"

FOLDER variable must match with the path used in the volume creation and last command execution

Example

In .travis.yml you can find an example travis file that might be used to in your project.

For that, you must set your OBS user and password in the travis project settings.

travis settings

How to contribute

To contribute the project just update the project code and create a pull request. After merging the code the new docker image will be created automatically.

continuous-delivery's People

Contributors

arbulu89 avatar diegoakechi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.