Browse Source

Apply registry upload for releases

technical/upgrade-exoplayer
Georg Krause 2 years ago
parent
commit
c56d6a6452
No known key found for this signature in database
GPG Key ID: 2970D504B2183D22
  1. 16
      .gitlab-ci.yml

16
.gitlab-ci.yml

@ -137,8 +137,8 @@ build-bleeding-edge:
.deploy: .deploy:
image: curlimages/curl:latest image: curlimages/curl:latest
before_script: script:
- apt update && apt -y install openssh-server - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file $FILE "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/$PACKAGE/$CI_COMMIT_SHORT_SHA/$PACKAGE-$CI_COMMIT_SHORT_SHA.apk"'
deploy-develop: deploy-develop:
extends: .deploy extends: .deploy
@ -148,18 +148,12 @@ deploy-develop:
variables: variables:
FILE: app/build/outputs/apk/debug/app-debug.apk FILE: app/build/outputs/apk/debug/app-debug.apk
PACKAGE: audio.funkwhale.ffa.dev PACKAGE: audio.funkwhale.ffa.dev
script:
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file $FILE "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/$PACKAGE/$CI_COMMIT_SHORT_SHA/$PACKAGE-$CI_COMMIT_SHORT_SHA.apk"'
deploy-release: deploy-release:
extends: .deploy extends: .deploy
stage: deploy stage: deploy
only: only:
- tags - tags
script: variables:
- eval `ssh-agent -s` FILE: app/build/outputs/apk/release/app-release.apk
- ssh-add <(echo "$SSH_PRIVATE_KEY") PACKAGE: audio.funkwhale.ffa
- scp -P22103 -o StrictHostKeyChecking=no app/build/outputs/apk/release/app-release.apk fdroid@apps.funkwhale.audio:/srv/fdroid/fdroid/develop/repo/audio.funkwhale.ffa-$CI_COMMIT_TAG.apk
- scp -P22103 -o StrictHostKeyChecking=no app/build/outputs/apk/release/output-metadata.json fdroid@apps.funkwhale.audio:/srv/fdroid/fdroid/develop/output-metadata.json
- scp -P22103 -o StrictHostKeyChecking=no metadata/audio.funkwhale.android.yml fdroid@apps.funkwhale.audio:/srv/fdroid/fdroid/develop/metadata/audio.funkwhale.ffa.yml
- ssh -p22103 -o StrictHostKeyChecking=no fdroid@apps.funkwhale.audio 'docker run --rm -u $(id -u):$(id -g) -v /srv/fdroid/fdroid/develop:/repo registry.gitlab.com/fdroid/docker-executable-fdroidserver:master update'

Loading…
Cancel
Save