Skip to content

Commit

Permalink
Added Quary manifest generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvenga committed Aug 29, 2022
1 parent a4416fc commit c74ab88
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 7 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,36 @@ jobs:
BUILD_VERSION: ${{ needs.generate-version.outputs.version }}
steps:
- uses: actions/checkout@v3
- name: Generate Manifests
- uses: imranismail/setup-kustomize@v1
- name: Generate Manifests (Prod)
run: |
set -xe
cd ./manifests/install/prod
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
./kustomize edit set image 'contrast/agent-operator:${{ env.BUILD_VERSION }}'
kustomize edit set image 'contrast/agent-operator:${{ env.BUILD_VERSION }}'
cat ../../license-header.yaml > ./install-prod.yaml
./kustomize build ./ >> ./install-prod.yaml
kustomize build ./ >> ./install-prod.yaml
shell: bash
- name: Generate Manifests (Prod-Quay)
run: |
set -xe
cd ./manifests/install/prod-quay
kustomize edit set image 'quay.io/contrast/agent-operator:${{ env.BUILD_VERSION }}'
cat ../../license-header.yaml > ./install-prod-quay.yaml
kustomize build ./ >> ./install-prod-quay.yaml
shell: bash
- name: Stage Manifests
run: |
set -xe
cp manifests/install/prod/install-prod.yaml ./install-prod.yaml
cp manifests/install/prod-quay/install-prod-quay.yaml ./install-prod-quay.yaml
shell: bash
- name: Publish (Artifacts)
uses: actions/upload-artifact@v3
with:
name: manifests
path: manifests/install/prod/install-prod.yaml
path: |
install-prod.yaml
install-prod-quay.yaml
retention-days: 7
test-image:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Further documentation and examples can be found on [docs.contrastsecurity.com](h

## Releases

Builds released into the the `public` environment are are published to DockerHub. Manifests are uploaded to the [GitHub releases page](https://github.com/Contrast-Security-OSS/agent-operator/releases).
Builds released into the the `public` environment are are published to DockerHub and Quay. Manifests are uploaded to the [GitHub releases page](https://github.com/Contrast-Security-OSS/agent-operator/releases).

Releases are tagged using the following format:

Expand All @@ -46,7 +46,7 @@ contrast/agent-operator:1
contrast/agent-operator:latest
```

See [DockerHub tags](https://hub.docker.com/r/contrast/agent-operator/tags) for a list of all available tags.
See [DockerHub tags](https://hub.docker.com/r/contrast/agent-operator/tags) or [Quay tags](https://quay.io/repository/contrast/agent-operator?tab=tags) for a list of all available tags.

## Contributing

Expand Down
23 changes: 23 additions & 0 deletions manifests/install/prod-quay/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
bases:
- ../prod

images:
- name: contrast/agent-operator
newName: quay.io/contrast/agent-operator
newTag: latest

patchesStrategicMerge:
- |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: contrast-agent-operator
namespace: contrast-agent-operator
spec:
template:
spec:
containers:
- name: contrast-agent-operator
env:
- name: CONTRAST_DEFAULT_REGISTRY
value: "quay.io/contrast"

0 comments on commit c74ab88

Please sign in to comment.