-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify the release script to include a release workflow for Lever (#1350
) * Modify release script to include a release workflow for Lever - add a flag RELEASE_USING_LEVER to release.sh (requires LEVER_KUBECONFIG as well) - use a Dockerfile for building as an alternative to the `ko` build process - Pin version of curl and remove extraneous deps from Dockerfile - Use dockerhub proxy cache for base images in Dockerfile [TSCC-392] Co-authored-by: Sam Coward <[email protected]>
- Loading branch information
1 parent
2f623f7
commit 0a5750b
Showing
5 changed files
with
184 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright 2021 VMware | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# These base images are behind a proxy for rate-limit reasons | ||
# If building locally, you can simply use: | ||
# docker build -t cartographer:dev --build-arg BASE_IMAGE="ubuntu:jammy" --build-arg GOLANG_IMAGE=golang:1.19 . | ||
|
||
ARG BASE_IMAGE=harbor-repo.vmware.com/dockerhub-proxy-cache/library/ubuntu:jammy | ||
ARG GOLANG_IMAGE=harbor-repo.vmware.com/dockerhub-proxy-cache/library/golang:1.19 | ||
|
||
FROM ${BASE_IMAGE} AS ytt | ||
|
||
RUN set -x && \ | ||
apt-get update && \ | ||
apt-get install -y curl=7.81.0-1ubuntu1.14 | ||
|
||
ARG ytt_CHECKSUM=a6729fb8514f10ab58f9ed3b50cd90ef79bf16d1cb29173baa84e1af0bc5ad4f | ||
ARG ytt_VERSION=0.45.3 | ||
|
||
RUN set -eux && \ | ||
url=https://github.com/vmware-tanzu/carvel-ytt/releases/download/v${ytt_VERSION}/ytt-linux-amd64 ; \ | ||
curl -sSL $url -o /usr/local/bin/ytt && \ | ||
echo "${ytt_CHECKSUM} /usr/local/bin/ytt" | sha256sum -c && \ | ||
chmod +x /usr/local/bin/ytt | ||
|
||
FROM ${GOLANG_IMAGE} AS cartographer | ||
WORKDIR /src | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
COPY cmd/ ./cmd/ | ||
COPY pkg/ ./pkg/ | ||
RUN GOOS=linux GOARCH=amd64 go build -o /build/ github.com/vmware-tanzu/cartographer/cmd/cartographer | ||
|
||
FROM gcr.io/paketo-buildpacks/run-jammy-tiny@sha256:35702d19f93e06041db1573b1140742df2182494cc93f646fd57c6d8922dc7a7 | ||
COPY --from=ytt /usr/local/bin/ytt /usr/local/bin/ytt | ||
COPY --from=cartographer /build/cartographer /usr/local/bin/cartographer | ||
ENTRYPOINT [ "cartographer" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright 2023 VMware | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
#@ load("@ytt:data", "data") | ||
--- | ||
apiVersion: supplychain.cc.build/v1alpha2 | ||
kind: Request | ||
metadata: | ||
name: #@ "cartographer-" + data.values.build_suffix | ||
namespace: default | ||
spec: | ||
artifacts: | ||
images: | ||
- name: #@ data.values.release_image | ||
buildType: kaniko | ||
buildConfig: | ||
kanikoBuildConfig: | ||
dockerfile: Dockerfile | ||
extraArgs: [] | ||
source: | ||
git: | ||
ref: | ||
commit: #@ data.values.commit_ref | ||
branch: unused | ||
url: https://github.com/vmware-tanzu/cartographer.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters