Compare commits

..

No commits in common. "d784de6bde68294ca2aeb6c46dcec91b0a4a7913" and "13e28a463a59cc5a51e2c5368a25d3cda0491a57" have entirely different histories.

1 changed files with 40 additions and 55 deletions

View File

@ -2,63 +2,48 @@ kind: pipeline
name: default name: default
type: docker type: docker
clone:
tags: true
steps: steps:
- name: composer # - name: composer
pull: if-not-exists # pull: if-not-exists
image: composer # image: composer
commands: # commands:
- composer install --prefer-dist # - composer install --prefer-dist
#
- name: test # - name: test
image: lorisleiva/laravel-docker # image: lorisleiva/laravel-docker
commands: # commands:
- ./vendor/bin/phpunit # - ./vendor/bin/phpunit
#
- name: github # - name: github
image: alpine/git # image: alpine/git
environment: # environment:
SSH_KEY: # SSH_KEY:
from_secret: id_rsa # from_secret: id_rsa
SSH_KEY_PUB: # SSH_KEY_PUB:
from_secret: id_rsa_pub # from_secret: id_rsa_pub
commands: # commands:
- mkdir ~/.ssh # - mkdir ~/.ssh
- echo "$SSH_KEY" | tr -d '\r' > ~/.ssh/id_rsa # - echo "$SSH_KEY" | tr -d '\r' > ~/.ssh/id_rsa
- echo "$SSH_KEY_PUB" | tr -d '\r' > ~/.ssh/id_rsa.pub # - echo "$SSH_KEY_PUB" | tr -d '\r' > ~/.ssh/id_rsa.pub
- chmod 755 ~/.ssh # - chmod 755 ~/.ssh
- chmod 600 ~/.ssh/id_rsa # - chmod 600 ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa.pub # - chmod 600 ~/.ssh/id_rsa.pub
- eval $(ssh-agent) # - eval $(ssh-agent)
- ssh-add ~/.ssh/id_rsa # - ssh-add ~/.ssh/id_rsa
- ssh-keyscan -H 'github.com' >> ~/.ssh/known_hosts # - ssh-keyscan -H 'github.com' >> ~/.ssh/known_hosts
- git remote add github git@github.com:muhep06/dgd-backupper-php.git # - git remote add github git@github.com:muhep06/dgd-backupper-php.git
- git push github master --tags # - git push github master -f
- name: build - name: build
image: lorisleiva/laravel-docker image: lorisleiva/laravel-docker
commands: commands:
- composer global require humbug/box - curl -s https://api.github.com/repos/pantheon-systems/autotag/releases/latest | \
- git pull origin master --tags grep browser_download | \
- php backupper app:build --build-version=$(git describe --abbrev=0 --tags) -n grep Linux | \
- php builds/backupper cut -d '"' -f 4 | \
when: xargs curl -o ./autotag -L \
event: tag && chmod 755 ./autotag
- autotag
- name: publish # - composer global require humbug/box
image: lorisleiva/laravel-docker # - php backupper app:build --build-version -n
environment: # - php builds/backupper
GITHUB_TOKEN:
from_secret: api_key
commands:
- git pull origin master --tags
- wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2
- tar xjf linux-amd64-github-release.tar.bz2
- chmod +x ./bin/linux/amd64/github-release
- mv ./bin/linux/amd64/github-release .
- ./github-release release --user muhep06 --repo dgd-backupper-php --tag $(git describe --abbrev=0 --tags) --name "$(git describe --abbrev=0 --tags)"
- ./github-release upload --user muhep06 --repo dgd-backupper-php --tag $(git describe --abbrev=0 --tags) --name "backupper" --file ./builds/backupper
when:
event: tag