From 1521aa96cecd5973b42ac549a5855eb202596144 Mon Sep 17 00:00:00 2001 From: s3lph <1375407-s3lph@users.noreply.gitlab.com> Date: Thu, 5 Oct 2023 00:29:40 +0200 Subject: [PATCH] fix: ci --- .gitlab-ci.yml | 54 +------------------------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0103a13..ef10096 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ build_debian: script: - find package/debian -name .gitkeep -delete # Copy example plugin - - install -m0644 examples/plugins/example.py package/debian/spaceapi-server/etc/spaceapi-server/plugins/example.py + - install -m0644 examples/plugins/filestate.py package/debian/spaceapi-server/etc/spaceapi-server/plugins/filestate.py # Create control - | cat > package/debian/spaceapi-server/DEBIAN/control <" >> package/archlinux/spaceapi-server.changelog - cat CHANGELOG.md | grep -A 1000 "<"'!'"-- BEGIN CHANGES ${version} -->" | grep -B 1000 "<"'!'"-- END CHANGES ${version} -->" | tail -n +2 | head -n -1 | sed -re 's/^-/\t*/g' >> package/archlinux/spaceapi-server.changelog - echo >> package/archlinux/spaceapi-server.changelog - done - # Copy license - - install -m0644 LICENSE package/archlinux/spaceapi-server/usr/share/licenses/spaceapi-server/LICENSE - # Install spaceapi-server into pkgdir - - python setup.py egg_info -d -b +main install --root=package/archlinux/spaceapi-server/ --prefix=/usr --optimize=1 - - cd package/archlinux - # Remove spaceapi-server script - - rm -rf spaceapi-server/usr/bin - # Build the package - - sed -re "s/__VERSION__/${SPACEAPI_SERVER_VERSION}/g" -i PKGBUILD - - sudo -u nobody makepkg -c - # Run namcap - - sudo -u nobody namcap *.pkg.tar.* - # Generate checksum - - sha256sum *.pkg.tar.* > SHA256SUMS - artifacts: - paths: - - "package/archlinux/*.pkg.tar.*" - - package/archlinux/SHA256SUMS - only: - - tags - -build_docker: - stage: build - script: - - docker build -t "registry.gitlab.com/s3lph/spaceapi-server:$CI_COMMIT_SHA" -f package/docker/Dockerfile . - - docker tag "registry.gitlab.com/s3lph/spaceapi-server:$CI_COMMIT_SHA" "registry.gitlab.com/s3lph/spaceapi-server:$CI_COMMIT_REF_NAME" - - if [[ -n "$CI_COMMIT_TAG" ]]; then docker tag "registry.gitlab.com/s3lph/spaceapi-server:$CI_COMMIT_SHA" "registry.gitlab.com/s3lph/spaceapi-server:$CI_COMMIT_TAG"; fi - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_TOKEN registry.gitlab.com - - docker push "registry.gitlab.com/s3lph/spaceapi-server:$CI_COMMIT_SHA" - - docker push "registry.gitlab.com/s3lph/spaceapi-server:$CI_COMMIT_REF_NAME" - - if [[ -n "$CI_COMMIT_TAG" ]]; then docker push "registry.gitlab.com/s3lph/spaceapi-server:$CI_COMMIT_TAG"; fi - only: - - tags - - release: stage: release