Skip to content
Snippets Groups Projects
Verified Commit 90a45b93 authored by Lars Bilke's avatar Lars Bilke
Browse files

[ci] Upload cpm cache snapshot as generic GitLab package.

parent 1efad559
No related branches found
No related tags found
No related merge requests found
...@@ -22,8 +22,8 @@ workflow: ...@@ -22,8 +22,8 @@ workflow:
when: never when: never
- if: $CI_MERGE_REQUEST_IID # merge requests - if: $CI_MERGE_REQUEST_IID # merge requests
- if: $CI_COMMIT_TAG # tags, ogs/ogs repo only - if: $CI_COMMIT_TAG # tags, ogs/ogs repo only
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # master, ogs/ogs repo only - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_PATH == "ogs/ogs"' # master, ogs/ogs repo only
- if: $CI_COMMIT_BRANCH =~ /^v[0-9]\.[0-9]\.[0-9]/ # release branches, e.g. v6.x.x - if: '$CI_COMMIT_BRANCH =~ /^v[0-9]\.[0-9]\.[0-9]/ && $CI_PROJECT_PATH == "ogs/ogs"' # release branches, e.g. v6.x.x
include: include:
- local: "scripts/ci/extends/*.yml" - local: "scripts/ci/extends/*.yml"
...@@ -50,3 +50,4 @@ include: ...@@ -50,3 +50,4 @@ include:
- local: "/scripts/ci/jobs/web.yml" - local: "/scripts/ci/jobs/web.yml"
- local: "/scripts/ci/jobs/container.yml" - local: "/scripts/ci/jobs/container.yml"
- local: "/scripts/ci/jobs/release.yml" - local: "/scripts/ci/jobs/release.yml"
- local: "/scripts/ci/jobs/package.yml"
create cpm cache:
stage: package
needs: [meta]
tags: [shell, envinf]
variables:
BUILD_DIR: "../build/cpm"
script:
- rm -rf $BUILD_DIR
- mkdir -p $BUILD_DIR
- cd $BUILD_DIR
- cmake ../../ogs -B . -G Ninja --preset release-all -DOGS_USE_POETRY=OFF -DCPM_SOURCE_CACHE=./cpm
- find cpm -type f | grep -i "\.git" | xargs rm -rf
- VERSION=$(find cpm -type f -print0 | sort -z | xargs -r0 sha1sum | awk '{print $1}' | sha1sum | awk '{print $1}')
- echo "VERSION=${VERSION}"
- tar -czf cpm.tar.gz cpm
- >
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file cpm.tar.gz \
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/cpm/${VERSION}/cpm.tar.gz
...@@ -43,5 +43,8 @@ ...@@ -43,5 +43,8 @@
"nbconvert==6.4.0", "nbconvert==6.4.0",
"pillow=9.0.0" "pillow=9.0.0"
] ]
},
"cpm": {
"cache_hash": "7190f14f7413a6954d2464f4a8e7016864eb8bc3"
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment