Skip to content

cd: add package deploy workflow #157

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

Merged
merged 1 commit into from
Dec 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: packaging

on:
push:
tags:
- '*'

jobs:
package:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
platform:
- { os: 'debian', dist: 'stretch' }
- { os: 'debian', dist: 'buster' }
- { os: 'debian', dist: 'bullseye' }
- { os: 'el', dist: '7' }
- { os: 'el', dist: '8' }
- { os: 'fedora', dist: '30' }
- { os: 'fedora', dist: '31' }
- { os: 'fedora', dist: '32' }
- { os: 'fedora', dist: '33' }
- { os: 'fedora', dist: '34' }
- { os: 'opensuse-leap', dist: '15.1' }
- { os: 'opensuse-leap', dist: '15.2' }
- { os: 'ubuntu', dist: 'xenial' }
- { os: 'ubuntu', dist: 'bionic' }
- { os: 'ubuntu', dist: 'focal' }
- { os: 'ubuntu', dist: 'groovy' }
- { os: 'ubuntu', dist: 'hirsute' }

env:
OS: ${{ matrix.platform.os }}
DIST: ${{ matrix.platform.dist }}

steps:
- name: Clone the module
uses: actions/checkout@v2

- name: Clone the packpack tool
uses: actions/checkout@v2
with:
repository: packpack/packpack
path: packpack

- name: Create packages
run: ./packpack/packpack

- name: Deploy packages
env:
RWS_URL_PART: https://rws.tarantool.org/release/enabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question to @LeonidVas: I would re-check correctness of RWS logic here (just in case). Can you list all repositories, where the package will land?

Copy link
Contributor

@LeonidVas LeonidVas Nov 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep.

"enabled": [
        "modules",
        "1.10",
        "2.1",
        "2.2",
        "2.3",
        "2.4",
        "2.5",
        "2.6",
        "2.7",
        "2.8",
        "2.9"
      ]

multiply by

          - { os: 'debian', dist: 'stretch' }
          - { os: 'debian', dist: 'buster' }
          - { os: 'debian', dist: 'bullseye' }
          - { os: 'el', dist: '7' }
          - { os: 'el', dist: '8' }
          - { os: 'fedora', dist: '30' }
          - { os: 'fedora', dist: '31' }
          - { os: 'fedora', dist: '32' }
          - { os: 'fedora', dist: '33' }
          - { os: 'fedora', dist: '34' }
          - { os: 'opensuse-leap', dist: '15.1' }
          - { os: 'opensuse-leap', dist: '15.2' }
          - { os: 'ubuntu', dist: 'xenial' }
          - { os: 'ubuntu', dist: 'bionic' }
          - { os: 'ubuntu', dist: 'focal' }
          - { os: 'ubuntu', dist: 'groovy' }
          - { os: 'ubuntu', dist: 'hirsute' }

Excluding repositories where the package build failed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will not push to live repositories?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://rws.tarantool.org/release/... - will push only to release

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created issue #158

RWS_AUTH: ${{ secrets.RWS_AUTH }}
PRODUCT_NAME: tarantool-queue
run: |
CURL_CMD="curl -LfsS \
-X PUT ${RWS_URL_PART}/${OS}/${DIST} \
-u ${RWS_AUTH} \
-F product=${PRODUCT_NAME}"

for f in $(ls -I '*build*' -I '*.changes' ./build); do
CURL_CMD+=" -F $(basename ${f})=@./build/${f}"
done

echo ${CURL_CMD}

${CURL_CMD}