Skip to content
Snippets Groups Projects
Commit 23c90070 authored by sgmoore's avatar sgmoore
Browse files

Update .gitlab-ci.yml

parent c8740d01
No related branches found
No related tags found
No related merge requests found
Pipeline #5292 passed with warnings
......@@ -10,7 +10,6 @@ stages:
- publish
- test
- upload
- release
variables:
# Package version can only contain numbers (0-9), and dots (.).
......@@ -18,8 +17,8 @@ variables:
# See https://docs.gitlab.com/ee/user/packages/generic_packages/#publish-a-package-file
PACKAGE_VERSION: "2.0"
ARCH: 'all'
LINUX_AMD64_BINARY: "{$CI_PROJECT_NAME}_${PACKAGE_VERSION}_{$ARCH}.deb"
PACKAGE_REGISTRY_URL: 'https://opencode/netrunner/projects/2353/repository/files/'
LINUX_AMD64_BINARY: "${CI_PROJECT_NAME}_${PACKAGE_VERSION}_${ARCH}.deb"
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/2353/packages/generic/${CI_PROJECT_NAME}/${PACKAGE_VERSION}/${LINUX_AMD64_BINARY}"
VENDOR: 'netrunner'
RELEASE:
description: "The Debian release to build for"
......@@ -29,20 +28,23 @@ variables:
SALSA_CI_DISABLE_VERSION_BUMP: 1
SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1
# download:
# stage: deps
# script:
# - 'wget --header="JOB-TOKEN: $CI_JOB_TOKEN" ${PACKAGE_REGISTRY_URL}/base-files_10.3_amd64.deb'
# - 'dpkg --install base-files_10.3_amd64.deb'
# deps:
# needs:
# - project: https://www.opencode.net/netrunner/base-files
# job: build
# ref: master
# artifacts: true
provisioning-clean-git-repo:
stage: provisioning
image: $SALSA_CI_IMAGES_GBP
script: git clean -d --force
provisioning-extract-source:
extends: .provisioning-extract-source
# build-script-deps:
# stage: build
# extends: .build-script
# script:
# - dpkg --install *.deb
# - |
# apt update
# apt install -yy wget
# wget --header="JOB-TOKEN: $CI_JOB_TOKEN" ${CI_API_V4_URL}/projects/2353/packages/generic/base-files-desktop/11.4/base-files_11.4_amd64.deb
# dpkg --install *.deb
.test-crossbuild-arm64:
extends: .test-crossbuild-package-arm64
......@@ -80,25 +82,27 @@ aptly:
extends: .publish-aptly
allow_failure: true
upload:
upload-aptly:
stage: upload
image: curlimages/curl:latest
image: debian:stable
script:
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" -H 'Content-Type: application/octet-stream' --upload-file debian/output/${LINUX_AMD64_BINARY} ${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}
apt update
apt install -yy openssh-client
chmod 600 /builds/netrunner/${CI_PROJECT_NAME}.tmp/aptly_ssh_key
ls -l /builds/netrunner/${CI_PROJECT_NAME}.tmp/aptly_ssh_key
scp -o StrictHostKeyChecking=no -P 3138 -i ${aptly_ssh_key} debian/output/*.{tar.xz,deb} \
aptly@repo.netrunner.com:/mnt/volume_fra1_01/repo.netrunner.com/temp
only:
- master
allow_failure: true
release:
# Caution, as of 2021-02-02 these assets links require a login, see:
# https://gitlab.com/gitlab-org/gitlab/-/issues/299384
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
upload-registry:
stage: upload
image: curlimages/curl:latest
script:
- |
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
--assets-link "{\"name\":\"${LINUX_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}\"}"
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file debian/output/${LINUX_AMD64_BINARY} ${PACKAGE_REGISTRY_URL}
only:
- master
allow_failure: true
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