https://github.com/tarantool/rocks.tarantool.org
https://github.com/tarantool/rocks.tarantool.org
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tarantool/rocks.tarantool.org
- Owner: tarantool
- Created: 2019-11-13T10:52:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-23T02:04:22.000Z (about 3 years ago)
- Last Synced: 2025-03-06T08:34:02.667Z (over 1 year ago)
- Language: Python
- Size: 51.8 KB
- Stars: 2
- Watchers: 20
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.
```bash
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.
```yaml
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
```yaml
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.
```yaml
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](https://docs.gitlab.com/ee/ci/yaml/#overriding-external-template-values).