From 9601bade70ee3b546aff42b58c70003e412b47ca Mon Sep 17 00:00:00 2001
From: micah <micah@riseup.net>
Date: Thu, 23 May 2019 11:45:50 -0700
Subject: [PATCH] [pkg] Update package build.

. Update the registry path to current name
. Change to a publish stage
. Setup template builds, with buster to begin
---
 .gitlab-ci.yml | 56 ++++++++++++++++++++++++++++++--------------------
 1 file changed, 34 insertions(+), 22 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 31a0813..58e1477 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,28 +3,40 @@ stages:
   - build
   - push
   - trigger
+  - publish
 
-variables:
-  GOPATH: /go
-  APP_PATH: /go/src/0xacab.org/leap/bitmask-vpn
-
-deb:
-  image: 0xacab.org:4567/leap/docker/buster_amd64:latest
-  stage: build
-  allow_failure: false
+.job_template: &job_definition
+  stage: publish
+  # Only build packages for https://0xacab.org/leap/bitmask-dev, not
+  # for forks
+  image: "0xacab.org:4567/leap/gitlab-buildpackage:build_${DIST}_${ARCH}"
   script:
-      - git checkout incoming
-      - git config user.name "Gitlab CI"
-      - git config user.email "gitlabci@0xacab.org"
-      - git checkout origin/master debian/ helpers/
-      - git add debian/* helpers/*
-      - git commit -m 'autocommit for debian folder'
-      - gbp buildpackage --git-ignore-new --git-force-create --git-upstream-tree=SLOPPY --git-no-pristine-tar --git-debian-branch=incoming --git-builder='debuild -us -uc'
-      - mv ../*.deb .
-  tags:
-    - linux
+    - "pwd; git describe"
+    - git checkout incoming
+    - git checkout origin/master debian/ helpers/
+    #- build-build-package
+    # Test the package with lintian
+    #- build-test-lintian
+    #- upload-package
+    # sleep 1h to allow debugging of running container
+    - sleep 9999
   artifacts:
-    name: debian_$CI_COMMIT_REF_NAME
-    paths: 
-      - ./*.deb
-    expire_in: 1 month
+    expire_in: 1w
+    paths:
+    - '*_*.xz'
+    - '*_*.dsc'
+    - '*_amd64.changes'
+    - '*.deb'
+    - 'results/*'
+
+package:amd64_stretch:
+  variables:
+    ARCH: "amd64"
+    DIST: "stretch"
+    REPONAMES: "client"
+    # Default is to fail on warnings, we disable it here
+    # unless all lintian warnings are fixed (#9033)
+    LINTIAN_OPTS: "-X filename-length, --suppress-tags newer-standards-version"
+  <<: *job_definition
+
+
-- 
GitLab