Skip to content

Commit

Permalink
backport of commit 2dced0a
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Jul 7, 2023
1 parent 100c460 commit 045185c
Show file tree
Hide file tree
Showing 3,657 changed files with 6,546 additions and 45,475 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 0 additions & 4 deletions .changelog/11041.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/13343.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/16099.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/16134.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/16221.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/16228.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/16243.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/16463.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/16743.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/16763.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/16908.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/16932.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17010.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17017.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17041.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17044.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17045.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17065.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17074.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17084.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17138.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17196.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17214.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17334.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17341.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17343.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17345.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17354.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17421.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17576.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17579.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17645.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17647.txt

This file was deleted.

3 changes: 3 additions & 0 deletions .changelog/17652.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
scheduler: Fixed a bug that could cause replacements for failed allocations to be placed in the wrong datacenter during a canary deployment
```
3 changes: 0 additions & 3 deletions .changelog/17752.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17754.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17766.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/17783.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# This commit just fixes some typos and isn't useful
b0a20b4dc965a38b0c843f47c16685ccad7439da

# giant copywrite headers commit
f005448366ed3e796a2f22696d8c063dff4677f8
23 changes: 23 additions & 0 deletions .github/actions/vault-secrets/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: vault-secrets
description: 'pull secrets from CI Vault into environment vars'
inputs:
paths:
description: 'vault-action secrets input'
required: true
runs:
using: composite
steps:
- name: Authenticate to Vault
if: endsWith(github.repository, '-enterprise')
id: vault-auth
run: vault-auth
shell: bash
- name: Retrieve Vault-hosted Secrets
if: endsWith(github.repository, '-enterprise')
id: vault
uses: hashicorp/vault-action@v2.4.3
with:
url: ${{ steps.vault-auth.outputs.addr }}
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
token: ${{ steps.vault-auth.outputs.token }}
secrets: ${{ inputs.paths }}
9 changes: 7 additions & 2 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ jobs:
if: always() && needs.backport.result == 'failure'
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux"]') || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: ./.github/actions/vault-secrets
with:
paths: |-
kv/data/teams/nomad/slack-webhooks feed-nomad | SLACK_FEED_NOMAD ;
- name: Send slack notification on failure
uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0
with:
Expand Down Expand Up @@ -70,8 +75,8 @@ jobs:
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.BACKPORT_ASSISTANT_FAILURE_SLACK }}
SLACK_WEBHOOK_URL: ${{ env.SLACK_FEED_NOMAD || secrets.BACKPORT_ASSISTANT_FAILURE_SLACK }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
permissions:
contents: read

id-token: write
18 changes: 16 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
strategy:
matrix:
goos: [windows]
goarch: ["amd64"]
goarch: ["386", "amd64"]
fail-fast: true

name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
strategy:
matrix:
goos: [linux]
goarch: ["arm", "arm64", "amd64"]
goarch: ["arm", "arm64", "386", "amd64"]
fail-fast: true

name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build
Expand Down Expand Up @@ -167,7 +167,12 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y \
libc6-dev-i386 \
libpcre3-dev \
linux-libc-dev:i386
sudo apt-get install -y \
binutils-aarch64-linux-gnu \
binutils-arm-linux-gnueabihf \
Expand Down Expand Up @@ -247,6 +252,14 @@ jobs:
with:
ref: ${{ github.event.inputs.build-ref }}

- uses: ./.github/actions/vault-secrets
with:
paths: |-
kv/data/github/hashicorp/nomad-enterprise/gha ELEVATED_GITHUB_TOKEN ;
- name: Git config token
if: endsWith(github.repository, '-enterprise')
run: git config --global url.'https://${{ env.ELEVATED_GITHUB_TOKEN }}@github.com'.insteadOf 'https://github.com'

- name: Setup go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
Expand Down Expand Up @@ -324,3 +337,4 @@ jobs:
permissions:
contents: read
id-token: write
8 changes: 8 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ jobs:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
fetch-depth: 0 # needs tags for checkproto
- uses: ./.github/actions/vault-secrets
with:
paths: |-
kv/data/github/hashicorp/nomad-enterprise/gha ELEVATED_GITHUB_TOKEN ;
- name: Git config token
if: endsWith(github.repository, '-enterprise')
run: git config --global url.'https://${{ env.ELEVATED_GITHUB_TOKEN }}@github.com'.insteadOf 'https://github.com'
- uses: hashicorp/setup-golang@v1
- name: Run make check
run: |
Expand All @@ -34,3 +41,4 @@ jobs:
make check
permissions:
contents: read
id-token: write
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ jobs:
exit 1
fi
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Setup Git
- uses: ./.github/actions/vault-secrets
with:
paths: |-
kv/data/github/hashicorp/nomad-enterprise/gha ELEVATED_GITHUB_TOKEN ;
- name: Git config token
if: endsWith(github.repository, '-enterprise')
run: git config --global url.'https://${{ env.ELEVATED_GITHUB_TOKEN }}@github.com'.insteadOf 'https://github.com'
- name: Git config user/name
run: |-
if [ -n "${{ secrets.ELEVATED_GITHUB_TOKEN }}" ]; then
git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com/".insteadOf "https://github.com"
fi
git config --global user.email "github-team-nomad-core@hashicorp.com"
git config --global user.name "hc-github-team-nomad-core"
Expand Down Expand Up @@ -141,7 +145,7 @@ jobs:
- name: Invoke build workflow
id: invoke-build
env:
GH_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
GH_TOKEN: ${{ env.ELEVATED_GITHUB_TOKEN || secrets.ELEVATED_GITHUB_TOKEN }}
run: |
gh workflow run build.yml --ref ${{ github.ref_name }} --field build-ref=${{ steps.commit-change-push.outputs.build-ref }} --field make-prerelease=false
Expand Down Expand Up @@ -205,3 +209,4 @@ jobs:
permissions:
contents: write
id-token: write
8 changes: 8 additions & 0 deletions .github/workflows/test-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: ./.github/actions/vault-secrets
with:
paths: |-
kv/data/github/hashicorp/nomad-enterprise/gha ELEVATED_GITHUB_TOKEN ;
- name: Git config token
if: endsWith(github.repository, '-enterprise')
run: git config --global url.'https://${{ env.ELEVATED_GITHUB_TOKEN }}@github.com'.insteadOf 'https://github.com'
- uses: hashicorp/setup-golang@v1
- name: Get Go modules
run: |
Expand Down Expand Up @@ -120,3 +127,4 @@ jobs:
sudo -E env "PATH=$PATH" make test-nomad
permissions:
contents: read
id-token: write
8 changes: 8 additions & 0 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,17 @@ jobs:
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux"]') || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: ./.github/actions/vault-secrets
with:
paths: |-
kv/data/github/hashicorp/nomad-enterprise/gha ELEVATED_GITHUB_TOKEN ;
- name: Git config token
if: endsWith(github.repository, '-enterprise')
run: git config --global url.'https://${{ env.ELEVATED_GITHUB_TOKEN }}@github.com'.insteadOf 'https://github.com'
- uses: hashicorp/setup-golang@v1
- run: make deps
- run: make integration-test
- run: make e2e-test
permissions:
contents: read
id-token: write
13 changes: 11 additions & 2 deletions .github/workflows/test-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ jobs:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: ./.github/actions/setup-js
- uses: browser-actions/setup-chrome@c485fa3bab6be59dce18dbc18ef6ab7cbc8ff5f1 # v1.2.0
- uses: ./.github/actions/vault-secrets
with:
paths: |-
kv/data/teams/nomad/ui PERCY_TOKEN ;
- name: ember exam
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PERCY_TOKEN: ${{ env.PERCY_TOKEN || secrets.PERCY_TOKEN }}
PERCY_PARALLEL_NONCE: ${{ needs.pre-test.outputs.nonce }}
run: yarn exam:parallel --split=${{ matrix.split }} --partition=${{ matrix.partition }}

Expand All @@ -90,10 +94,15 @@ jobs:
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: ./.github/actions/setup-js
- uses: ./.github/actions/vault-secrets
with:
paths: |-
kv/data/teams/nomad/ui PERCY_TOKEN ;
- name: finalize
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PERCY_TOKEN: ${{ env.PERCY_TOKEN || secrets.PERCY_TOKEN }}
PERCY_PARALLEL_NONCE: ${{ needs.pre-test.outputs.nonce }}
run: yarn percy build:finalize
permissions:
contents: read
id-token: write
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

run:
# Timeout for analysis.
deadline: 10m
Expand Down
3 changes: 0 additions & 3 deletions .release/linux/package/etc/nomad.d/nomad.hcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

# Full configuration options can be found at https://www.nomadproject.io/docs/configuration

data_dir = "/opt/nomad/data"
Expand Down
3 changes: 0 additions & 3 deletions .release/release-metadata.hcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

url_license = "https://github.com/hashicorp/nomad/blob/main/LICENSE"
url_project_website = "https://www.nomadproject.io/"
url_source_repository = "https://github.com/hashicorp/nomad"
Loading

0 comments on commit 045185c

Please sign in to comment.