Skip to content

Commit

Permalink
Merge branch 'spinnaker:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
pballandras authored Sep 19, 2023
2 parents d23ef62 + d1932d3 commit 1bb1ac3
Show file tree
Hide file tree
Showing 244 changed files with 9,480 additions and 777 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ updates:
- dependency-name: '@spinnaker/kayenta'
- dependency-name: '@spinnaker/styleguide'
- dependency-name: '@spinnaker/presentation'
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx2g -Xms2g
CONTAINER_REGISTRY: us-docker.pkg.dev/spinnaker-community/docker
NODE_VERSION: 12.16.0
NODE_VERSION: 14.21.3

permissions:
contents: read
Expand All @@ -20,30 +20,30 @@ jobs:
if: startsWith(github.repository, 'spinnaker/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'
Expand All @@ -52,8 +52,8 @@ jobs:
- name: Prepare build variables
id: build_variables
run: |
echo ::set-output name=REPO::${GITHUB_REPOSITORY##*/}
echo ::set-output name=VERSION::"$(git describe --tags --abbrev=0 --match="v[0-9]*" | cut -c2-)-dev-${GITHUB_REF_NAME}-$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')"
echo REPO=${GITHUB_REPOSITORY##*/} >> $GITHUB_OUTPUT
echo VERSION="$(git describe --tags --abbrev=0 --match="v[0-9]*" | cut -c2-)-dev-${GITHUB_REF_NAME}-$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
- name: Build
env:
Expand All @@ -63,7 +63,7 @@ jobs:
- name: Login to GAR
# Only run this on repositories in the 'spinnaker' org, not on forks.
if: startsWith(github.repository, 'spinnaker/')
uses: docker/login-action@v1
uses: docker/login-action@v2
# use service account flow defined at: https://github.com/docker/login-action#service-account-based-authentication-1
with:
registry: us-docker.pkg.dev
Expand All @@ -73,7 +73,7 @@ jobs:
- name: Build and publish slim container image
# Only run this on repositories in the 'spinnaker' org, not on forks.
if: startsWith(github.repository, 'spinnaker/')
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.slim
Expand All @@ -88,7 +88,7 @@ jobs:
- name: Build and publish ubuntu container image
# Only run this on repositories in the 'spinnaker' org, not on forks.
if: startsWith(github.repository, 'spinnaker/')
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.ubuntu
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/package-bump-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ on:
- '@spinnaker/*'

env:
NODE_VERSION: 12.16.0
NODE_VERSION: 14.21.3

jobs:
build:
# Only run this on repositories in the 'spinnaker' org, not on forks.
if: startsWith(github.repository, 'spinnaker/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: master
Expand All @@ -31,15 +31,15 @@ jobs:
git config user.email spinnakerbot@spinnaker.io
git checkout master
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: yarn - get cache dir
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -65,7 +65,7 @@ jobs:
PEERDEP_BUMP_COMMIT_HASH: ${{ steps.lerna_bump.outputs.peerdepBumpCommitHash }}
- name: Create Pull Request
id: createpullrequest
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v5
with:
token: '${{ secrets.SPINNAKERBOT_PERSONAL_ACCESS_TOKEN }}'
commit-message: 'chore(package): Publish ${{ steps.bumps.outputs.bumps }}'
Expand All @@ -92,27 +92,27 @@ jobs:
- name: Close package bump due to no changes
if: ${{ steps.lerna_bump.outputs.packageBumpCommitHash == '' && steps.createpullrequest.outputs.pull-request-number != '' }}
uses: actions/github-script@0.9.0
uses: actions/github-script@v6.4.1
with:
github-token: '${{ secrets.SPINNAKERBOT_PERSONAL_ACCESS_TOKEN }}'
script: |
const { owner, repo } = context.repo;
const pull_number = ${{ steps.createpullrequest.outputs.pull-request-number }};
await github.pulls.update({ owner, repo, pull_number, state: 'closed' });
await github.rest.pulls.update({ owner, repo, pull_number, state: 'closed' });
- name: Approve package bump
if: ${{ steps.lerna_bump.outputs.packageBumpCommitHash != '' && steps.createpullrequest.outputs.pull-request-number != '' }}
uses: actions/github-script@0.9.0
uses: actions/github-script@v6.4.1
with:
github-token: '${{ secrets.SPINNAKERBOT_TOKEN }}'
script: |
const { owner, repo } = context.repo;
const pull_number = ${{ steps.createpullrequest.outputs.pull-request-number }};
const users = ['spinnakerbot', 'spinnakerbot2'];
const reviews = await github.pulls.listReviews({ owner, repo, pull_number });
const reviews = await github.rest.pulls.listReviews({ owner, repo, pull_number });
const approved = reviews.data.some((review) => users.includes(review.user.login) && review.state == 'APPROVED');
if (!approved) {
await github.pulls.createReview({ owner, repo, pull_number, event: 'APPROVE' });
await github.rest.pulls.createReview({ owner, repo, pull_number, event: 'APPROVE' });
}
20 changes: 10 additions & 10 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [ pull_request ]
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx2g -Xms2g
CONTAINER_REGISTRY: us-docker.pkg.dev/spinnaker-community/docker
NODE_VERSION: 12.16.0
NODE_VERSION: 14.21.3

permissions:
contents: read
Expand All @@ -14,30 +14,30 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'
Expand All @@ -46,16 +46,16 @@ jobs:
- name: Prepare build variables
id: build_variables
run: |
echo ::set-output name=REPO::${GITHUB_REPOSITORY##*/}
echo ::set-output name=VERSION::"$(git describe --tags --abbrev=0 --match="v[0-9]*" | cut -c2-)-dev-pr-$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')"
echo REPO=${GITHUB_REPOSITORY##*/} >> $GITHUB_OUTPUT
echo VERSION="$(git describe --tags --abbrev=0 --match="v[0-9]*" | cut -c2-)-dev-pr-$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
- name: Build
env:
ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }}
run: ./gradlew build

- name: Build slim container image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.slim
Expand All @@ -67,7 +67,7 @@ jobs:
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-slim"
- name: Build ubuntu container image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.ubuntu
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'packages/*/package.json'

env:
NODE_VERSION: 12.16.0
NODE_VERSION: 14.21.3

permissions:
contents: read
Expand All @@ -20,12 +20,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: '${{ secrets.SPINNAKERBOT_PERSONAL_ACCESS_TOKEN }}'

- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

Expand Down
43 changes: 21 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,36 @@ on:
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx2g -Xms2g
CONTAINER_REGISTRY: us-docker.pkg.dev/spinnaker-community/docker
NODE_VERSION: 12.16.0
NODE_VERSION: 14.21.3

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'
Expand All @@ -49,15 +49,15 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
. .github/workflows/release_info.sh ${{ github.event.repository.full_name }}
echo ::set-output name=CHANGELOG::$(echo -e "${CHANGELOG}")
echo ::set-output name=SKIP_RELEASE::${SKIP_RELEASE}
echo ::set-output name=IS_CANDIDATE::${IS_CANDIDATE}
echo ::set-output name=RELEASE_VERSION::${RELEASE_VERSION}
echo CHANGELOG=$(echo -e "${CHANGELOG}") >> $GITHUB_OUTPUT
echo SKIP_RELEASE=${SKIP_RELEASE} >> $GITHUB_OUTPUT
echo IS_CANDIDATE=${IS_CANDIDATE} >> $GITHUB_OUTPUT
echo RELEASE_VERSION=${RELEASE_VERSION} >> $GITHUB_OUTPUT
- name: Prepare build variables
id: build_variables
run: |
echo ::set-output name=REPO::${GITHUB_REPOSITORY##*/}
echo ::set-output name=VERSION::"$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')"
echo REPO=${GITHUB_REPOSITORY##*/} >> $GITHUB_OUTPUT
echo VERSION="$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
- name: Release build
env:
ORG_GRADLE_PROJECT_version: ${{ steps.release_info.outputs.RELEASE_VERSION }}
Expand All @@ -78,23 +78,23 @@ jobs:
- name: Login to Google Cloud
# Only run this on repositories in the 'spinnaker' org, not on forks.
if: startsWith(github.repository, 'spinnaker/')
uses: 'google-github-actions/auth@v0'
uses: 'google-github-actions/auth@v1'
# use service account flow defined at: https://github.com/google-github-actions/upload-cloud-storage#authenticating-via-service-account-key-json
with:
credentials_json: '${{ secrets.GAR_JSON_KEY }}'
- name: Upload halconfig profiles to GCS
# https://console.cloud.google.com/storage/browser/halconfig
# Only run this on repositories in the 'spinnaker' org, not on forks.
if: startsWith(github.repository, 'spinnaker/')
uses: 'google-github-actions/upload-cloud-storage@v0'
uses: 'google-github-actions/upload-cloud-storage@v1'
with:
path: 'halconfig/'
destination: 'halconfig/${{ steps.build_variables.outputs.REPO }}/${{ steps.release_info.outputs.RELEASE_VERSION }}'
parent: false
- name: Login to GAR
# Only run this on repositories in the 'spinnaker' org, not on forks.
if: startsWith(github.repository, 'spinnaker/')
uses: docker/login-action@v1
uses: docker/login-action@v2
# use service account flow defined at: https://github.com/docker/login-action#service-account-based-authentication-1
with:
registry: us-docker.pkg.dev
Expand All @@ -103,7 +103,7 @@ jobs:
- name: Build and publish slim container image
# Only run this on repositories in the 'spinnaker' org, not on forks.
if: startsWith(github.repository, 'spinnaker/')
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.slim
Expand All @@ -116,7 +116,7 @@ jobs:
- name: Build and publish ubuntu container image
# Only run this on repositories in the 'spinnaker' org, not on forks.
if: startsWith(github.repository, 'spinnaker/')
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.ubuntu
Expand All @@ -127,13 +127,12 @@ jobs:
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-${{ steps.build_variables.outputs.VERSION }}-unvalidated-ubuntu"
- name: Create release
if: steps.release_info.outputs.SKIP_RELEASE == 'false'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.event.repository.name }} ${{ github.ref }}
body: |
${{ steps.release_info.outputs.CHANGELOG }}
draft: false
name: ${{ github.event.repository.name }} ${{ github.ref_name }}
prerelease: ${{ steps.release_info.outputs.IS_CANDIDATE }}
tag_name: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 1bb1ac3

Please sign in to comment.