Skip to content

Commit

Permalink
prepared for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
sionsmith committed Dec 14, 2023
1 parent 73fcdbe commit 7d1a193
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 250 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/cve-scan.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/e2e.yml

This file was deleted.

122 changes: 61 additions & 61 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,28 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Setup Helm
uses: azure/setup-helm@v3
with:
version: v3.12.3
# - name: Setup Helm
# uses: azure/setup-helm@v3
# with:
# version: v3.12.3
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Prepare
id: prep
run: |
Expand All @@ -62,7 +62,7 @@ jobs:
with:
images: |
docker.io/stefanprodan/podinfo
ghcr.io/stefanprodan/podinfo
# ghcr.io/stefanprodan/podinfo
tags: |
type=raw,value=${{ steps.prep.outputs.VERSION }}
type=raw,value=latest
Expand All @@ -80,35 +80,35 @@ jobs:
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Publish Timoni module to GHCR
run: |
timoni mod push ./timoni/podinfo oci://ghcr.io/stefanprodan/modules/podinfo \
--sign cosign \
--version ${{ steps.prep.outputs.VERSION }} \
-a 'org.opencontainers.image.source=https://github.com/stefanprodan/podinfo' \
-a 'org.opencontainers.image.licenses=Apache-2.0' \
-a 'org.opencontainers.image.description=A timoni.sh module for deploying Podinfo.' \
-a 'org.opencontainers.image.documentation=https://github.com/stefanprodan/podinfo/blob/main/timoni/podinfo/README.md'
- name: Publish Helm chart to GHCR
run: |
helm package charts/podinfo
helm push podinfo-${{ steps.prep.outputs.VERSION }}.tgz oci://ghcr.io/stefanprodan/charts
rm podinfo-${{ steps.prep.outputs.VERSION }}.tgz
- name: Publish Flux OCI artifact to GHCR
run: |
flux push artifact oci://ghcr.io/stefanprodan/manifests/podinfo:${{ steps.prep.outputs.VERSION }} \
--path="./kustomize" \
--source="${{ github.event.repository.html_url }}" \
--revision="${GITHUB_REF_NAME}/${GITHUB_SHA}"
flux tag artifact oci://ghcr.io/stefanprodan/manifests/podinfo:${{ steps.prep.outputs.VERSION }} --tag latest
- name: Sign OCI artifacts
env:
COSIGN_EXPERIMENTAL: 1
run: |
cosign sign docker.io/stefanprodan/podinfo:${{ steps.prep.outputs.VERSION }} --yes
cosign sign ghcr.io/stefanprodan/podinfo:${{ steps.prep.outputs.VERSION }} --yes
cosign sign ghcr.io/stefanprodan/charts/podinfo:${{ steps.prep.outputs.VERSION }} --yes
cosign sign ghcr.io/stefanprodan/manifests/podinfo:${{ steps.prep.outputs.VERSION }} --yes
# - name: Publish Timoni module to GHCR
# run: |
# timoni mod push ./timoni/podinfo oci://ghcr.io/stefanprodan/modules/podinfo \
# --sign cosign \
# --version ${{ steps.prep.outputs.VERSION }} \
# -a 'org.opencontainers.image.source=https://github.com/stefanprodan/podinfo' \
# -a 'org.opencontainers.image.licenses=Apache-2.0' \
# -a 'org.opencontainers.image.description=A timoni.sh module for deploying Podinfo.' \
# -a 'org.opencontainers.image.documentation=https://github.com/stefanprodan/podinfo/blob/main/timoni/podinfo/README.md'
# - name: Publish Helm chart to GHCR
# run: |
# helm package charts/podinfo
# helm push podinfo-${{ steps.prep.outputs.VERSION }}.tgz oci://ghcr.io/stefanprodan/charts
# rm podinfo-${{ steps.prep.outputs.VERSION }}.tgz
# - name: Publish Flux OCI artifact to GHCR
# run: |
# flux push artifact oci://ghcr.io/stefanprodan/manifests/podinfo:${{ steps.prep.outputs.VERSION }} \
# --path="./kustomize" \
# --source="${{ github.event.repository.html_url }}" \
# --revision="${GITHUB_REF_NAME}/${GITHUB_SHA}"
# flux tag artifact oci://ghcr.io/stefanprodan/manifests/podinfo:${{ steps.prep.outputs.VERSION }} --tag latest
# - name: Sign OCI artifacts
# env:
# COSIGN_EXPERIMENTAL: 1
# run: |
# cosign sign docker.io/stefanprodan/podinfo:${{ steps.prep.outputs.VERSION }} --yes
# cosign sign ghcr.io/stefanprodan/podinfo:${{ steps.prep.outputs.VERSION }} --yes
# cosign sign ghcr.io/stefanprodan/charts/podinfo:${{ steps.prep.outputs.VERSION }} --yes
# cosign sign ghcr.io/stefanprodan/manifests/podinfo:${{ steps.prep.outputs.VERSION }} --yes
- name: Publish base image
uses: docker/build-push-action@v5
with:
Expand All @@ -117,26 +117,26 @@ jobs:
context: .
platforms: linux/amd64
file: ./Dockerfile.base
tags: docker.io/stefanprodan/podinfo-base:latest
- name: Publish helm chart
uses: stefanprodan/helm-gh-pages@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish config artifact
run: |
flux push artifact oci://ghcr.io/stefanprodan/podinfo-deploy:${{ steps.prep.outputs.VERSION }} \
--path="./kustomize" \
--source="${{ github.event.repository.html_url }}" \
--revision="${GITHUB_REF_NAME}/${GITHUB_SHA}"
flux tag artifact oci://ghcr.io/stefanprodan/podinfo-deploy:${{ steps.prep.outputs.VERSION }} --tag latest
- name: Sign config artifact
run: |
echo "$COSIGN_KEY" > /tmp/cosign.key
cosign sign -key /tmp/cosign.key ghcr.io/stefanprodan/podinfo-deploy:${{ steps.prep.outputs.VERSION }} --yes
cosign sign -key /tmp/cosign.key ghcr.io/stefanprodan/podinfo-deploy:latest --yes
env:
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
COSIGN_KEY: ${{secrets.COSIGN_KEY}}
tags: docker.io/osodevops/podinfo-base:latest
# - name: Publish helm chart
# uses: stefanprodan/helm-gh-pages@master
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Publish config artifact
# run: |
# flux push artifact oci://ghcr.io/stefanprodan/podinfo-deploy:${{ steps.prep.outputs.VERSION }} \
# --path="./kustomize" \
# --source="${{ github.event.repository.html_url }}" \
# --revision="${GITHUB_REF_NAME}/${GITHUB_SHA}"
# flux tag artifact oci://ghcr.io/stefanprodan/podinfo-deploy:${{ steps.prep.outputs.VERSION }} --tag latest
# - name: Sign config artifact
# run: |
# echo "$COSIGN_KEY" > /tmp/cosign.key
# cosign sign -key /tmp/cosign.key ghcr.io/stefanprodan/podinfo-deploy:${{ steps.prep.outputs.VERSION }} --yes
# cosign sign -key /tmp/cosign.key ghcr.io/stefanprodan/podinfo-deploy:latest --yes
# env:
# COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
# COSIGN_KEY: ${{secrets.COSIGN_KEY}}
- uses: ./.github/actions/release-notes
- name: Generate release notes
run: |
Expand Down
72 changes: 0 additions & 72 deletions .github/workflows/test.yml

This file was deleted.

6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ COPY . .
RUN go mod download

RUN CGO_ENABLED=0 go build -ldflags "-s -w \
-X github.com/stefanprodan/podinfo/pkg/version.REVISION=${REVISION}" \
-X github.com/osodevops/podinfo/pkg/version.REVISION=${REVISION}" \
-a -o bin/podinfo cmd/podinfo/*

RUN CGO_ENABLED=0 go build -ldflags "-s -w \
-X github.com/stefanprodan/podinfo/pkg/version.REVISION=${REVISION}" \
-X github.com/osodevops/podinfo/pkg/version.REVISION=${REVISION}" \
-a -o bin/podcli cmd/podcli/*

FROM alpine:3.18
Expand All @@ -24,8 +24,6 @@ ARG BUILD_DATE
ARG VERSION
ARG REVISION

LABEL maintainer="stefanprodan"

RUN addgroup -S app \
&& adduser -S -G app app \
&& apk --no-cache add \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ oci://ghcr.io/stefanprodan/charts/podinfo
#### Kustomize

```bash
kubectl apply -k github.com/stefanprodan/podinfo//kustomize
kubectl apply -k https://github.com/osodevops/podinfo//kustomize
```

#### Docker

```bash
docker run -dp 9898:9898 stefanprodan/podinfo
docker run -dp 9898:9898 osodevops/podinfo
```

### Continuous Delivery
Expand Down

0 comments on commit 7d1a193

Please sign in to comment.