diff --git a/.github/workflows/trdl_publish.yml b/.github/workflows/trdl_publish.yml new file mode 100644 index 0000000..da4f44f --- /dev/null +++ b/.github/workflows/trdl_publish.yml @@ -0,0 +1,23 @@ +name: trdl-publish +on: + push: + paths: + - trdl_channels.yaml + +defaults: + run: + shell: bash + +jobs: + publish: + name: Publish release channels using trdl server + runs-on: ubuntu-22.04 + steps: + - name: Publish + uses: werf/trdl-vault-actions/publish@main + with: + vault-addr: https://trrr.flant.dev + project-name: deckhouse-cli + vault-auth-method: approle + vault-role-id: f1b89aca-a28b-04ed-1631-6413758a4ee3 + vault-secret-id: dddec62a-39a9-71e2-fea4-f631cf399b09 diff --git a/.github/workflows/trdl_releaser.yml b/.github/workflows/trdl_releaser.yml new file mode 100644 index 0000000..679778e --- /dev/null +++ b/.github/workflows/trdl_releaser.yml @@ -0,0 +1,19 @@ +name: trdl-release +on: + create: + +jobs: + release: + if: ${{ startsWith(github.ref, 'refs/tags/v') }} + name: Perform deckhouse-cli release using trdl server + runs-on: ubuntu-latest + steps: + - name: Release + uses: werf/trdl-vault-actions/release@main + with: + vault-addr: https://trrr.flant.dev + project-name: deckhouse-cli + git-tag: ${{ github.event.ref }} + vault-auth-method: approle + vault-role-id: f1b89aca-a28b-04ed-1631-6413758a4ee3 + vault-secret-id: dddec62a-39a9-71e2-fea4-f631cf399b09 diff --git a/scripts/ci/release-build.sh b/scripts/ci/release-build.sh new file mode 100755 index 0000000..5144330 --- /dev/null +++ b/scripts/ci/release-build.sh @@ -0,0 +1,15 @@ +#!/bin/sh -e + +VERSION=$1 +if [ -z "$VERSION" ] ; then + echo "Required version argument!" 1>&2 + echo 1>&2 + echo "Usage: $0 VERSION" 1>&2 + exit 1 +fi + +apt-get update && apt-get install -y apt-utils libbtrfs-dev file git gcc software-properties-common && add-apt-repository ppa:longsleep/golang-backports -y && apt install golang-1.23 -y +export PATH=$PATH:/usr/lib/go-1.23/bin +git config --global url."https://gitlab-ci-token:scwnA_eeAQy9qEmSL7z9@fox.flant.com/".insteadOf https://fox.flant.com/ +git config --global --add safe.directory '*' +go run github.com/mitchellh/gox@latest -osarch="linux/amd64" -output="release-build/$VERSION/{{.OS}}-{{.Arch}}/bin/d8" -ldflags="-linkmode external -extldflags=-static" -tags="dfrunsecurity dfrunnetwork dfrunmount dfssh containers_image_openpgp osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build cni" github.com/deckhouse/deckhouse-cli diff --git a/trdl.yaml b/trdl.yaml new file mode 100644 index 0000000..f11e46f --- /dev/null +++ b/trdl.yaml @@ -0,0 +1,3 @@ +docker_image: ubuntu@sha256:0e5e4a57c2499249aafc3b40fcd541e9a456aab7296681a3994d631587203f97 +commands: +- ./scripts/ci/release-build.sh {{ .Tag }} && cp -a release-build/{{ .Tag }}/* /result diff --git a/trdl_channels.yaml b/trdl_channels.yaml new file mode 100644 index 0000000..bde46f3 --- /dev/null +++ b/trdl_channels.yaml @@ -0,0 +1,7 @@ +groups: +- name: "0" + channels: + - name: alpha + version: 0.7.1 + - name: stable + version: 0.7.1