From 2be80f99970b9b294d4e9ae4c83f7c537924a7d9 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Thu, 28 May 2020 15:33:25 -0700 Subject: [PATCH] Add windows hcsshim to release pipeline Signed-off-by: Brian Goff --- .github/workflows/release.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf0c34cb2..6557c46de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,12 +79,26 @@ jobs: repository: containerd/containerd ref: ${{ github.ref }} path: src/github.com/containerd/containerd + - name: Checkout Microsoft/hcsshim + if: startsWith(matrix.os, 'windows') + uses: actions/checkout@v2 + with: + repository: Microsoft/hcsshim + path: src/github.com/Microsoft/hcsshim - name: Install Linux dependencies if: startsWith(matrix.os, 'ubuntu') run: | sudo apt-get install -y btrfs-tools libseccomp-dev - + - name: Prepare hcsshim source + if: startsWith(matrix.os, 'windows') + shell: bash + working-directory: src/github.com/containerd/containerd + run: | + SHIM_COMMIT=$(grep Microsoft/hcsshim vendor.conf | awk '{print $2}') + cd ../../Microsoft/hcsshim + git fetch --tags origin "${SHIM_COMMIT}" + git checkout "${SHIM_COMMIT}" - name: Make shell: bash env: @@ -95,6 +109,11 @@ jobs: make binaries [[ "${MOS}" =~ "windows" ]] && { OS=windows + ( + bindir="$(pwd)/bin" + cd ../../Microsoft/hcsshim + GO111MODULE=on go build -mod=vendor -o "${bindir}/containerd-shim-runhcs-v1.exe" ./cmd/containerd-shim-runhcs-v1 + ) } TARFILE="containerd-${RELEASE_VER#v}-${OS}-amd64.tar.gz" tar czf ${TARFILE} bin/