Giter Club home page Giter Club logo

cdforsoftwarepkgs's Introduction

03_03_ci_cd_for_software_packages

Continuous delivery workflows for software packages follow a pattern with these steps:

  • Configure the project to work with the package registry
  • Authenticate with the target registry
  • Build the package
  • Publish the package to the registry

Registry configuration and authentication

Each language has a specific configuration that identifies the target registry and how to authenticate with it.

Language Config File
JavaScript package.json
Ruby .gemspec
Java settings.xml, pom.xml
.Net .csproj

Build and publish

Each language will also use its own, native tooling to build and publish a package.

Language Build, publish Commands
JavaScript npm ci; npm publish
Ruby gem build; gem push
Java mvn package; maven deploy
.Net dotnet pack; dotnet nuget push

Package Versions

The configuration files for a package also define a version number for the package being published.

Version numbers can't be reused.

Update code to reference a new version number with each new release.

Recommended Reading

Using the Exercise Files

  1. Create a new repo and upload the files for this lesson. Note that the Java files need to be located in subdirectories. Follow the steps in this document to move the files after uploading them: Moving a file to a new location .

    Specifically, the file HelloActions.java needs to have the following path:

     ./src/main/java/com/example/HelloActions.java
    

    And the file HelloActionsTest.java needs to have the following path:

     ./src/test/java/com/example/HelloActionsTest.java
    
  2. Edit pom.xml.

     Completing this step is key to having the workflow run properly!
    

    Replace all occurrences of GITHUB_USERNAME and GITHUB_REPONAME with your GitHub username and the name for the GitHub repo you are using for this exercise.

    Save the pom.xml file and commit the changes to the repo.

  3. In the repo select the Actions tab.

  4. Select and configure the workflow Publish Java Package with Maven.

  5. Select Start Commit and then select Commit New File.

  6. Select the Code tab.

  7. Select Create a new release.

  8. Select Choose a tag.

  9. For the tag name, enter v1.0.0.

  10. Select Create a new tag on publish.

  11. For the release title, enter v1.0.0. Enter text for the body of the release as well.

  12. Select Publish.

  13. Select the Actions tab and wait for the workflow to finish successfully. If there are errors in the workflow run, review them and make corrections where needed. If you get stuck, ask for help in the Q&A for the course.

  14. Once the workflow completes, select the Code tab.

  15. Refresh the page as needed until the package is listed under Packages.

  16. Select the package and review the details on the package page.

cdforsoftwarepkgs's People

Contributors

lalitacloud avatar

Watchers

 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.