diff --git a/.github/workflows/goreleaser.yaml b/.github/workflows/goreleaser.yaml index 420d5b7..1fa9f8b 100644 --- a/.github/workflows/goreleaser.yaml +++ b/.github/workflows/goreleaser.yaml @@ -19,6 +19,12 @@ jobs: uses: crazy-max/ghaction-import-gpg@v5 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + - name: Install ceph + run: | + wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add - + echo "deb https://download.ceph.com/debian-pacific/ ${VERSION_CODENAME} main" | sudo tee /etc/apt/sources.list.d/ceph.list + sudo apt-get update + sudo apt-get install -y libcephfs-dev librbd-dev librados-dev - name: Run GoReleaser uses: goreleaser/goreleaser-action@v3 with: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 405c2d8..e4393ba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,9 +12,18 @@ include: - template: Security/Dependency-Scanning.gitlab-ci.yml - template: Security/Secret-Detection.gitlab-ci.yml +.install_ceph: + before_script: + - wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add - + - source /etc/os-release + - echo "deb https://download.ceph.com/debian-pacific/ ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/ceph.list + - apt-get update + - apt-get install -y libcephfs-dev librbd-dev librados-dev + build: stage: build image: golang:1.17 + extends: .install_ceph script: - make build artifacts: @@ -37,6 +46,7 @@ secret_detection: golang-lint: stage: qa needs: [] + extends: .install_ceph image: golangci/golangci-lint:v1.45 script: - golangci-lint run -v @@ -45,6 +55,7 @@ test-go-generate: stage: qa needs: [] image: golang:1.17 + extends: .install_ceph variables: TERRAFORM_VERSION: 1.1.8 script: @@ -74,14 +85,14 @@ release: image: name: goreleaser/goreleaser:v1.9.2 entrypoint: [''] + extends: .install_ceph only: - tags variables: # Disable shallow cloning so that goreleaser can diff between tags to # generate a changelog. GIT_DEPTH: 0 - before_script: + script: - apk add gpg-agent - gpg --import < $GPG_PRIVATE_KEY_FILE - script: - goreleaser release --rm-dist