Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Jul 16, 2024
1 parent eba9dcf commit 1814af0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 78 deletions.
50 changes: 15 additions & 35 deletions .github/workflows/deploy-helm-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,30 @@ on:

jobs:

build:
get-tag:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: |
export VERSION=${{steps.tag.outputs.tag}}
make build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: manager
path: ./bin/manager

package-and-publish-operator:
runs-on: ubuntu-latest
needs: [get-tag]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true
- name: Build melange package
run: |
export VERSION=${{steps.tag.outputs.tag}}
export VERSION=${{needs.get-tag.outputs.tag}}
make melange
- name: Publish apko image
run: |
export VERSION=${{steps.tag.outputs.tag}}
export VERSION=${{needs.get-tag.outputs.tag}}
export IMAGE=registry.replicated.com/library/embedded-cluster-operator-image:${VERSION}
make apko-login \
REGISTRY=registry.replicated.com \
Expand All @@ -58,13 +41,8 @@ jobs:
package-and-publish-helmchart:
runs-on: 'ubuntu-20.04'
needs: [package-and-publish-operator]
needs: [get-tag, package-and-publish-operator]
steps:
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true
- name: Checkout
uses: actions/checkout@v4
- name: Install Helm
Expand All @@ -77,7 +55,7 @@ jobs:
HELM_USER: ${{secrets.KOTS_HELM_USER_PROD}}
HELM_PASS: ${{secrets.KOTS_HELM_PASS_PROD}}
HELM_REGISTRY: registry.replicated.com
CHART_VERSION: ${{steps.tag.outputs.tag}}
CHART_VERSION: ${{needs.get-tag.outputs.tag}}
run: |
export OPERATOR_IMAGE_NAME=registry.replicated.com/library/embedded-cluster-operator-image
export OPERATOR_IMAGE_TAG=${CHART_VERSION}
Expand All @@ -87,13 +65,15 @@ jobs:
releaser:
runs-on: ubuntu-latest
needs: [build, package-and-publish-helmchart]
needs: [get-tag, package-and-publish-helmchart]
steps:
- uses: imjasonh/[email protected]
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: manager
path: bin/
run: |
mkdir -p bin
crane export --platform linux/amd64 registry.replicated.com/library/embedded-cluster-operator-image:${{needs.get-tag.outputs.tag}} \
| tar -Oxf - manager > bin/manager
chmod +x migrations/schemahero
- name: Release
uses: softprops/action-gh-release@v2
with:
Expand Down
38 changes: 8 additions & 30 deletions .github/workflows/deploy-helm-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,30 @@ on:

jobs:

build:
get-tag:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: |
export VERSION=${{steps.tag.outputs.tag}}
make build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: manager
path: ./bin/manager

package-and-publish-operator:
runs-on: ubuntu-latest
needs: [get-tag]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true
- name: Build melange package
run: |
export VERSION=${{steps.tag.outputs.tag}}
export VERSION=${{needs.get-tag.outputs.tag}}
make melange
- name: Publish apko image
run: |
export VERSION=${{steps.tag.outputs.tag}}
export VERSION=${{needs.get-tag.outputs.tag}}
export IMAGE=registry.staging.replicated.com/library/embedded-cluster-operator-image:${VERSION}
make apko-login \
REGISTRY=registry.staging.replicated.com \
Expand All @@ -58,13 +41,8 @@ jobs:
package-and-publish-helmchart:
runs-on: 'ubuntu-20.04'
needs: [package-and-publish-operator]
needs: [get-tag, package-and-publish-operator]
steps:
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true
- name: Checkout
uses: actions/checkout@v4
- name: Install Helm
Expand All @@ -77,7 +55,7 @@ jobs:
HELM_USER: ${{secrets.KOTS_HELM_USER_STAGING}}
HELM_PASS: ${{secrets.KOTS_HELM_PASS_STAGING}}
HELM_REGISTRY: registry.staging.replicated.com
CHART_VERSION: ${{steps.tag.outputs.tag}}
CHART_VERSION: ${{needs.get-tag.outputs.tag}}
run: |
export OPERATOR_IMAGE_NAME=registry.staging.replicated.com/library/embedded-cluster-operator-image
export OPERATOR_IMAGE_TAG=${CHART_VERSION}
Expand Down
32 changes: 19 additions & 13 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,22 @@ on:

jobs:

get-tag:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get tag
id: tag
run: echo "tag=$(git rev-parse --short=7 HEAD)" >> "$GITHUB_OUTPUT"

test:
runs-on: ubuntu-latest
needs: [get-tag]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -22,21 +36,17 @@ jobs:
build:
runs-on: ubuntu-latest
needs: [get-tag]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get tag
id: tag
run: echo "tag=$(git rev-parse --short=7 HEAD)" >> "$GITHUB_OUTPUT"
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: |
export VERSION=${{steps.tag.outputs.tag}}
export VERSION=${{needs.get-tag.outputs.tag}}
make build
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand All @@ -46,21 +56,17 @@ jobs:

package-operator:
runs-on: ubuntu-latest
needs: [get-tag]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get tag
id: tag
run: echo "tag=$(git rev-parse --short=7 HEAD)" >> "$GITHUB_OUTPUT"
- name: Build melange package
run: |
export VERSION=${{steps.tag.outputs.tag}}
export VERSION=${{needs.get-tag.outputs.tag}}
make melange
- name: Build apko image
run: |
export VERSION=${{steps.tag.outputs.tag}}
export VERSION=${{needs.get-tag.outputs.tag}}
export IMAGE=ttl.sh/embedded-cluster-operator-image:dev-${VERSION}
make apko-build
Expand Down

0 comments on commit 1814af0

Please sign in to comment.