Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introduce use of kapp-ctrl/packaging #87

Merged
merged 31 commits into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e5e00ae
git: ignore 'release' directory
Sep 14, 2021
9524050
config: add namespace object
Sep 14, 2021
4c18207
config: add missing secret type
Sep 16, 2021
baf6c2c
examples: use dockerconfigjson type for kpack
Sep 16, 2021
e17620f
hack/ci: remove scripts that are not ci specific
Sep 16, 2021
cf9538a
add packaging templates
Sep 16, 2021
219cf59
hack: re-introduce docker-login
Sep 16, 2021
43c42b9
hack: add release generation script
Sep 16, 2021
a2c18c8
hack: add release-notes.sh script
Sep 16, 2021
ab74dbc
hack: add github-release script
Sep 16, 2021
00e7e2f
hack: re-introduce cluster setup
Sep 16, 2021
fbc0ee8
hack: remove local-dev
Sep 16, 2021
ac4ca6c
makefile: remove targets covered by scripts
Sep 16, 2021
de73167
update install and release instructions
Sep 16, 2021
ac2e95b
github/validation: use new scripts
Sep 16, 2021
629b655
github/release: run tests + use own release script
Sep 16, 2021
dae02d6
hack: update release to add ytt
Sep 17, 2021
304e5e5
make: remove kodata target
Sep 17, 2021
0134108
hack: add checksum verification to install bins
Sep 17, 2021
490ec76
hack: make bin installs uniform
Sep 17, 2021
dc80591
hack: add checksum verification for ytt download
Sep 17, 2021
0db5853
hack: add bundle tarball generation
Sep 17, 2021
2e92696
github: make release workflow closer to testing
Sep 17, 2021
c441b7d
readme: bump cert-manager version
Sep 20, 2021
4b3c55e
hack: use variables for dependencies' versions
Sep 20, 2021
03a0f9c
readme: update instructions for installing using bundle
Sep 20, 2021
58d22d2
hack: default github-release to draft
Sep 20, 2021
dbcd8e0
refactor documentation to account tarball flow
Sep 20, 2021
866dc38
gh: run lint/copyright as early as possible
Sep 20, 2021
56b97cf
github: remove whitespace
Sep 22, 2021
d880c9e
hack: fix setting of current release version
Sep 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 32 additions & 23 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: build
name: release

on:
push:
Expand All @@ -24,32 +24,41 @@ jobs:
permissions:
contents: write
steps:
- name: Checkout
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
with: {fetch-depth: 0}

- name: Set up Go
- name: set up Go
uses: actions/setup-go@v2
with:
go-version: '~1.17.1'
with: {go-version: '~1.17.1'}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we switch to caret version matching? Go has committed to 1.x being compatible. go-version: '^1.17.1' ought to keep us on the latest minor and patch version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm!


- name: Set up Carvel
- name: check copyright header
run: |-
make copyright
[ -z "$(git status --porcelain)" ] || git diff HEAD --exit-code

- name: lint
run: |-
make lint
[ -z "$(git status --porcelain)" ] || git diff HEAD --exit-code

- name: setup base dependencies
run: |-
sudo apt update && sudo apt install -y curl tar
./hack/ci/install-binaries.sh ko kubebuilder kuttl gh

- name: setup carvel tooling binaries
uses: vmware-tanzu/carvel-setup-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Build
- name: run tests
env:
KUBEBUILDER_ASSETS: /usr/local/bin
run: make test

- name: run e2e example
run: ./hack/setup.sh cluster cartographer example-dependencies example

- name: submit github release
env:
KO_DOCKER_REPO: projectcartographer
DOCKER_USER: projectcartographer
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
run: hack/ci/create-release.sh

- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: "release.yaml"
bodyFile: "CHANGELOG.md"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./hack/publish-github-release.sh
61 changes: 18 additions & 43 deletions .github/workflows/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,61 +22,36 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: checkout
uses: actions/checkout@v2
with: {fetch-depth: 0}

- name: set up Go
uses: actions/setup-go@v2
with: {go-version: 1.17}
with: {go-version: '~1.17.1'}

- name: setup base OS dependencies
run: |-
sudo apt update && sudo apt install -y \
curl \
tar

- name: setup carvel tooling binaries
uses: vmware-tanzu/carvel-setup-action@v1

- name: setup all other binaries
- name: check copyright header
run: |-
set -o errexit
set -o nounset
set -o pipefail

export K8S_VERSION=1.19.2
export KUTTL_VERSION=0.11.1

pushd `mktemp -d`

curl -sSL "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-${K8S_VERSION}-linux-amd64.tar.gz" | tar xvzf -
sudo mv ./kubebuilder /usr/local
sudo chown -R `whoami` /usr/local/kubebuilder

curl -sSL -o kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v${KUTTL_VERSION}/kubectl-kuttl_${KUTTL_VERSION}_linux_x86_64
sudo install -m 0755 ./kubectl-kuttl /usr/local/bin

curl -sSL https://github.com/google/ko/releases/download/v0.8.1/ko_0.8.1_Linux_x86_64.tar.gz | tar -xvzf -
sudo install -m 0755 ./ko /usr/local/bin

popd
make copyright
[ -z "$(git status --porcelain)" ] || git diff HEAD --exit-code

- name: lint
run: |-
make lint
[ -z "$(git status --porcelain)" ] || git diff HEAD --exit-code

- name: run tests
- name: setup base dependencies
run: |-
export PATH=$PATH:/usr/local/kubebuilder/bin
make test
sudo apt update && sudo apt install -y curl tar
./hack/ci/install-binaries.sh ko kubebuilder kuttl

- name: run e2e example
run: |-
export PATH=$PATH:/usr/local/kubebuilder/bin
./hack/ci/e2e.sh
- name: setup carvel tooling binaries
uses: vmware-tanzu/carvel-setup-action@v1

- name: check copyright header
run: |-
make copyright
[ -z "$(git status --porcelain)" ] || git diff HEAD --exit-code
- name: run tests
env:
KUBEBUILDER_ASSETS: /usr/local/bin
run: make test

- name: run e2e example
run: ./hack/setup.sh cluster cartographer example-dependencies example
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ cmd/random
coverage.*

kubeconfig
release.yaml
releases
/release
Loading