diff --git a/kots.yaml b/kots.yaml new file mode 100644 index 00000000000..408a51f334d --- /dev/null +++ b/kots.yaml @@ -0,0 +1,89 @@ +package: + name: kots + version: 1.100.3 + epoch: 0 + description: Kubernetes Off-The-Shelf (KOTS) Software + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - ca-certificates-bundle + - build-base + - busybox + - git + - go + - nodejs + - yarn + +pipeline: + - uses: fetch + with: + uri: https://github.com/replicatedhq/kots/archive/refs/tags/v${{package.version}}.tar.gz + expected-sha256: 400e7777e646238484c75ce738b366312205ed561e33efd699600b7ff1689472 + + - runs: | + set -x + export DESTDIR="${{targets.destdir}}" + mkdir -p "${DESTDIR}" + + # Mitigate GHSA-hqxw-f8mx-cpmw / CVE-2023-2253 + go get github.com/docker/distribution@v2.8.2-beta.1+incompatible + + go mod tidy + + # Scripts etc. + mv deploy/assets/backup.sh "${DESTDIR}/backup.sh" + mv deploy/assets/restore-db.sh "${DESTDIR}/restore-db.sh" + mv deploy/assets/restore-s3.sh "${DESTDIR}/restore-s3.sh" + mv deploy/assets/restore.sh "${DESTDIR}/restore.sh" + mv deploy/assets/migrate-s3.sh "${DESTDIR}/migrate-s3.sh" + mv deploy/assets/fs-minio-check.sh "${DESTDIR}/fs-minio-check.sh" + mv deploy/assets/fs-minio-reset.sh "${DESTDIR}/fs-minio-reset.sh" + mv deploy/assets/fs-minio-keys-sha.sh "${DESTDIR}/fs-minio-keys-sha.sh" + mv deploy/assets/s3-bucket-create.sh "${DESTDIR}/s3-bucket-create.sh" + mv deploy/assets/s3-bucket-head.sh "${DESTDIR}/s3-bucket-head.sh" + mv deploy/assets/kots-upgrade.sh "${DESTDIR}/kots-upgrade.sh" + mv deploy/assets/postgres "${DESTDIR}/postgres" + + # kotsadm and kots binaries + export VERSION=${{package.version}} + export GIT_TAG=${{package.version}} + + # Set environment variables from repository + source .image.env + + KOTS_KUSTOMIZE_BIN_DIR=/usr/local/bin + + # TODO: fix pact build error on arm https://github.com/pact-foundation/pact-js-core/issues/264 + export PACT_SKIP_BINARY_INSTALL=true + + # Configure Yarn + yarn install --pure-lockfile --network-concurrency 1 + + # removing tests for now to see if this builds + make -C web deps lint build-kotsadm + make vet kots build + + # make -C web deps lint test-unit build-kotsadm + # make vet ci-test kots build + + mv bin/kotsadm "${DESTDIR}/kotsadm" + mv bin/kots "${DESTDIR}/kots" + + # TODO: this is a manual intervention whenever helm bumps its major version + ln -s /usr/bin/helm ${{targets.destdir}}/usr/local/bin/helm + ln -s /usr/bin/helm ${{targets.destdir}}/usr/local/bin/helm3 + + # TODO: this is a manual intervention whenever kustomize bumps its major version + ln -s /usr/bin/kustomize ${{targets.destdir}}/usr/local/bin/kustomize + ln -s /usr/bin/kustomize ${{targets.destdir}}/usr/local/bin/kustomize5 + + ln -s /usr/bin/kubectl ${{targets.destdir}}/usr/local/bin/kubectl + +update: + enabled: true + github: + identifier: replicatedhq/kots + strip-prefix: v diff --git a/packages.txt b/packages.txt index 44fc4a681da..ceddd6916b3 100644 --- a/packages.txt +++ b/packages.txt @@ -818,4 +818,5 @@ slirp4netns local-path-provisioner fuse-overlayfs fuse-overlayfs-snapshotter +kots upx