| 
 | 1 | +version: v1.0  | 
 | 2 | +name: gridinit-build  | 
 | 3 | + | 
 | 4 | +stages:  | 
 | 5 | +  - compile  | 
 | 6 | +  - package  | 
 | 7 | + | 
 | 8 | +jobs:  | 
 | 9 | +  - job: Test and compile  | 
 | 10 | +    stage: compile  | 
 | 11 | +    steps:  | 
 | 12 | +      - name: Checkout Application  | 
 | 13 | +        checkout: '{{ .cds.workspace }}'  | 
 | 14 | +      - name: Prepare system and install dependencies  | 
 | 15 | +        script: |  | 
 | 16 | +          #!/bin/bash  | 
 | 17 | +          cat $0  | 
 | 18 | +          set -ex  | 
 | 19 | +          PKG='apt-get install -y --no-install-recommends'  | 
 | 20 | +          export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true  | 
 | 21 | +          echo "tzdata tzdata/Areas select Europe" > /tmp/preseed.txt  | 
 | 22 | +          echo "tzdata tzdata/Zones/Europe select Brussels" >> /tmp/preseed.txt  | 
 | 23 | +          debconf-set-selections /tmp/preseed.txt  | 
 | 24 | +          apt-get update -q  | 
 | 25 | +          $PKG tzdata ca-certificates  | 
 | 26 | +          $PKG git pkg-config cmake make build-essential m4 autotools-dev autoconf automake libtool clang  | 
 | 27 | +          $PKG libglib2.0-dev jq  | 
 | 28 | +      - name: Compile local libdill (in order to be indenpendant from another package in testing)  | 
 | 29 | +        script: |  | 
 | 30 | +          #!/bin/bash  | 
 | 31 | +          cat $0  | 
 | 32 | +          set -ex  | 
 | 33 | +          cd vendor/libdill  | 
 | 34 | +          export CC=clang  | 
 | 35 | +          ./autogen.sh  | 
 | 36 | +          ./configure --prefix=/usr --enable-shared --disable-static --disable-tls --disable-threads  | 
 | 37 | +          make -j 8  | 
 | 38 | +          make install  | 
 | 39 | +      - name: Compile and install gridinit  | 
 | 40 | +        script: |  | 
 | 41 | +          #!/bin/bash  | 
 | 42 | +          cat $0  | 
 | 43 | +          set -ex  | 
 | 44 | +          export CC=clang  | 
 | 45 | +          cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=TRUE -DCMAKE_INSTALL_PREFIX=/usr .  | 
 | 46 | +          make -j 8  | 
 | 47 | +          make install  | 
 | 48 | +      - name: Test gridinit  | 
 | 49 | +        script: |  | 
 | 50 | +          #!/bin/bash  | 
 | 51 | +          cat $0  | 
 | 52 | +          set -ex  | 
 | 53 | +          export TMPDIR=/tmp  | 
 | 54 | +          ./tools/gridinit-genconf.sh 15  | 
 | 55 | +          gridinit -d -s gridinit /tmp/gridinit/gridinit.conf  | 
 | 56 | +          ./tools/cycle.sh  | 
 | 57 | +          pkill gridinit  | 
 | 58 | +    requirements:  | 
 | 59 | +      - model: ubuntu-bionic  | 
 | 60 | + | 
 | 61 | +  - job: Package  | 
 | 62 | +    stage: package  | 
 | 63 | +    steps:  | 
 | 64 | +      - name: Checkout application  | 
 | 65 | +        checkout: '{{ .cds.workspace }}'  | 
 | 66 | +      - name: Clone external-packages  | 
 | 67 | +        script:  | 
 | 68 | +          - eval $(worker key install --env-git proj-ssh-openio)  | 
 | 69 | +          - git clone {{ .cds.proj.STASH_URL }}/openio/external-packages.git /external-packages  | 
 | 70 | +      - name: Build package and upload  | 
 | 71 | +        script: |+  | 
 | 72 | +          #!/bin/bash  | 
 | 73 | +          cat $0  | 
 | 74 | +          set -x  | 
 | 75 | +          export REPO_URL="https://{{ .cds.proj.drive_mirrors_objectstorage_openio_user }}:{{ .cds.proj.drive_mirrors_objectstorage_openio_password }}@{{ .cds.proj.drive_mirrors_hostname }}"  | 
 | 76 | +          make -f /external-packages/ubuntu/bionic/Makefile.common install-apt-repo  | 
 | 77 | +          # dev or prod release  | 
 | 78 | +          if [[ "{{ .git.tag }}" =~  ^[0-9]+\. ]]; then  | 
 | 79 | +            export VERSION={{ .git.tag }}  | 
 | 80 | +            export REPO_SUBREPO=main  | 
 | 81 | +            export REPO_LIMIT=0  | 
 | 82 | +          else  | 
 | 83 | +            export VERSION=$(date +%Y%m%d%H%M).git{{ .git.hash.short }}  | 
 | 84 | +            export REPO_SUBREPO=dev  | 
 | 85 | +            export REPO_LIMIT=100  | 
 | 86 | +          fi  | 
 | 87 | +          export PACKAGE=gridinit  | 
 | 88 | +
  | 
 | 89 | +          make -f /external-packages/ubuntu/bionic/Makefile.common deb_changelog  | 
 | 90 | +          make -f /external-packages/ubuntu/bionic/Makefile.common  | 
 | 91 | +          make -f /external-packages/ubuntu/bionic/Makefile.common upload_to_repo  | 
 | 92 | +    requirements:  | 
 | 93 | +      - model: openio-debbuild-18.04  | 
0 commit comments