From f9bde321e93eb10e4b4974edb441b9f57cc8e531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 12 Nov 2021 10:17:17 +0100 Subject: [PATCH] workflows: Remove non-used main.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The main.yaml workflow was created and used only on 1.x. We inherited it, but we didn't remove it after deprecating the 1.x repos. While here, let's also update the reference to the `main.yaml` file, and point to `release.yaml` (the file that's actually used for 2.x). Fixes: #3033 Signed-off-by: Fabiano FidĂȘncio --- .github/workflows/main.yaml | 295 ------------------------------------ docs/Release-Process.md | 2 +- 2 files changed, 1 insertion(+), 296 deletions(-) delete mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml deleted file mode 100644 index cff9b25bd8..0000000000 --- a/.github/workflows/main.yaml +++ /dev/null @@ -1,295 +0,0 @@ -name: Publish release tarball -on: - push: - tags: - - '1.*' - -jobs: - get-artifact-list: - runs-on: ubuntu-latest - steps: - - name: get the list - run: | - pushd $GITHUB_WORKSPACE - tag=$(echo $GITHUB_REF | cut -d/ -f3-) - git checkout $tag - popd - $GITHUB_WORKSPACE/tools/packaging/artifact-list.sh > artifact-list.txt - - name: save-artifact-list - uses: actions/upload-artifact@master - with: - name: artifact-list - path: artifact-list.txt - - build-kernel: - runs-on: ubuntu-16.04 - needs: get-artifact-list - env: - buildstr: "install_kernel" - steps: - - uses: actions/checkout@v1 - - name: get-artifact-list - uses: actions/download-artifact@master - with: - name: artifact-list - - run: | - sudo apt-get update && sudo apt install -y flex bison libelf-dev bc iptables - - name: build-kernel - run: | - if grep -q $buildstr ./artifact-list/artifact-list.txt; then - $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo "artifact-built=true" >> $GITHUB_ENV - else - echo "artifact-built=false" >> $GITHUB_ENV - fi - - name: store-artifacts - if: ${{ env.artifact-built }} == 'true' - uses: actions/upload-artifact@master - with: - name: kata-artifacts - path: kata-static-kernel.tar.gz - - build-experimental-kernel: - runs-on: ubuntu-16.04 - needs: get-artifact-list - env: - buildstr: "install_experimental_kernel" - steps: - - uses: actions/checkout@v1 - - name: get-artifact-list - uses: actions/download-artifact@master - with: - name: artifact-list - - run: | - sudo apt-get update && sudo apt install -y flex bison libelf-dev bc iptables - - name: build-experimental-kernel - run: | - if grep -q $buildstr ./artifact-list/artifact-list.txt; then - $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo "artifact-built=true" >> $GITHUB_ENV - else - echo "artifact-built=false" >> $GITHUB_ENV - fi - - name: store-artifacts - if: ${{ env.artifact-built }} == 'true' - uses: actions/upload-artifact@master - with: - name: kata-artifacts - path: kata-static-experimental-kernel.tar.gz - - build-qemu: - runs-on: ubuntu-16.04 - needs: get-artifact-list - env: - buildstr: "install_qemu" - steps: - - uses: actions/checkout@v1 - - name: get-artifact-list - uses: actions/download-artifact@master - with: - name: artifact-list - - name: build-qemu - run: | - if grep -q $buildstr ./artifact-list/artifact-list.txt; then - $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo "artifact-built=true" >> $GITHUB_ENV - else - echo "artifact-built=false" >> $GITHUB_ENV - fi - - name: store-artifacts - if: ${{ env.artifact-built }} == 'true' - uses: actions/upload-artifact@master - with: - name: kata-artifacts - path: kata-static-qemu.tar.gz - - # Job for building the image - build-image: - runs-on: ubuntu-16.04 - needs: get-artifact-list - env: - buildstr: "install_image" - steps: - - uses: actions/checkout@v1 - - name: get-artifact-list - uses: actions/download-artifact@master - with: - name: artifact-list - - name: build-image - run: | - if grep -q $buildstr ./artifact-list/artifact-list.txt; then - $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo "artifact-built=true" >> $GITHUB_ENV - else - echo "artifact-built=false" >> $GITHUB_ENV - fi - - name: store-artifacts - if: ${{ env.artifact-built }} == 'true' - uses: actions/upload-artifact@master - with: - name: kata-artifacts - path: kata-static-image.tar.gz - - # Job for building firecracker hypervisor - build-firecracker: - runs-on: ubuntu-16.04 - needs: get-artifact-list - env: - buildstr: "install_firecracker" - steps: - - uses: actions/checkout@v1 - - name: get-artifact-list - uses: actions/download-artifact@master - with: - name: artifact-list - - name: build-firecracker - run: | - if grep -q $buildstr ./artifact-list/artifact-list.txt; then - $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo "artifact-built=true" >> $GITHUB_ENV - else - echo "artifact-built=false" >> $GITHUB_ENV - fi - - name: store-artifacts - if: ${{ env.artifact-built }} == 'true' - uses: actions/upload-artifact@master - with: - name: kata-artifacts - path: kata-static-firecracker.tar.gz - - # Job for building cloud-hypervisor - build-clh: - runs-on: ubuntu-16.04 - needs: get-artifact-list - env: - buildstr: "install_clh" - steps: - - uses: actions/checkout@v1 - - name: get-artifact-list - uses: actions/download-artifact@master - with: - name: artifact-list - - name: build-clh - run: | - if grep -q $buildstr ./artifact-list/artifact-list.txt; then - $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo "artifact-built=true" >> $GITHUB_ENV - else - echo "artifact-built=false" >> $GITHUB_ENV - fi - - name: store-artifacts - if: ${{ env.artifact-built }} == 'true' - uses: actions/upload-artifact@master - with: - name: kata-artifacts - path: kata-static-clh.tar.gz - - # Job for building kata components - build-kata-components: - runs-on: ubuntu-16.04 - needs: get-artifact-list - env: - buildstr: "install_kata_components" - steps: - - uses: actions/checkout@v1 - - name: get-artifact-list - uses: actions/download-artifact@master - with: - name: artifact-list - - name: build-kata-components - run: | - if grep -q $buildstr ./artifact-list/artifact-list.txt; then - $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo "artifact-built=true" >> $GITHUB_ENV - else - echo "artifact-built=false" >> $GITHUB_ENV - fi - - name: store-artifacts - if: ${{ env.artifact-built }} == 'true' - uses: actions/upload-artifact@master - with: - name: kata-artifacts - path: kata-static-kata-components.tar.gz - - gather-artifacts: - runs-on: ubuntu-16.04 - needs: [build-experimental-kernel, build-kernel, build-qemu, build-image, build-firecracker, build-kata-components, build-clh] - steps: - - uses: actions/checkout@v1 - - name: get-artifacts - uses: actions/download-artifact@master - with: - name: kata-artifacts - - name: colate-artifacts - run: | - $GITHUB_WORKSPACE/.github/workflows/gather-artifacts.sh - - name: store-artifacts - uses: actions/upload-artifact@master - with: - name: release-candidate - path: kata-static.tar.xz - - kata-deploy: - needs: gather-artifacts - runs-on: ubuntu-latest - steps: - - name: get-artifacts - uses: actions/download-artifact@master - with: - name: release-candidate - - name: build-and-push-kata-deploy-ci - id: build-and-push-kata-deploy-ci - run: | - tag=$(echo $GITHUB_REF | cut -d/ -f3-) - git clone https://github.com/kata-containers/packaging - pushd packaging - git checkout $tag - pkg_sha=$(git rev-parse HEAD) - popd - mv release-candidate/kata-static.tar.xz ./packaging/kata-deploy/kata-static.tar.xz - docker build --build-arg KATA_ARTIFACTS=kata-static.tar.xz -t katadocker/kata-deploy-ci:$pkg_sha -t quay.io/kata-containers/kata-deploy-ci:$pkg_sha ./packaging/kata-deploy - docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker push katadocker/kata-deploy-ci:$pkg_sha - docker login -u ${{ secrets.QUAY_DEPLOYER_USERNAME }} -p ${{ secrets.QUAY_DEPLOYER_PASSWORD }} quay.io - docker push quay.io/kata-containers/kata-deploy-ci:$pkg_sha - echo "::set-output name=PKG_SHA::${pkg_sha}" - - name: test-kata-deploy-ci-in-aks - uses: ./packaging/kata-deploy/action - with: - packaging-sha: ${{steps.build-and-push-kata-deploy-ci.outputs.PKG_SHA}} - env: - PKG_SHA: ${{steps.build-and-push-kata-deploy-ci.outputs.PKG_SHA}} - AZ_APPID: ${{ secrets.AZ_APPID }} - AZ_PASSWORD: ${{ secrets.AZ_PASSWORD }} - AZ_SUBSCRIPTION_ID: ${{ secrets.AZ_SUBSCRIPTION_ID }} - AZ_TENANT_ID: ${{ secrets.AZ_TENANT_ID }} - - name: push-tarball - run: | - # tag the container image we created and push to DockerHub - tag=$(echo $GITHUB_REF | cut -d/ -f3-) - docker tag katadocker/kata-deploy-ci:${{steps.build-and-push-kata-deploy-ci.outputs.PKG_SHA}} katadocker/kata-deploy:${tag} - docker push katadocker/kata-deploy:${tag} - - upload-static-tarball: - needs: kata-deploy - runs-on: ubuntu-latest - steps: - - name: download-artifacts - uses: actions/download-artifact@master - with: - name: release-candidate - - name: install hub - run: | - HUB_VER=$(curl -s "https://api.github.com/repos/github/hub/releases/latest" | jq -r .tag_name | sed 's/^v//') - wget -q -O- https://github.com/github/hub/releases/download/v$HUB_VER/hub-linux-amd64-$HUB_VER.tgz | \ - tar xz --strip-components=2 --wildcards '*/bin/hub' && sudo mv hub /usr/local/bin/hub - - name: push static tarball to github - run: | - tag=$(echo $GITHUB_REF | cut -d/ -f3-) - tarball="kata-static-$tag-x86_64.tar.xz" - repo="https://github.com/kata-containers/runtime.git" - mv release-candidate/kata-static.tar.xz "release-candidate/${tarball}" - git clone "${repo}" - cd runtime - echo "uploading asset '${tarball}' to '${repo}' tag: ${tag}" - GITHUB_TOKEN=${{ secrets.GIT_UPLOAD_TOKEN }} hub release edit -m "" -a "../release-candidate/${tarball}" "${tag}" diff --git a/docs/Release-Process.md b/docs/Release-Process.md index 903b8875f2..5d6e913e80 100644 --- a/docs/Release-Process.md +++ b/docs/Release-Process.md @@ -64,7 +64,7 @@ ### Check Git-hub Actions - We make use of [GitHub actions](https://github.com/features/actions) in this [file](https://github.com/kata-containers/kata-containers/blob/main/.github/workflows/main.yaml) in the `kata-containers/kata-containers` repository to build and upload release artifacts. This action is auto triggered with the above step when a new tag is pushed to the `kata-containers/kata-containers` repository. + We make use of [GitHub actions](https://github.com/features/actions) in this [file](https://github.com/kata-containers/kata-containers/blob/main/.github/workflows/release.yaml) in the `kata-containers/kata-containers` repository to build and upload release artifacts. This action is auto triggered with the above step when a new tag is pushed to the `kata-containers/kata-containers` repository. Check the [actions status page](https://github.com/kata-containers/kata-containers/actions) to verify all steps in the actions workflow have completed successfully. On success, a static tarball containing Kata release artifacts will be uploaded to the [Release page](https://github.com/kata-containers/kata-containers/releases).