From c14ce299fea9782dfc0cffd8e0f5f31824ec8f37 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 4 Sep 2022 13:30:03 +0200 Subject: [PATCH] Changed urls for release, use native CI release --- .gitlab-ci.yml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ab67b06..0c11476 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,10 @@ stages: build_backend_glibc: stage: build image: reg.gitlab.mattv.de/root/docker-images/ubuntu_build_base:latest + cache: + key: backend_glibc + paths: + - vcpkg_cache script: - SRC="$PWD" - TMP=$(mktemp -d) @@ -17,10 +21,6 @@ build_backend_glibc: - VCPKG_DEFAULT_BINARY_CACHE=$SRC/vcpkg_cache cmake -B build -S backend -DCMAKE_TOOLCHAIN_FILE=$TMP/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release - cmake --build build - cp build/backend server - cache: - key: backend_glibc - paths: - - vcpkg_cache artifacts: paths: - server @@ -28,6 +28,10 @@ build_backend_glibc: build_backend_muslc: stage: build image: reg.gitlab.mattv.de/root/docker-images/alpine_build_base:latest + cache: + key: backend_muslc + paths: + - vcpkg_cache script: - SRC="$PWD" - TMP=$(mktemp -d) @@ -39,10 +43,6 @@ build_backend_muslc: - VCPKG_FORCE_SYSTEM_BINARIES=1 VCPKG_DEFAULT_BINARY_CACHE=$SRC/vcpkg_cache cmake -B build -S backend -DCMAKE_TOOLCHAIN_FILE=$TMP/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release - cmake --build build - cp build/backend server - cache: - key: backend_muslc - paths: - - vcpkg_cache artifacts: paths: - server @@ -117,7 +117,15 @@ create_release: rules: - if: $CI_COMMIT_TAG script: - - | - release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \ - --assets-link "{\"name\":\"linux-x64-glibc.tar\",\"url\":\"${PACKAGE_REGISTRY_URL}/linux-x64-glibc.tar\"}" \ - --assets-link "{\"name\":\"linux-x64-muslc.tar\",\"url\":\"${PACKAGE_REGISTRY_URL}/linux-x64-muslc.tar\"}" + - echo "running release_job" + release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties + tag_name: '$CI_COMMIT_TAG' + description: 'Release $CI_COMMIT_TAG' + assets: + links: + - name: 'linux-x64-glibc.tar' + url: ''${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/linux-x64-glibc/$CI_COMMIT_TAG/linux-x64-glibc.tar' + link_type: package + - name: 'linux-x64-muslc.tar' + url: ''${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/linux-x64-muslc/$CI_COMMIT_TAG/linux-x64-muslc.tar' + link_type: package