Skip to content

Commit

Permalink
use github restapi to upload rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpintarelli committed Aug 28, 2024
1 parent 4d556c4 commit b2be786
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions ci/cscs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,37 @@ build aarch64:
variables:
PERSIST_IMAGE_NAME: $CSCS_REGISTRY_PATH/base/public/slurm-uenv-mount-aarch64

.build rpm:
.build rpm upload artifact:
variables:
CSCS_NOTIFICATION_CONTEXT: "$slurm_version"
script:
- |
_rpm_build_dir=./
mkdir -p ${_rpm_build_dir}
CXX=g++-12 CC=gcc-12 /src/rpm/make-rpm.sh --slurm-version "${slurm_version}" ${_rpm_build_dir}
rpm=$(find RPMS -name '*.rpm')
echo "$rpm"
binary_rpm=$(find RPMS -name '*.rpm')
# upload release
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GHUB_WRITE_TOKEN}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/octet-stream" \
"https://uploads.github.com/repos/eth-cscs/slurm-uenv-mount/releases/${CI_COMMIT_REF_NAME}/assets?name=$(basename ${binary_rpm})" \
--data-binary "@${binary_rpm}"
build rpm x86_64:
build rpm x86_64 and upload artifact:
needs: ["build x86_64"]
image: $CSCS_REGISTRY_PATH/base/public/slurm-uenv-mount-x86_64
stage: build rpm x86_64
extends: ['.build rpm', .container-runner-eiger-mc]
stage: build rpm x86_64
extends: ['.build rpm upload artifact', .container-runner-eiger-mc]

build rpm aarch64:
build rpm aarch64 and upload artifact:
needs: ["build aarch64"]
image: $CSCS_REGISTRY_PATH/base/public/slurm-uenv-mount-aarch64
stage: build rpm aarch64
extends: ['.build rpm', .f7t-container-runner]
extends: ['.build rpm upload artifact', .f7t-container-runner]
variables:
F7T_URL: 'https://firecrest-todi.v1.tds.cscs.ch'
FIRECREST_SYSTEM: 'todi'
Expand Down

0 comments on commit b2be786

Please sign in to comment.