Giter VIP home page Giter VIP logo

releaser's Introduction

quara-releaser

Example usage in Azure Devops

  • Install releaser:
steps:
  - script: |
    sudo wget https://github.com/quara-dev/releaser/releases/latest/download/releaser.pyz -O /usr/local/bin/releaser
    sudo chmod /usr/local/bin/releaser
  • Install releaser with toml optional dependencies to read pyproject.toml files:
steps:
  - script: |
      pip install git+https://github.com/quara-dev/releaser.git toml
  • Create a file named manifest.json and publish it as pipeline artefact:
steps:
  - script: python -m releaser create-manifest -o manifest.json
    displayName: Create manifest.json file

  - publish: "$(System.DefaultWorkingDirectory)/manifest.json"
    displayName: Publish manifest.json as pipeline artefact
    artifact: manifest.json
  • Define a string variable named MANIFEST holding a manifest:
steps:
  - script: |
      manifest="$(python -m releaser analyze-manifest)"
      echo "##vso[task.setvariable variable=MANIFEST;isoutput=true]$manifest"
    displayName: Create MANIFEST variable holding release manifest as JSON string

  - script: echo $MANIFEST
    displayName: Display MANIFEST variable

Command Line Reference

Create a release manifest

The create-manifest command can be used to generate a manifest in JSON format.

  • By default, manifest is written to standard output, but -o or --output option can be provided to write manifest to a file:
releaser create-manifest -o manifest.json

Analyze the manifest

  • Use the analyze-manifest command to show all or part of a manifest in standard output:
releaser analyze-manifest

This command first generates a manifest by default, but also accept a -i or --input option to read an existing manifest from a file:

releaser analyze-manifest -i manifest.json

Many options are available to query specific information within the manifest.

List images

  • It's possible to list all images declared within a manifest:

    releaser analyze-manifest --list-images
  • To list images for a single application, use the --app option:

    releaser analyze-manifest --list-images --app myapp
  • To list images for a single platform, use the --platform option:

    releaser analyze-manifest --list-images --platform linux/arm64

    Note: Using --platform excludes non-platform images and returns platform images only.

  • To list images for all platforms matching a manifest tag, use the --manifest-tag:

    releaser analyze-manifest --list-images --app myapp --manifest-tag "edge"

    Note: Using --manifest-tag excludes non-platform images and returns platform images only.

List tags

  • Like images, it's possible to list all tags, but the query must always be scoped to an application:

    releaser analyze-manifest --list-tags --app myapp

    Note: This will list all tags, including platform tags.

  • To exclude platform tags, use the --no-platform option:

    releaser analyze-manifest --list-tags --app myapp --no-platform
  • To list tags for a single platform, use the --platform option:

    releaser analyze-manifest --list-tags --app myapp --platform="linux/arm64"

    Note: Using --platform excludes non-platform tags and returns only plaform tags for any of given platforms only.

Build and publish artefacts for the manifest

  • Build all docker images at once using bake-manifest command:
releaser bake-manifest
  • Optionally, use --push command to push image to remote registries:
releaser bake-manifest --push

Upload the manifest

A command can be used to publish manifest using a POST request:

releaser upload-manifest --webhook $AZ_DEVOPS_WEBHOOK_URL

releaser's People

Contributors

pisua 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.