-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from leoleovich/update-ci
Update the CI
- Loading branch information
Showing
15 changed files
with
169 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,22 +14,25 @@ jobs: | |
strategy: | ||
matrix: | ||
go: | ||
- ^1.19 | ||
- ^1.20 | ||
- ^1.21 | ||
- ^1.22 | ||
- ^1.23 | ||
- ^1 | ||
steps: | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install -y libacl1-dev | ||
GO111MODULE=off go get golang.org/x/lint/golint | ||
go install golang.org/x/lint/golint@latest | ||
go install github.com/goreleaser/nfpm/v2/cmd/[email protected] | ||
- name: Test | ||
run: | | ||
|
@@ -46,8 +49,6 @@ jobs: | |
build: | ||
name: Build packages | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ${{ github.repository }}:builder | ||
|
||
outputs: | ||
deb: ${{ steps.build.outputs.deb }} | ||
|
@@ -56,8 +57,19 @@ jobs: | |
md5sum: ${{ steps.build.outputs.md5sum }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Checkout | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ^1 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install -y libacl1-dev | ||
go install github.com/goreleaser/nfpm/v2/cmd/[email protected] | ||
- name: Build packages | ||
id: build | ||
run: | | ||
|
@@ -67,7 +79,7 @@ jobs: | |
make packages | ||
make github_artifact | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: packages | ||
path: artifact | ||
|
@@ -77,7 +89,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
name: Checkout | ||
- name: Build docker images | ||
run: | | ||
|
@@ -96,23 +108,27 @@ jobs: | |
strategy: | ||
matrix: | ||
os: | ||
- debian:9 | ||
- debian:10 | ||
- ubuntu:18.04 | ||
- debian:11 | ||
- debian:12 | ||
- ubuntu:20.04 | ||
- centos:7 | ||
- ubuntu:22.04 | ||
- ubuntu:24.04 | ||
- centos:8 | ||
- fedora:40 | ||
- fedora:41 | ||
- fedora:42 | ||
|
||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v2 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: packages | ||
- name: Test deb | ||
if: ${{ contains(matrix.os, 'debian') || contains(matrix.os, 'ubuntu') }} | ||
run: | | ||
apt-get install libacl1; dpkg -i grafsy_0.0.0.1*deb | ||
- name: Test rpm | ||
if: ${{ contains(matrix.os, 'centos') }} | ||
if: ${{ contains(matrix.os, 'centos') || contains(matrix.os, 'fedora') }} | ||
run: | | ||
rpm -i grafsy-0.0.0.1*rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,23 +10,31 @@ jobs: | |
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: ${{ github.repository }}:builder | ||
|
||
outputs: | ||
deb: ${{ steps.build.outputs.deb }} | ||
rpm: ${{ steps.build.outputs.rpm }} | ||
sha256sum: ${{ steps.build.outputs.sha256sum }} | ||
md5sum: ${{ steps.build.outputs.md5sum }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Checkout | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ^1 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
with: | ||
# Otherwise there's a risk to not get latest tag | ||
# We hope, that the current commit at | ||
# least 50 commits close to the latest release | ||
fetch-depth: 50 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install -y libacl1-dev | ||
go install github.com/goreleaser/nfpm/v2/cmd/[email protected] | ||
- name: Build packages | ||
id: build | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# | ||
# Image which contains the binary artefacts | ||
# | ||
FROM golang:bookworm AS build | ||
|
||
|
||
COPY . ./grafsy | ||
|
||
WORKDIR ./grafsy | ||
|
||
RUN apt update && \ | ||
apt install -y libacl1-dev && \ | ||
make clean test && \ | ||
make build | ||
|
||
# | ||
# Application image | ||
# | ||
FROM debian:stable-slim | ||
|
||
RUN apt-get update && apt-get install libacl1 -y && apt-get clean && mkdir /etc/grafsy | ||
|
||
WORKDIR /grafsy | ||
|
||
COPY --from=build /go/grafsy/build/grafsy ./grafsy | ||
|
||
COPY --from=build /go/grafsy/build/grafsy-client ./grafsy-client | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["/grafsy/grafsy"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// +build !noacl | ||
//go:build !noacl | ||
|
||
package grafsy | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
module github.com/leoleovich/grafsy | ||
|
||
go 1.14 | ||
go 1.21.0 | ||
|
||
toolchain go1.23.3 | ||
|
||
require ( | ||
github.com/BurntSushi/toml v0.3.1 | ||
github.com/naegelejd/go-acl v0.0.0-20200406162857-ebe394c522e5 | ||
github.com/pelletier/go-toml/v2 v2.2.3 | ||
github.com/pkg/errors v0.9.1 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= | ||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= | ||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | ||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
github.com/naegelejd/go-acl v0.0.0-20200406162857-ebe394c522e5 h1:R10+S1Knv6udBjyDYU84+zD5R8qLWg7wSH/ddhJSzX4= | ||
github.com/naegelejd/go-acl v0.0.0-20200406162857-ebe394c522e5/go.mod h1:nMzsOoQWESVMF6s+hAF8Qnc14fUIpL7pfmGm6MV8B2g= | ||
github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= | ||
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= | ||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= | ||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | ||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= | ||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= | ||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= | ||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= |
Oops, something went wrong.