Skip to content

Commit

Permalink
backport all current workflows to 1.4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Jun 29, 2023
1 parent 77667c6 commit 128685b
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 72 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

blank_issues_enabled: false
contact_links:
- name: Ask a Question
Expand Down
5 changes: 5 additions & 0 deletions .github/secret-scanning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

paths-ignore:
- "website/content/*"
4 changes: 4 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ jobs:
env:
BACKPORT_LABEL_REGEXP: "backport/(?P<target>website)"
BACKPORT_TARGET_TEMPLATE: "stable-{{.target}}"
# Enabling this option increased the number of backport failures.
BACKPORT_MERGE_COMMIT: false
GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
- name: Backport changes to targeted release branch
run: |
backport-assistant backport -merge-method=squash -automerge
env:
BACKPORT_LABEL_REGEXP: "backport/(?P<target>\\d+\\.\\d+\\.[+\\w]+)"
BACKPORT_TARGET_TEMPLATE: "release/{{.target}}"
# Enabling this option increased the number of backport failures.
BACKPORT_MERGE_COMMIT: false
GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
handle-failure:
needs:
Expand Down
80 changes: 41 additions & 39 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- name: Setup node and yarn
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: "14"
node-version: "18"
cache-dependency-path: "ui/yarn.lock"

- name: Install Yarn
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
- name: Setup node and yarn
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: "14"
node-version: "18"
cache-dependency-path: "ui/yarn.lock"

- name: Install Yarn
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
- name: Setup node and yarn
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: "14"
node-version: "18"
cache-dependency-path: "ui/yarn.lock"

- name: Install Yarn
Expand All @@ -286,41 +286,43 @@ jobs:
name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
path: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip

build-docker:
name: Docker ${{ matrix.arch }} build
needs:
- get-product-version
- build-linux
runs-on: [ custom, linux, xxl, 20.04 ]
strategy:
matrix:
arch: ["arm64", "amd64"]
env:
version: ${{needs.get-product-version.outputs.product-version}}
revision: ${{github.sha}}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Set revision
if: "${{ github.event.inputs.build-ref != '' }}"
run: |
echo "revision=${{ github.event.inputs.build-ref }}" >> "$GITHUB_ENV"
- name: Docker Build (Action)
uses: hashicorp/actions-docker-build@v1
with:
smoke_test: |
TEST_VERSION="$(docker run "${IMAGE_NAME}" version | awk '/Nomad v/{print $2}')"
if [ "${TEST_VERSION}" != "v${version}" ]; then
echo "Test FAILED"
exit 1
fi
echo "Test PASSED"
version: ${{env.version}}
revision: ${{env.revision}}
target: release
arch: ${{matrix.arch}}
tags: |
docker.io/hashicorp/${{env.PKG_NAME}}:${{env.version}}
dev_tags: |
docker.io/hashicorppreview/${{ env.PKG_NAME }}:${{ env.version }}-dev
docker.io/hashicorppreview/${{ env.PKG_NAME }}:${{ env.version }}-${{env.revision}}
permissions:
contents: read
# This placed here for when the Nomad team is ready to build docker images.
# Please reach out the RDX team for assistance or refer to the CRT Self-Serve Onboarding doc.

# build-docker-default:
# name: Docker ${{ matrix.arch }} default release build
# needs:
# - get-product-version
# - build
# runs-on: [ custom, linux, xxl, 20.04 ]
# strategy:
# matrix:
# arch: ["arm", "arm64", "386", "amd64"]
# env:
# repo: ${{github.event.repository.name}}
# version: ${{needs.get-product-version.outputs.product-version}}

# steps:
# - uses: actions/checkout@v3
# - name: Docker Build (Action)
# uses: hashicorp/actions-docker-build@v1
# with:
# # Add smoke test here. Below is a sample smoke test that runs the built image
# # and validates the version.
# smoke_test: |
# TEST_VERSION="$(docker run "${IMAGE_NAME}" | awk '/CLI version/{print $3}')"
# if [ "${TEST_VERSION}" != "${version}" ]; then
# echo "Test FAILED"
# exit 1
# fi
# echo "Test PASSED"
# version: ${{env.version}}
# target: release-default
# arch: ${{matrix.arch}}
# tags: |
# docker.io/hashicorp/${{env.repo}}:${{env.version}}
# 986891699432.dkr.ecr.us-east-1.amazonaws.com/hashicorp/${{env.repo}}:${{env.version}}
26 changes: 0 additions & 26 deletions .github/workflows/ember-assets.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/ember-test-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '14'
node-version: '18'
- run: yarn --frozen-lockfile
- run: mkdir -p /tmp/test-reports
- run: npx ember-test-audit 1 --json --output ../base-audit.json
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '14'
node-version: '18'
- run: yarn --frozen-lockfile
- run: mkdir -p /tmp/test-reports
- run: npx ember-test-audit 1 --json --output ../pr-audit.json
Expand Down Expand Up @@ -84,4 +84,5 @@ jobs:
message_path: flakiness-report.md
permissions:
contents: read
pull-requests: write

26 changes: 26 additions & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Lock Threads'

on:
schedule:
- cron: '50 1 * * *'

jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836 # v4.0.0
with:
github-token: ${{ github.token }}
issue-lock-comment: >
I'm going to lock this issue because it has been closed for _120 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
issue-lock-inactive-days: '120'
pr-lock-comment: >
I'm going to lock this pull request because it has been closed for _120 days_ ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
pr-lock-inactive-days: '120'
permissions:
contents: read

4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Setup node and yarn
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: "14"
node-version: "18"
cache-dependency-path: "ui/yarn.lock"

- name: Install Yarn
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
run: |
gh workflow run build.yml --field build-ref=${{ steps.commit-change-push.outputs.build-ref }} --field make-prerelease=false
gh workflow run build.yml --ref ${{ github.ref_name }} --field build-ref=${{ steps.commit-change-push.outputs.build-ref }} --field make-prerelease=false
- name: Revert notification channel
if: ${{ github.event.inputs.notification-channel != '' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ on:
env:
VERBOSE: 1
GOTESTARCH: amd64
CONSUL_VERSION: 1.12.6
VAULT_VERSION: 1.12.0
CONSUL_VERSION: 1.14.4
VAULT_VERSION: 1.12.2
NOMAD_SLOW_TEST: 0
NOMAD_TEST_LOG_LEVEL: OFF
jobs:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
tests-api:
needs: [mods]
runs-on: [custom, xl, 22.04]
timeout-minutes: 30
timeout-minutes: 8
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: hashicorp/setup-golang@v1
Expand Down

0 comments on commit 128685b

Please sign in to comment.