forked from opensearch-project/opensearch-k8s-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b2c23b
commit 7d6d551
Showing
10 changed files
with
419 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Cheetah Release | ||
on: | ||
workflow_dispatch: | ||
push: | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
create-snapshot: | ||
uses: ./.github/workflows/docker-create-snapshot.yaml | ||
with: | ||
context: opensearch-operator | ||
image-name: opensearch-k8s-operator | ||
secrets: | ||
TRIFORK_GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Docker Create Snapshot | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
image-name: | ||
description: The name of the image to create a snapshot for | ||
required: true | ||
type: string | ||
context: | ||
description: The directory to run the workflow inside | ||
required: false | ||
type: string | ||
default: . | ||
dockerfile-path: | ||
description: The path to the Dockerfile. Defaults to {context}/Dockerfile | ||
required: false | ||
type: string | ||
secrets: | ||
TRIFORK_GITHUB_PAT: | ||
description: A personal access token with permission to publish a package to the Trifork GitHub container registry | ||
required: true | ||
|
||
jobs: | ||
create-snapshot: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the container registry | ||
uses: docker/login-action@1220aa36aaf257e736f1d64e3b87c4878665836f | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.TRIFORK_GITHUB_PAT }} | ||
|
||
- name: Get package suffix | ||
id: get-package-suffix | ||
run: echo "branch-name=$(echo '${{ github.ref_name }}' | sed 's/[^a-zA-Z0-9]/-/g')" >> $GITHUB_OUTPUT | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3 | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5 | ||
with: | ||
context: ${{ inputs.context }} | ||
file: ${{ inputs.dockerfile-path }} | ||
platforms: linux/amd64 | ||
tags: ghcr.io/trifork/${{ inputs.image-name }}:2.6.0-${{ steps.get-package-suffix.outputs.branch-name }}-SNAPSHOT-${{ github.run_number }} | ||
push: true | ||
secrets: | | ||
GITHUB_ACTOR=${{ github.actor }} | ||
GITHUB_TOKEN=${{ secrets.TRIFORK_GITHUB_PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
opensearch-operator/opensearch-gateway/responses/ISMPolicyResponse.go
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
opensearch-operator/opensearch-gateway/responses/IsmPolicy.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package responses | ||
|
||
import "github.com/Opster/opensearch-k8s-operator/opensearch-operator/opensearch-gateway/requests" | ||
|
||
type GetISMPolicyResponse struct { | ||
PolicyID string `json:"_id"` | ||
PrimaryTerm int `json:"_primary_term"` | ||
SequenceNumber int `json:"_seq_no"` | ||
Policy requests.ISMPolicySpec | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.