Skip to content
Snippets Groups Projects
.gitlab-ci.yml 2.66 KiB
Newer Older
sgmoore's avatar
sgmoore committed


---
include:
  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml

stages:
  - provisioning
  - build
  - publish
  - test
  - upload
  - release
  
variables:
  # Package version can only contain numbers (0-9), and dots (.).
  # Must be in the format of X.Y.Z, i.e. should match /\A\d+\.\d+\.\d+\z/ regular expresion.
  # See https://docs.gitlab.com/ee/user/packages/generic_packages/#publish-a-package-file
  PACKAGE_VERSION: "2.0"
sgmoore's avatar
sgmoore committed
  ARCH: 'all'
sgmoore's avatar
sgmoore committed
  LINUX_AMD64_BINARY: "{$CI_PROJECT_NAME}_${PACKAGE_VERSION}_{$ARCH}.deb"
sgmoore's avatar
sgmoore committed
  PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/2353/main/generic"
sgmoore's avatar
sgmoore committed
  VENDOR: 'netrunner'
  RELEASE:
    description: "The Debian release to build for"
    value: 'stable'
  #EXTRA_REPOSITORY: http://dci.ds9.pub/netrunner main
  #EXTRA_REPOSITORY_KEY: https://github.com/pangea-project/pangea-tooling/blob/master/dci/dci_apt.key
  SALSA_CI_DISABLE_VERSION_BUMP: 1
  SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1

sgmoore's avatar
sgmoore committed
# 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
#   script:
#     - dpkg --install *.deb

sgmoore's avatar
sgmoore committed
.test-crossbuild-arm64:
    extends: .test-crossbuild-package-arm64
    allow_failure: true

reprotest:
    extends: .test-reprotest
    allow_failure: true

lintian:
    extends: .test-lintian
    allow_failure: true

autopkgtest:
    extends: .test-autopkgtest
    allow_failure: true

blhc:
    extends: .test-blhc
    allow_failure: true

piuparts:
    extends: .test-piuparts
    allow_failure: true

missing-breaks:
    extends: .test-missing-breaks
    allow_failure: true

rc-bugs:
    extends: .test-rc-bugs
    allow_failure: true

aptly:
    extends: .publish-aptly
    allow_failure: true

upload:
  stage: upload
  image: curlimages/curl:latest
  script:
   - |
sgmoore's avatar
sgmoore committed
      curl --header "JOB-TOKEN: ${CI_JOB_TOKEN} Content-Type: application/octet-stream" --upload-file debian/output/${LINUX_AMD64_BINARY} ${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}
sgmoore's avatar
sgmoore committed
  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
  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}\"}"
  only:
  - master
  allow_failure: true