Skip to content

Commit

Permalink
Replace references to old repository (#95)
Browse files Browse the repository at this point in the history
* Replace references to old repository

* Disable docker workflow for now

* add operator-sdk secrets

* Update signing to match operator-sdk

* Don't sign release by default

* Update Makefile

* Update kb version, cleanup ununsed packages, migrate helm/v1

Signed-off-by: varshaprasad96 <[email protected]>

Co-authored-by: varshaprasad96 <[email protected]>
  • Loading branch information
fabianvf and varshaprasad96 authored Jun 29, 2021
1 parent 6c6de15 commit dc6c589
Show file tree
Hide file tree
Showing 81 changed files with 994 additions and 4,160 deletions.
33 changes: 33 additions & 0 deletions .ci/gpg/create-keyring.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

# Modified from https://blogs.itemis.com/en/secure-your-travis-ci-releases-part-2-signature-with-openpgp

function err_exit() {
echo "ERROR: ${1:-"Unknown Error"} Exiting." 1>&2
exit 1
}

declare -r GPG_HOME="${DIR}/keyring"
declare -r SECRING_AUTO="${GPG_HOME}/secring.auto"
declare -r PUBRING_AUTO="${GPG_HOME}/pubring.auto"

mkdir -p "$GPG_HOME"
cp "${DIR}"/*.auto* "${GPG_HOME}"

echo -e "\nDecrypting secret key..."
{
# $GPG_PASSWORD is taken from the script's env (injected by CI).
echo $GPG_PASSWORD | gpg --decrypt \
--pinentry-mode loopback --batch \
--passphrase-fd 0 \
--output "${SECRING_AUTO}" \
"${SECRING_AUTO}".gpg ; \
} || { err_exit "Failed to decrypt secret key." ; }
echo "Success!"

echo -e "\nImporting keys..."
{ gpg --home "${GPG_HOME}" --import "${PUBRING_AUTO}" ; } || { err_exit "Could not import public key into gpg." ; }
{ gpg --home "${GPG_HOME}" --import "${SECRING_AUTO}" ; } || { err_exit "Could not import secret key into gpg." ; }
echo "Success!"
64 changes: 64 additions & 0 deletions .ci/gpg/pubring.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
-----BEGIN PGP PUBLIC KEY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gDo0d62QxrnJLl9OhuhObXP/bzCjrcMkg9hY
BAHaTXbRtVlSKpXYEyuwO6HYQ7WyHlY9y9srHIvcWuBrpI9Kgd28rkT4QZB5WJD/
Cgj4ksJAe+TsSmccdw3zG3OWWVs4HujQnWnh+NbBE7cyYqZaByKiDjL3vKP+0Zfj
M/TF8nnY7zqgSljQxScbW7//U3GiB9DKg1r9TEMzmSTDugwv7u2kM/iZPjq+dvUs
KqKuyX23WDKRLyzusDqIWKsRrkd+g1vBfxSUhWwxtwzyy1rL/tNcXGBuLOxjUit9
LhdowjFRG93Tswac/Q8VGPEB5XjBgRNlW9vSYgw+5wTHf01UBWgEWtFhl6SJnD6u
AjnMBtduqXBXmncTA6Gz5XB1h7xM32pLncWJGHfixXiJcOgGqW+Lv1Y3eaPqCFOm
4yfYDfBL+UN8Y7sR3WrVy1R6Ut/8bf4sD/i1UyBNKSzeN5sBpi7KgA6yY7PpVIN7
H7V1QN41Bw9vAG5WXCO8vmY0GoCMQAKM5p04mMuBr6nswy1W94q6uuINwq6q1ycf
YQJyoKhXifPhdicwDMYeuW7aP7WnPIb3VwdtlEyD+ycBsak0Jsq/+yrov3pXgrdL
dlF2O4uTr4frwKRl28eGEQ==
=ebPb
-----END PGP PUBLIC KEY BLOCK-----
Binary file added .ci/gpg/secring.auto.gpg
Binary file not shown.
16 changes: 9 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ jobs:
with:
fetch-depth: 0

- name: Import GPG Key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: gpg init
if: github.event_name != 'pull_request'
run: .ci/gpg/create-keyring.sh
env:
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}

- name: Install Go
uses: actions/setup-go@v2
Expand All @@ -42,6 +41,9 @@ jobs:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

docker:
# TODO(fabianvf): skip pushing images for now, reenable once we're
# working on migrating the official helm plugin here
if: ${{ false }}
name: Docker
runs-on: ubuntu-latest
steps:
Expand All @@ -54,7 +56,7 @@ jobs:
- name: Prepare
id: prep
run: |
IMG=quay.io/joelanford/helm-operator
IMG=quay.io/operator-framework/helm-operator
if [[ $GITHUB_REF == refs/tags/* ]]; then
TAG=${GITHUB_REF#refs/tags/}
MAJOR_MINOR=${TAG%.*}
Expand Down
7 changes: 4 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ env:
- CGO_ENABLED=0
- GO111MODULE=on
- GOPROXY=https://proxy.golang.org|direct
- VERSION_PKG=github.com/joelanford/helm-operator/internal/version
- VERSION_PKG=github.com/operator-framework/helm-operator-plugins/internal/version

# Hooks to run before any build is run.
before:
Expand Down Expand Up @@ -48,5 +48,6 @@ checksum:
name_template: "checksums.txt"

signs:
- artifacts: checksum
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
- signature: "${artifact}.asc"
artifacts: checksum
args: ["--home", ".ci/gpg/keyring", "-u", "A20B5C7E", "--output", "${signature}", "--detach-sign", "${artifact}"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ lint:
fetch golangci-lint 1.35.2 && golangci-lint run

.PHONY: release
release: GORELEASER_ARGS ?= --snapshot --rm-dist
release: GORELEASER_ARGS ?= --snapshot --rm-dist --skip-sign
release:
fetch goreleaser 0.156.2 && goreleaser $(GORELEASER_ARGS)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# helm-operator

[![Build Status](https://github.com/joelanford/helm-operator/workflows/CI/badge.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/joelanford/helm-operator/badge.svg?branch=master)](https://coveralls.io/github/joelanford/helm-operator?branch=master)
[![Build Status](https://github.com/operator-framework/helm-operator-plugins/workflows/CI/badge.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/operator-framework/helm-operator-plugins/badge.svg?branch=master)](https://coveralls.io/github/operator-framework/helm-operator-plugins?branch=master)

Experimental refactoring of the operator-framework's helm operator
2 changes: 1 addition & 1 deletion example/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/joelanford/helm-operator:main
FROM quay.io/operator-framework/helm-operator-plugins:main

ENV HOME=/opt/helm
COPY watches.yaml ${HOME}/watches.yaml
Expand Down
10 changes: 4 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/joelanford/helm-operator
module github.com/operator-framework/helm-operator-plugins

go 1.16

Expand All @@ -8,16 +8,14 @@ require (
github.com/go-logr/logr v0.3.0
github.com/iancoleman/strcase v0.1.2
github.com/kr/text v0.1.0
github.com/onsi/ginkgo v1.14.1
github.com/onsi/gomega v1.10.2
github.com/onsi/ginkgo v1.15.0
github.com/onsi/gomega v1.10.5
github.com/operator-framework/operator-lib v0.3.0
github.com/prometheus/client_golang v1.7.1
github.com/sirupsen/logrus v1.7.0
github.com/spf13/afero v1.2.2
github.com/spf13/cobra v1.1.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.6.1
golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5
gomodules.xyz/jsonpatch/v2 v2.1.0
helm.sh/helm/v3 v3.5.0
k8s.io/api v0.20.4
Expand All @@ -27,7 +25,7 @@ require (
k8s.io/client-go v0.20.4
k8s.io/kubectl v0.20.4
sigs.k8s.io/controller-runtime v0.8.2
sigs.k8s.io/kubebuilder/v3 v3.0.0-beta.0
sigs.k8s.io/kubebuilder/v3 v3.1.0
sigs.k8s.io/yaml v1.2.0
)

Expand Down
Loading

0 comments on commit dc6c589

Please sign in to comment.