tarantool / rocks.tarantool.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tarantool Rocks Server

Uploading new rocks

You can upload .rockspec, .src.rock, .all.rock, but please don't upload any platform-dependent .*.rock.

To upload a file one must be authorized and have ROCKS_AUTH credentials.

curl --fail \
  -u $ROCKS_AUTH https://rocks.tarantool.org \
  -X PUT -F "rockspec=@mymodule-scm-1.src.rock"

Github Actions integration

To use this action one must set the ROCKS_AUTH secret in the repository that contains the workflow.

env:
  ROCK_NAME: mymodule

jobs:
  publish-scm-1:
    steps:
      - uses: actions/checkout@v2
      - uses: tarantool/rocks.tarantool.org/github-action@master
        with:
          auth: ${{ secrets.ROCKS_AUTH }}
          files: ${{ env.ROCK_NAME }}-scm-1.rockspec

  publish-tag:
    if: startsWith(github.ref, 'refs/tags/')
    steps:
      - uses: actions/checkout@v2
      - uses: tarantool/setup-tarantool@v1
        with:
          tarantool-version: '2.5'

      - run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
      - run: tarantoolctl rocks new_version --tag ${{ env.TAG }}
      - run: sed -i '/branch = "master"/d' ${{ env.ROCK_NAME }}-${{ env.TAG }}-1.rockspec
      - run: tarantoolctl rocks install ${{ env.ROCK_NAME }}-${{ env.TAG }}-1.rockspec
      - run: tarantoolctl rocks pack ${{ env.ROCK_NAME }}-${{ env.TAG }}-1.rockspec
      - run: tarantoolctl rocks pack ${{ env.ROCK_NAME }} ${{ env.TAG }}

      - uses: tarantool/rocks.tarantool.org/github-action@master
        with:
          auth: ${{ secrets.ROCKS_AUTH }}
          files: |
            ${{ env.ROCK_NAME }}-${{ env.TAG }}-1.rockspec
            ${{ env.ROCK_NAME }}-${{ env.TAG }}-1.src.rock
            ${{ env.ROCK_NAME }}-${{ env.TAG }}-1.all.rock

Travis CI integration

env:
  global:
    - ROCK_NAME=mymodule

jobs:
  include:
    # - tests
    - stage: deploy
      script: skip
      deploy:
        - provider: script
          script: curl --fail
            -u $ROCKS_AUTH https://rocks.tarantool.org
            -X PUT -F rockspec=@$ROCK_NAME-scm-1.rockspec
        - on:
            tags: true
            all_branches: true
          provider: script
          script: cat $ROCK_NAME-scm-1.rockspec |
            sed -E
              -e "s/branch = '.+'/tag = '$TRAVIS_TAG'/g"
              -e "s/version = '.+'/version = '$TRAVIS_TAG-1'/g" |
            curl --fail
              -u $ROCKS_AUTH https://rocks.tarantool.org
              -X PUT -F "rockspec=@-;filename=$ROCK_NAME-$TRAVIS_TAG-1.rockspec"

Gitlab CI integration

Add ROCKS_USERNAME and ROCKS_PASSWORD build variables.

stages:
  - test
  - publish

include:
  remote: https://tarantool.github.io/rocks.tarantool.org/helpers/gitlab-publish-rockspec.yml

That's it. For advanced usage see how to tune external tasks.

About


Languages

Language:Python 77.1%Language:Lua 22.8%Language:Procfile 0.1%