Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .github/workflows/release-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,33 @@ jobs:
export release_tag=${{ env.RELEASE_TAG }}
export release_version=${release_tag/v/} # Remove v from tag name
echo "DYNAMIC_BINARY_NAME=finch-daemon-${release_version}-linux-amd64.tar.gz" >> $GITHUB_ENV
echo "STATIC_BINARY_NAME=finch-daemon-${release_version}-linux-amd64-static.tar.gz" >> $GITHUB_ENV

mkdir release
- name: Install Go licenses
run: go install github.com/google/go-licenses@latest
- name: Create Third Party Licences File
run: make licenses
- name: Install Dependencies for e2e Testing
run: ./setup-test-env.sh
# - name: setup static dependecies
# run: |
# sudo apt-get update
# sudo apt-get install glibc-static libstdc++-static
# sudo apt install libstdc++-12-dev
# sudo apt-get install libc6-dev
- name: Create release binaries
run: make RELEASE_TAG=${{ env.RELEASE_TAG }} release
- name: Verify Release version
run: |
mkdir output
tar -xzf release/${{ env.DYNAMIC_BINARY_NAME }} -C ./output
BINARY_VERSION=$(./output/finch-daemon --version | grep -oP '\d+\.\d+\.\d+')
mkdir -p output/static output/dynamic
tar -xzf release/${{ env.DYNAMIC_BINARY_NAME }} -C ./output/dynamic
tar -xzf release/${{ env.STATIC_BINARY_NAME }} -C ./output/static
DYNAMIC_BINARY_VERSION=$(./output/dynamic/finch-daemon --version | grep -oP '\d+\.\d+\.\d+')
STATIC_BINARY_VERSION=$(./output/static/finch-daemon --version | grep -oP '\d+\.\d+\.\d+')
export release_tag=${{ env.RELEASE_TAG }}
export release_version=${release_tag/v/}
if ["$BINARY_VERSION" != "$release_version"]; then
if ["$STATIC_BINARY_VERSION" != "$release_version"] || ["$DYNAMIC_BINARY_VERSION" != "$release_version"]; then
echo "Version mismatch"
exit 1
fi
Expand Down Expand Up @@ -95,6 +106,6 @@ jobs:
tag_name: ${{ needs.generate-artifacts.outputs.release_tag }}
prerelease: false
generate_release_notes: false
files: |
files: |-
${{ needs.generate-artifacts.outputs.dynamic_binary_name }}
${{ needs.generate-artifacts.outputs.dynamic_binary_name }}.sha256sum
123 changes: 123 additions & 0 deletions .github/workflows/testing-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Release Finch Daemon
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
branches:
- main
paths-ignore:
- '**.md'
workflow_dispatch:
workflow_call:
env:
GO_VERSION: '1.22.7'
permissions:
contents: write
deployments: write
jobs:
get-latest-tag:
name: Get the latest release tag
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.latest-tag.outputs.tag }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: 'Get the latest tag'
id: latest-tag
uses: "WyriHaximus/github-action-get-previous-tag@04e8485ecb6487243907e330d522ff60f02283ce" # v1.4.0
generate-artifacts:
needs: get-latest-tag
runs-on: ubuntu-20.04
env:
# Set during setup.
RELEASE_TAG: ${{ needs.get-latest-tag.outputs.tag }}
DYNAMIC_BINARY_NAME: ''
STATIC_BINARY_NAME: ''
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-tags: true
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: 'Echo RELEASE_TAG ENV'
run: echo ${{ env.RELEASE_TAG }}
- name: Setup variables and release directories
run: |
export release_tag=${{ env.RELEASE_TAG }}
export release_version=${release_tag/v/} # Remove v from tag name
echo "DYNAMIC_BINARY_NAME=finch-daemon-${release_version}-linux-amd64.tar.gz" >> $GITHUB_ENV
echo "STATIC_BINARY_NAME=finch-daemon-${release_version}-linux-amd64-static.tar.gz" >> $GITHUB_ENV
mkdir release
- name: Install Go licenses
run: go install github.com/google/go-licenses@latest
- name: Create Third Party Licences File
run: make licenses
- name: Install Dependencies for e2e Testing
run: ./setup-test-env.sh
- name: setup static dependecies
run: |
sudo apt-get update
sudo apt-get install libc6-dev -f
- name: Create release binaries
run: make RELEASE_TAG=${{ env.RELEASE_TAG }} release
- name: Verify Release version
run: |
mkdir -p output/static output/dynamic
tar -xzf release/${{ env.DYNAMIC_BINARY_NAME }} -C ./output/dynamic
tar -xzf release/${{ env.STATIC_BINARY_NAME }} -C ./output/static
./output/dynamic/finch-daemon --version
./output/static/finch-daemon --version

Check failure on line 77 in .github/workflows/testing-release.yaml

View workflow job for this annotation

GitHub Actions / yamllint-lint

77:49 [trailing-spaces] trailing spaces
DYNAMIC_BINARY_VERSION=$(./output/dynamic/finch-daemon --version | grep -oP '\d+\.\d+\.\d+')
STATIC_BINARY_VERSION=$(./output/static/finch-daemon --version | grep -oP '\d+\.\d+\.\d+')
export release_tag=${{ env.RELEASE_TAG }}
export release_version=${release_tag/v/}
echo $DYNAMIC_BINARY_VERSION
echo $STATIC_BINARY_VERSION
if ["$STATIC_BINARY_VERSION" != "$release_version"] || ["$DYNAMIC_BINARY_VERSION" != "$release_version"]; then
echo "Version mismatch"
exit 1
fi
shell: bash
- uses: actions/upload-artifact@v4
with:
name: artifacts
path: release/
if-no-files-found: error
outputs:
release_tag: ${{ env.RELEASE_TAG }}
dynamic_binary_name: ${{ env.DYNAMIC_BINARY_NAME }}
static_binary_name: ${{ env.STATIC_BINARY_NAME }}
validate-artifacts:
needs: generate-artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: artifacts
path: release/
- run: bash scripts/verify-release-artifacts.sh ${{ needs.generate-artifacts.outputs.release_tag }}
# create-release:
# needs: [generate-artifacts, validate-artifacts]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/download-artifact@v4
# with:
# name: artifacts
# - uses: softprops/action-gh-release@v2
# with:
# tag_name: ${{ needs.generate-artifacts.outputs.release_tag }}
# prerelease: false
# generate_release_notes: false
# files: |-
# ${{ needs.generate-artifacts.outputs.dynamic_binary_name }}
# ${{ needs.generate-artifacts.outputs.dynamic_binary_name }}.sha256sum
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.9.0"
".": "0.9.1"
}
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
# Changelog

## [0.9.1](https://github.com/coderbirju/finch-daemon/compare/v0.9.0...v0.9.1) (2024-09-21)


### Build System or External Dependencies

* **deps:** bump github.com/containerd/go-cni from 1.1.9 to 1.1.10 ([#53](https://github.com/coderbirju/finch-daemon/issues/53)) ([31583b0](https://github.com/coderbirju/finch-daemon/commit/31583b0bd25dfdcf5c53ae78882b9df3ac36cc11))
* **deps:** bump github.com/onsi/ginkgo/v2 from 2.17.1 to 2.20.2 ([#19](https://github.com/coderbirju/finch-daemon/issues/19)) ([e282c25](https://github.com/coderbirju/finch-daemon/commit/e282c253bfdd2bad7e97866e75598291892fb7fa))
* **deps:** bump github.com/onsi/gomega from 1.32.0 to 1.34.2 ([#18](https://github.com/coderbirju/finch-daemon/issues/18)) ([ea72df3](https://github.com/coderbirju/finch-daemon/commit/ea72df3f479e10ef0de0357a31a1686d626f5041))
* **deps:** bump github.com/spf13/cobra from 1.8.0 to 1.8.1 ([#49](https://github.com/coderbirju/finch-daemon/issues/49)) ([3eff666](https://github.com/coderbirju/finch-daemon/commit/3eff666f81e4ea655b9d70e5fa7e8043283ec959))
* **deps:** bump github.com/vishvananda/netlink from 1.2.1-beta.2 to 1.3.0 ([#50](https://github.com/coderbirju/finch-daemon/issues/50)) ([e3cffc7](https://github.com/coderbirju/finch-daemon/commit/e3cffc77ac28451c15d5c6a04ab63fd89c34fe4b))


### Features

* add container create options ([#27](https://github.com/coderbirju/finch-daemon/issues/27)) ([504dcaf](https://github.com/coderbirju/finch-daemon/commit/504dcaf9eff1316c9dd40db82a4ecce9b3e1796d))
* allow custom socket path ([#7](https://github.com/coderbirju/finch-daemon/issues/7)) ([4c17545](https://github.com/coderbirju/finch-daemon/commit/4c1754576d5beb3bd6b12e36893a588b2bb95825))
* implement container restart API ([#23](https://github.com/coderbirju/finch-daemon/issues/23)) ([5d9b1e0](https://github.com/coderbirju/finch-daemon/commit/5d9b1e0f4e1565fd374b0f0941f373a094dc749c))
* Port 'implement container restart API' patch ([5d9b1e0](https://github.com/coderbirju/finch-daemon/commit/5d9b1e0f4e1565fd374b0f0941f373a094dc749c))


### Bug Fixes

* Add static binaries to release ([6057cc4](https://github.com/coderbirju/finch-daemon/commit/6057cc4631ed3c0b0bbb3b21fddcd7fd75aa10c9))
* Add static binaries to release 2 ([2dbdf02](https://github.com/coderbirju/finch-daemon/commit/2dbdf02dd2396af2a3f801c27c9995d719c8532f))
* doc nits and parameter casing ([#57](https://github.com/coderbirju/finch-daemon/issues/57)) ([e22c156](https://github.com/coderbirju/finch-daemon/commit/e22c156cc8bcb97f25c6f41a14e833203e8798ce))
* filter unsupported enable_icc option ([#36](https://github.com/coderbirju/finch-daemon/issues/36)) ([6c5e72d](https://github.com/coderbirju/finch-daemon/commit/6c5e72d4e8c9f6a5be12bf38078798423d11064f))
* image load should close stream after copy ([#34](https://github.com/coderbirju/finch-daemon/issues/34)) ([5ee657b](https://github.com/coderbirju/finch-daemon/commit/5ee657b17de96c1d2302e9ee7490ccfdc64cd907))
* README changes re: systemd setup ([#59](https://github.com/coderbirju/finch-daemon/issues/59)) ([2096ded](https://github.com/coderbirju/finch-daemon/commit/2096ded2283a8582186be01eeee42a8c0ab6161d))
* Set release version to 0.9.0 ([#56](https://github.com/coderbirju/finch-daemon/issues/56)) ([024768a](https://github.com/coderbirju/finch-daemon/commit/024768a6937ab2917870f9a3348dc0be114d3523))
* truncate image id on publish tag event ([#35](https://github.com/coderbirju/finch-daemon/issues/35)) ([6aa5b7c](https://github.com/coderbirju/finch-daemon/commit/6aa5b7ce76979682ad1cf2b49ac0237a74cac809))

## 0.9.0 Finch-Daemon Init

This is the first release of the Finch Daemon.
The Finch Daemon project is an open source container runtime engine that enables users to integrate software that uses Docker's RESTful APIs as a programmatic dependency.
The Finch Daemon project is an open source container runtime engine that enables users to integrate software that uses Docker's RESTful APIs as a programmatic dependency.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@ build:
$(eval PACKAGE := github.com/runfinch/finch-daemon)
$(eval VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.modified' --always --tags))
$(eval GITCOMMIT := $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi))
ifneq ($(STATIC),)
$(eval GO_BUILDTAGS := osusergo netgo)
$(eval LDFLAGS := "-X $(PACKAGE)/version.Version=$(VERSION) -X $(PACKAGE)/version.GitCommit=$(GITCOMMIT) -extldflags '-static'")
@echo "Building Static Binary"
else
@echo "Building Dynamic Binary"
$(eval LDFLAGS := "-X $(PACKAGE)/version.Version=$(VERSION) -X $(PACKAGE)/version.GitCommit=$(GITCOMMIT)")
GOOS=linux go build -ldflags $(LDFLAGS) -v -o $(BINARY) $(PACKAGE)/cmd/finch-daemon
endif
GOOS=linux go build $(if $(GO_BUILDTAGS), -tags "$(GO_BUILDTAGS)") -ldflags $(LDFLAGS) $(if $(STATIC), ) -v -o $(BINARY) $(PACKAGE)/cmd/finch-daemon

.PHONY: linux
linux:
Expand Down Expand Up @@ -105,4 +112,4 @@ run-e2e-tests: linux
.PHONY: release
release: linux
@echo "$@"
@$(FINCH_DAEMON_PROJECT_ROOT)/scripts/create-releases.sh $(RELEASE_TAG)
@$(FINCH_DAEMON_PROJECT_ROOT)/scripts/create-releases.sh $(RELEASE_TAG)
11 changes: 10 additions & 1 deletion scripts/create-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ fi

release_version=${1/v/} # Remove v from tag name
dynamic_binary_name=finch-daemon-${release_version}-linux-${ARCH}.tar.gz
static_binary_name=finch-daemon-${release_version}-linux-${ARCH}-static.tar.gz

make build
cp "$LICENSE_FILE" "${OUT_DIR}"
Expand All @@ -62,6 +63,14 @@ tar -czvf "$RELEASE_DIR"/"$dynamic_binary_name" -- *
popd
rm -rf "{$OUT_DIR:?}"/*

STATIC=1 make build
cp "$LICENSE_FILE" "${OUT_DIR}"
pushd "$OUT_DIR"
tar -czvf "$RELEASE_DIR"/"$static_binary_name" -- *
popd
rm -rf "{$OUT_DIR:?}"/*

pushd "$RELEASE_DIR"
sha256sum "$dynamic_binary_name" > "$RELEASE_DIR"/"$dynamic_binary_name".sha256sum
popd
sha256sum "$static_binary_name" > "$RELEASE_DIR"/"$static_binary_name".sha256sum
popd
2 changes: 1 addition & 1 deletion scripts/verify-release-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ release_tag=$1
release_version=${release_tag/v/}

pushd "$release_dir" || exit 1
tarballs=("finch-daemon-${release_version}-linux-${arch}.tar.gz")
tarballs=("finch-daemon-${release_version}-linux-${arch}.tar.gz" "finch-daemon-${release_version}-linux-${arch}-static.tar.gz")
expected_contents=("finch-daemon" "THIRD_PARTY_LICENSES")
release_is_valid=true

Expand Down
2 changes: 1 addition & 1 deletion setup-test-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NERDCTL_VERSION=1.7.6
BUILDKIT_VERSION=0.15.2
CNI_VERSION=1.5.1

apt update && apt install -y make gcc linux-libc-dev libseccomp-dev pkg-config git
apt update && apt install -y make gcc linux-libc-dev libseccomp-dev pkg-config git libc6-compat zlib-dev

# Download and install containerd
curl -sSL --output /tmp/containerd.tgz https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VERSION}/containerd-${CONTAINERD_VERSION}-linux-${TARGETARCH:-amd64}.tar.gz
Expand Down
Loading