diff options
author | Andrii Andrieiev <a.andrieiev@sentrium.io> | 2023-09-01 13:29:41 +0300 |
---|---|---|
committer | Andrii Andrieiev <a.andrieiev@sentrium.io> | 2023-09-01 13:29:41 +0300 |
commit | 399530861a80bf83b70b1da3b4321715c980bc9f (patch) | |
tree | 1daafff1d37fab51eaadcc8c525e892241160d67 | |
parent | 40777b1b2b3ab931e8412b6df9134aacef34d98c (diff) | |
download | vyos-rolling-nightly-builds-399530861a80bf83b70b1da3b4321715c980bc9f.tar.gz vyos-rolling-nightly-builds-399530861a80bf83b70b1da3b4321715c980bc9f.zip |
debug
-rw-r--r-- | .github/workflows/vyos-rolling-nightly-build.yml | 212 |
1 files changed, 106 insertions, 106 deletions
diff --git a/.github/workflows/vyos-rolling-nightly-build.yml b/.github/workflows/vyos-rolling-nightly-build.yml index 3311e32..b86daa7 100644 --- a/.github/workflows/vyos-rolling-nightly-build.yml +++ b/.github/workflows/vyos-rolling-nightly-build.yml @@ -20,14 +20,14 @@ jobs: - uses: actions/checkout@v3 - - name: Update latest_build.txt - run: echo $(date -u +%Y%m%d%H%M) > $GITHUB_WORKSPACE/latest_build.txt + # - name: Update latest_build.txt + # run: echo $(date -u +%Y%m%d%H%M) > $GITHUB_WORKSPACE/latest_build.txt - - name: Create autocommit and tag - uses: stefanzweifel/git-auto-commit-action@v4 - with: - tagging_message: ${{ env.VYOS_VERSION }} - commit_message: ${{ env.VYOS_VERSION }} + # - name: Create autocommit and tag + # uses: stefanzweifel/git-auto-commit-action@v4 + # with: + # tagging_message: ${{ env.VYOS_VERSION }} + # commit_message: ${{ env.VYOS_VERSION }} - name: Git clone vyos-build run: git clone -b current --single-branch https://github.com/vyos/vyos-build @@ -44,108 +44,108 @@ jobs: - name: Make archive for smoketests run: | - tar -czf vyos-build.tar.gz -C $(pwd) vyos-build + sudo tar -czf vyos-build.tar.gz -C $(pwd) vyos-build - # - name: Check ISO - # uses: cross-the-world/ssh-scp-ssh-pipelines@latest - # env: - # VYOS_VERSION: ${{ env.VYOS_VERSION }} - # with: - # host: ${{ secrets.SSH_HOST }} - # user: ${{ secrets.SSH_USER }} - # port: ${{ secrets.SSH_PORT }} - # key: ${{ secrets.SSH_KEY }} - # connect_timeout: 10s - # first_ssh: | - # rm -rf ~/vyos-build* || true - # scp: | - # './vyos-build.tar.gz' => '~/' - # last_ssh: | - # tar -xzf vyos-build.tar.gz - # docker run --rm --privileged -v ~/vyos-build:/vyos -w /vyos vyos/vyos-build:current sudo make test - # docker run --rm --privileged -v ~/vyos-build:/vyos -w /vyos vyos/vyos-build:current sudo make testc - # rm -rf ~/vyos-build || true - - - - name: Copy ISO - run: | - cp ./vyos-build/build/live-image-amd64.hybrid.iso ./vyos-$VYOS_VERSION-amd64.iso - - - name: Sign ISO (Minisign) - run: | - echo 'untrusted comment: minisign encrypted secret key' > minisign.key - echo $minisign_key >> minisign.key - shasum minisign.key - echo $minisign_password | $GITHUB_WORKSPACE/bin/minisign -s minisign.key -Sm ./vyos-$VYOS_VERSION-amd64.iso - $GITHUB_WORKSPACE/bin/minisign -Vm ./vyos-$VYOS_VERSION-amd64.iso -x ./vyos-$VYOS_VERSION-amd64.iso.minisig -p $GITHUB_WORKSPACE/minisign.pub + - name: Check ISO + uses: cross-the-world/ssh-scp-ssh-pipelines@latest env: - minisign_key: ${{ secrets.minisign_key }} - minisign_password: ${{ secrets.minisign_password }} - - - name: Upload ISO to S3 Glacier - uses: keithweaver/aws-s3-github-action@v1.0.0 - with: - command: cp - source: ./vyos-${{ env.VYOS_VERSION }}-amd64.iso - destination: s3://${{ secrets.aws_s3_bucket }}/vyos-${{ env.VYOS_VERSION }}-amd64.iso - aws_access_key_id: ${{ secrets.aws_access_key_id }} - aws_secret_access_key: ${{ secrets.aws_secret_access_key }} - aws_region: us-east-1 - flags: --storage-class GLACIER - - - name: Upload ISO's signature to S3 Glacier - uses: keithweaver/aws-s3-github-action@v1.0.0 + VYOS_VERSION: ${{ env.VYOS_VERSION }} with: - command: cp - source: ./vyos-${{ env.VYOS_VERSION }}-amd64.iso.minisig - destination: s3://${{ secrets.aws_s3_bucket }}/vyos-${{ env.VYOS_VERSION }}-amd64.iso.minisig - aws_access_key_id: ${{ secrets.aws_access_key_id }} - aws_secret_access_key: ${{ secrets.aws_secret_access_key }} - aws_region: us-east-1 - flags: --storage-class GLACIER - - - name: Upload ISO artifact - uses: actions/upload-artifact@v3 - with: - name: vyos-${{ env.VYOS_VERSION }}-amd64.iso - path: ./vyos-${{ env.VYOS_VERSION }}-amd64.iso - retention-days: 30 - if-no-files-found: error + host: ${{ secrets.SSH_HOST }} + user: ${{ secrets.SSH_USER }} + port: ${{ secrets.SSH_PORT }} + key: ${{ secrets.SSH_KEY }} + connect_timeout: 10s + first_ssh: | + rm -rf ~/vyos-build* || true + scp: | + './vyos-build.tar.gz' => '~/' + last_ssh: | + tar -xzf vyos-build.tar.gz + docker run --rm --privileged -v ~/vyos-build:/vyos -w /vyos vyos/vyos-build:current sudo make test + docker run --rm --privileged -v ~/vyos-build:/vyos -w /vyos vyos/vyos-build:current sudo make testc + rm -rf ~/vyos-build || true + + + # - name: Copy ISO + # run: | + # cp ./vyos-build/build/live-image-amd64.hybrid.iso ./vyos-$VYOS_VERSION-amd64.iso + + # - name: Sign ISO (Minisign) + # run: | + # echo 'untrusted comment: minisign encrypted secret key' > minisign.key + # echo $minisign_key >> minisign.key + # shasum minisign.key + # echo $minisign_password | $GITHUB_WORKSPACE/bin/minisign -s minisign.key -Sm ./vyos-$VYOS_VERSION-amd64.iso + # $GITHUB_WORKSPACE/bin/minisign -Vm ./vyos-$VYOS_VERSION-amd64.iso -x ./vyos-$VYOS_VERSION-amd64.iso.minisig -p $GITHUB_WORKSPACE/minisign.pub + # env: + # minisign_key: ${{ secrets.minisign_key }} + # minisign_password: ${{ secrets.minisign_password }} - - name: Upload ISO's Minisign artifact - uses: actions/upload-artifact@v3 - with: - name: vyos-${{ env.VYOS_VERSION }}-amd64.iso.minisig - path: ./vyos-${{ env.VYOS_VERSION }}-amd64.iso.minisig - retention-days: 30 - if-no-files-found: error + # - name: Upload ISO to S3 Glacier + # uses: keithweaver/aws-s3-github-action@v1.0.0 + # with: + # command: cp + # source: ./vyos-${{ env.VYOS_VERSION }}-amd64.iso + # destination: s3://${{ secrets.aws_s3_bucket }}/vyos-${{ env.VYOS_VERSION }}-amd64.iso + # aws_access_key_id: ${{ secrets.aws_access_key_id }} + # aws_secret_access_key: ${{ secrets.aws_secret_access_key }} + # aws_region: us-east-1 + # flags: --storage-class GLACIER + + # - name: Upload ISO's signature to S3 Glacier + # uses: keithweaver/aws-s3-github-action@v1.0.0 + # with: + # command: cp + # source: ./vyos-${{ env.VYOS_VERSION }}-amd64.iso.minisig + # destination: s3://${{ secrets.aws_s3_bucket }}/vyos-${{ env.VYOS_VERSION }}-amd64.iso.minisig + # aws_access_key_id: ${{ secrets.aws_access_key_id }} + # aws_secret_access_key: ${{ secrets.aws_secret_access_key }} + # aws_region: us-east-1 + # flags: --storage-class GLACIER + + # - name: Upload ISO artifact + # uses: actions/upload-artifact@v3 + # with: + # name: vyos-${{ env.VYOS_VERSION }}-amd64.iso + # path: ./vyos-${{ env.VYOS_VERSION }}-amd64.iso + # retention-days: 30 + # if-no-files-found: error - - name: Publish release - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ env.VYOS_VERSION }} - fail_on_unmatched_files: true - files: | - ./vyos-${{ env.VYOS_VERSION }}-amd64.iso - ./vyos-${{ env.VYOS_VERSION }}-amd64.iso.minisig - - - name: Remove old releases - uses: dev-drprasad/delete-older-releases@v0.2.1 - with: - keep_latest: 30 - delete_tags: true - env: - GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} + # - name: Upload ISO's Minisign artifact + # uses: actions/upload-artifact@v3 + # with: + # name: vyos-${{ env.VYOS_VERSION }}-amd64.iso.minisig + # path: ./vyos-${{ env.VYOS_VERSION }}-amd64.iso.minisig + # retention-days: 30 + # if-no-files-found: error - - name: Send Slack notification on fail - if: failure() - id: slack - uses: slackapi/slack-github-action@v1.24.0 - with: - payload: | - { - "text": "*vyos-rolling-nightly-builds*\nGitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + # - name: Publish release + # uses: softprops/action-gh-release@v1 + # with: + # tag_name: ${{ env.VYOS_VERSION }} + # fail_on_unmatched_files: true + # files: | + # ./vyos-${{ env.VYOS_VERSION }}-amd64.iso + # ./vyos-${{ env.VYOS_VERSION }}-amd64.iso.minisig + + # - name: Remove old releases + # uses: dev-drprasad/delete-older-releases@v0.2.1 + # with: + # keep_latest: 30 + # delete_tags: true + # env: + # GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} + + # - name: Send Slack notification on fail + # if: failure() + # id: slack + # uses: slackapi/slack-github-action@v1.24.0 + # with: + # payload: | + # { + # "text": "*vyos-rolling-nightly-builds*\nGitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" + # } + # env: + # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + # SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |