Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate container image publishing #174

Closed
epuertat opened this issue Aug 7, 2023 · 2 comments
Closed

Automate container image publishing #174

epuertat opened this issue Aug 7, 2023 · 2 comments

Comments

@epuertat
Copy link
Member

epuertat commented Aug 7, 2023

At least on release/tag creation, we should provide a Github action to push containers to the quay.io registry. This could be achieved with the following changes in the current CI action (QUAY_IO_PASSWORD and QUAY_IO_USERNAME have already been added to the Github repo config):

on:
  push:
    ...
    tags:        
      - 'v*'
  ...
      - name: Get subsystems
        run: |
          # https://github.com/actions/toolkit/issues/766
          shopt -s expand_aliases
          eval $(make alias)
          nvmeof-cli get_subsystems
      # If the CI was OK, then let's push the container images
      - name: Publish new containers
        if: startsWith(github.ref, 'refs/tags/v')
        run: |
           docker login -u="${{ vars.QUAY_IO_USERNAME }}" -p="${{ secrets.QUAY_IO_PASSWORD }}"
           make push
   ...

Or this, if we only want to publish containers for releases (and not for every tag):

on:
  release:
    types: [created]
  ...
      # If the CI was OK, then let's push the container images
      - name: Publish new containers
        if: github.event_name == 'release' && github.event.action == 'created'
        run: |
           docker login -u="${{ vars.QUAY_IO_USERNAME }}" -p="${{ secrets.QUAY_IO_PASSWORD }}"
           make push
   ...

This process still requires the manual step of increasing the version number in:

  • .env: NVMEOF_VERSION
  • pyproject.toml: version

It'd be ideal if we can remove the version literals from those files and dynamically feed the version number from the last git tag with git describe --tag --abbrev=0.

References:

@github-project-automation github-project-automation bot moved this to 🆕 New in NVMe-oF Aug 7, 2023
@epuertat epuertat changed the title Automate container creation Automate container image publishing Aug 7, 2023
@caroav
Copy link
Collaborator

caroav commented Aug 31, 2023

@barakda this one can be closed?

@barakda
Copy link
Collaborator

barakda commented Sep 6, 2023

closing this issue as it was implemented through PR180.

@barakda barakda closed this as completed Sep 6, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NVMe-oF Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants