Skip to content

Commit

Permalink
Update 1.29.7 (#3)
Browse files Browse the repository at this point in the history
* fix: UI crashes when running pipeline(s) with many stages. (backport spinnaker#9960) (spinnaker#9974)

Co-authored-by: armory-abedonik <[email protected]>

* Revert "fix(core): conditionally hide expression evaluation warning messages (spinnaker#9771)" (spinnaker#10021) (spinnaker#10025)

This reverts commit 7e3dd50.

(cherry picked from commit 62033d0)

Co-authored-by: Matt Gogerly <[email protected]>

* fix: Scaling bounds should parse float not int (spinnaker#10026) (spinnaker#10035)

* fix: Scaling bounds should parse float not int

Currently the API can do this, the model supports this, but the parseInt removes decimals from the UI

* fix: Decimal support for upper/lower bound ASG tests

(cherry picked from commit b763cae)

Co-authored-by: Jason <[email protected]>

* Fix CreateSecurityGroups ternary

* Remove failing test for disabled action

* Temporally adding GH workflows to build Docker from this branch

* Temporally disabling other GHA workflows

* Adding 'thd' prefix to IMAGE_NAME env var

* Changing image name from 'deck' to 'thd-deck'

* Apply master GHA changes

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: armory-abedonik <[email protected]>
Co-authored-by: Matt Gogerly <[email protected]>
Co-authored-by: Jason <[email protected]>
Co-authored-by: Rodrigo Tovar <[email protected]>
  • Loading branch information
6 people authored Apr 4, 2024
1 parent 0a8d106 commit c446802
Show file tree
Hide file tree
Showing 14 changed files with 185 additions and 578 deletions.
125 changes: 50 additions & 75 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,99 +1,74 @@
name: Branch Build
name: "Build Docker image for Deck and push it to GitHub Container Registry"

on:
push:
branches:
- master
- release-*
workflow_call:
inputs:
IMAGE_VERSION:
description: "Version to use for image tag"
required: true
default: "0.0.0"
type: string
BRANCH:
description: "Git branch to fetch code from"
required: true
default: "master"
type: string

env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx2g -Xms2g
CONTAINER_REGISTRY: us-docker.pkg.dev/spinnaker-community/docker
NODE_VERSION: 12.16.0

permissions:
contents: read
CONTAINER_REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/thd-${{ github.event.repository.name }}

jobs:
branch-build:
# Only run this on repositories in the 'spinnaker' org, not on forks.
if: startsWith(github.repository, 'spinnaker/')
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.BRANCH }}

- 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/download-artifact@v4
with:
node-version: ${{ env.NODE_VERSION }}
name: build
path: build/webpack

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Set release info
run: |
release_version=${{ inputs.IMAGE_VERSION }}
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
echo "TAGS=${{ env.CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }}:$release_version" >> $GITHUB_ENV
- uses: actions/cache@v1
- name: Login
uses: docker/login-action@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
registry: ${{ env.CONTAINER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'
cache: 'gradle'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Prepare build variables
id: build_variables
- name: Set up docker context for buildx
id: buildx-context
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')"
- name: Build
env:
ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }}
run: ./gradlew build --stacktrace

- 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
# use service account flow defined at: https://github.com/docker/login-action#service-account-based-authentication-1
with:
registry: us-docker.pkg.dev
username: _json_key
password: ${{ secrets.GAR_JSON_KEY }}
docker context create builders
- 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
- name: Set up docker buildx
uses: docker/setup-buildx-action@v3
with:
context: .
file: Dockerfile.slim
platforms: linux/amd64,linux/arm64
push: true
tags: |
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ github.ref_name }}-latest-unvalidated"
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-unvalidated"
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ github.ref_name }}-latest-unvalidated-slim"
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-unvalidated-slim"
endpoint: builders
driver-opts: |
image=moby/buildkit:master
- 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
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubuntu
platforms: linux/amd64,linux/arm64
push: true
tags: |
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ github.ref_name }}-latest-unvalidated-ubuntu"
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-unvalidated-ubuntu"
file: "./Dockerfile.ubuntu"
platforms: linux/amd64
tags: ${{ env.TAGS }}
labels: |
org.opencontainers.image.source=https://github.com/${{ env.IMAGE_NAME }}
org.opencontainers.image.version=${{ env.RELEASE_VERSION }}
74 changes: 74 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: "Build Docker image for Deck and push it to GitHub Container Registry"

on:
workflow_call:
inputs:
IMAGE_VERSION:
description: "Version to use for image tag"
required: true
default: "0.0.0"
type: string
BRANCH:
description: "Git branch to fetch code from"
required: true
default: "master"
type: string

env:
CONTAINER_REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/thd-${{ github.event.repository.name }}

jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.BRANCH }}

- uses: actions/download-artifact@v4
with:
name: build
path: build/webpack

- name: Set release info
run: |
release_version=${{ inputs.IMAGE_VERSION }}
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
echo "TAGS=${{ env.CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }}:$release_version" >> $GITHUB_ENV
- name: Login
uses: docker/login-action@v3
with:
registry: ${{ env.CONTAINER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up docker context for buildx
id: buildx-context
run: |
docker context create builders
- name: Set up docker buildx
uses: docker/setup-buildx-action@v3
with:
endpoint: builders
driver-opts: |
image=moby/buildkit:master
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
push: true
file: "./Dockerfile.ubuntu"
platforms: linux/amd64
tags: ${{ env.TAGS }}
labels: |
org.opencontainers.image.source=https://github.com/${{ env.IMAGE_NAME }}
org.opencontainers.image.version=${{ env.RELEASE_VERSION }}
118 changes: 0 additions & 118 deletions .github/workflows/package-bump-pr.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
workflow_dispatch:
inputs:
BRANCH:
description: 'Git branch to fetch code from'
required: true
default: 'master'
type: string
THD_DECK_VERSION:
description: 'Version of THD Deck'
required: true
default: "0.0.0"
type: string

jobs:
build:
uses: ./.github/workflows/build.yml
with:
BRANCH: ${{ inputs.BRANCH }}

docker:
needs: build
uses: ./.github/workflows/docker-build.yml
with:
BRANCH: ${{ inputs.BRANCH }}
IMAGE_VERSION: ${{ inputs.THD_DECK_VERSION }}
Loading

0 comments on commit c446802

Please sign in to comment.