Skip to content

Commit

Permalink
itlabci: github: install ceph for go-ceph
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
  • Loading branch information
MrFreezeex committed Jun 23, 2022
1 parent eaaaa1f commit e35ba1f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 13 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -45,6 +55,7 @@ test-go-generate:
stage: qa
needs: []
image: golang:1.17
extends: .install_ceph
variables:
TERRAFORM_VERSION: 1.1.8
script:
Expand Down Expand Up @@ -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

0 comments on commit e35ba1f

Please sign in to comment.