Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
cc47b27
Added multiarch Teleport builds
fheinecke Aug 10, 2022
2a8c4fd
Fixed run issues
fheinecke Aug 10, 2022
c80d4e2
Removed testing code and added teleport lab build
fheinecke Aug 11, 2022
9318e00
Merged dockerfiles for local builds
fheinecke Aug 12, 2022
20178ae
Updated dockerfile to support debs pulled from APT
fheinecke Aug 12, 2022
857e5ab
Cleaned up pipelines
fheinecke Aug 12, 2022
67baaf5
Fixed version issue across different triggers
fheinecke Aug 13, 2022
daf0c8c
Added prerelease check to promote pipeline
fheinecke Aug 13, 2022
447d001
Fixed image naming issue
fheinecke Aug 13, 2022
808b429
More lin
fheinecke Aug 13, 2022
841ecf6
More linting fixes
fheinecke Aug 13, 2022
048170b
Merge branch 'master' into fred/arm-container-images
fheinecke Aug 13, 2022
ca7646a
Checkpoint
fheinecke Aug 15, 2022
ed46a08
Checkpoint
fheinecke Aug 15, 2022
25568e2
Checkpoint
fheinecke Aug 16, 2022
1fa04cd
Added operator support
fheinecke Aug 23, 2022
9fb25fb
Fixed dockerfile path in dronegen
fheinecke Aug 23, 2022
4915603
Moved deb download from dockerfile to Drone
fheinecke Aug 23, 2022
d049c04
Renamed "teleportVersion" to "releaseVersion"
fheinecke Aug 23, 2022
47ecfcb
Refractoring
fheinecke Aug 23, 2022
2ebbc3f
Removed old pipelines
fheinecke Aug 23, 2022
7717225
Shell expansion fix + testing change
fheinecke Aug 30, 2022
a4abc56
Removed ent/ent-fips teleport lab
fheinecke Aug 30, 2022
328bc12
changed golang tag to include git
fheinecke Aug 30, 2022
ee09e4d
Fixed out of order setup steps
fheinecke Aug 30, 2022
24b7b79
Added query-latest logging
fheinecke Aug 30, 2022
673981b
Bash typo fix
fheinecke Aug 30, 2022
d073847
Changed git fetch in cloneRepoCommands
fheinecke Aug 30, 2022
87c1fbf
Fixed git origin fetching
fheinecke Aug 30, 2022
85b0e37
Drone $ escape fix
fheinecke Aug 30, 2022
8e7d16d
Typo fix
fheinecke Aug 30, 2022
7187f81
Var expansion fix
fheinecke Aug 30, 2022
062cc93
Fixed arch-related issue with deb naming and downloading
fheinecke Sep 2, 2022
4f538b9
Fixed teleport deb download command order
fheinecke Sep 2, 2022
41cc80b
Fixed non-existant curl dest dir
fheinecke Sep 2, 2022
eefb51d
Logging
fheinecke Sep 2, 2022
ca643c3
cd to download dir
fheinecke Sep 2, 2022
02893d0
echo fix
fheinecke Sep 2, 2022
0af19be
armhf fix
fheinecke Sep 2, 2022
d8442fb
Docker build command fix
fheinecke Sep 2, 2022
a633884
docker build target fix
fheinecke Sep 2, 2022
5ae504f
Buildx implementation and operator CGO fix
fheinecke Sep 5, 2022
60779f6
Testing branch fix
fheinecke Sep 5, 2022
e119bd9
Build for drone
fheinecke Sep 5, 2022
0b11cdf
Added trigger on push
fheinecke Sep 6, 2022
a87edc3
Reduced step name length
fheinecke Sep 6, 2022
2274158
Test
fheinecke Sep 6, 2022
a408e84
Test 2
fheinecke Sep 6, 2022
e720437
Test3
fheinecke Sep 6, 2022
8c2257a
Test no promote
fheinecke Sep 6, 2022
d03ac07
Resign
fheinecke Sep 6, 2022
1859c55
Promote duplicate step fix
fheinecke Sep 6, 2022
ce3a733
Resource requests attempt
fheinecke Sep 6, 2022
88d04bc
Attempt 2
fheinecke Sep 6, 2022
d4a3003
Attempt 3
fheinecke Sep 6, 2022
550c84d
Removed resource requests
fheinecke Sep 6, 2022
9dc4c64
( fix
fheinecke Sep 6, 2022
1170cf7
Revert fix
fheinecke Sep 6, 2022
74529da
Attempt 2
fheinecke Sep 6, 2022
d9bb38b
Attempt 3
fheinecke Sep 6, 2022
81a13f3
Moved debs
fheinecke Sep 6, 2022
e150a0b
Relative path fix
fheinecke Sep 7, 2022
47122b0
Run binfmt install all on docker build
fheinecke Sep 7, 2022
b93e946
Testing to pull from local branch
fheinecke Sep 7, 2022
dc0d454
COMPILER_NAME fix
fheinecke Sep 7, 2022
ce2f787
Typo fixes
fheinecke Sep 7, 2022
95f48b1
Added testing secrets
fheinecke Sep 7, 2022
15cbed2
Typo fix
fheinecke Sep 7, 2022
97199d9
Typo fix 2
fheinecke Sep 7, 2022
5a36679
Public ECR region fix
fheinecke Sep 7, 2022
5573eb0
Operator testing fix
fheinecke Sep 7, 2022
bd9bf2e
Dockerfile typo fix
fheinecke Sep 7, 2022
baac1ce
Testing reg fix
fheinecke Sep 13, 2022
a498fe1
Added buildx local cache
fheinecke Sep 13, 2022
6103dc9
buildkit -> buildx syntax
fheinecke Sep 13, 2022
f01fd24
Added drone-docker-registry
fheinecke Sep 13, 2022
5f7dfe3
Pushed build image to local registry
fheinecke Sep 13, 2022
e589d30
Load then push
fheinecke Sep 13, 2022
0ea7324
Added buildx config
fheinecke Sep 13, 2022
23463cb
Set buildx network=host
fheinecke Sep 13, 2022
3ccbab7
Fixed lab working dir
fheinecke Sep 13, 2022
f337e3a
Fixed lab dockerfile
fheinecke Sep 13, 2022
388d0cc
Linting fixes
fheinecke Sep 13, 2022
5dffedf
Linting fix
fheinecke Sep 13, 2022
e53ee9f
Added multi tag support and increased step name readability
fheinecke Sep 20, 2022
ff72df6
Removed old unused funcs
fheinecke Sep 20, 2022
89b841c
Fixed step naming
fheinecke Sep 20, 2022
095a710
Typo fix
fheinecke Sep 20, 2022
8e8df7e
Reworked how image information is passed around
fheinecke Sep 22, 2022
3233d69
Drone retrigger
fheinecke Sep 22, 2022
d334d7f
Cleaned buildx builder name
fheinecke Sep 22, 2022
8695733
Renamed vars
fheinecke Sep 23, 2022
d779f8d
Removed array length check
fheinecke Sep 23, 2022
12e0481
Fixed docs
fheinecke Sep 23, 2022
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
16,100 changes: 15,369 additions & 731 deletions .drone.yml

Large diffs are not rendered by default.

74 changes: 23 additions & 51 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
# Master/dev branch: "1.0.0-dev"
VERSION=11.0.0-dev

DOCKER_IMAGE_QUAY ?= quay.io/gravitational/teleport
DOCKER_IMAGE_ECR ?= public.ecr.aws/gravitational/teleport
DOCKER_IMAGE_STAGING ?= 146628656107.dkr.ecr.us-west-2.amazonaws.com/gravitational/teleport
DOCKER_IMAGE ?= teleport
DOCKER_IMAGE_OPERATOR_STAGING ?= 146628656107.dkr.ecr.us-west-2.amazonaws.com/gravitational/teleport-operator


GOPATH ?= $(shell go env GOPATH)

# These are standard autotools variables, don't change them please
Expand Down Expand Up @@ -368,11 +365,10 @@ release-arm64:
$(MAKE) release ARCH=arm64

#
# make release-unix - Produces a binary release tarball containing teleport,
# tctl, and tsh.
# make build-archive - Packages the results of a build into a release tarball
#
.PHONY:
release-unix: clean full
.PHONY: build-archive
build-archive:
@echo "---> Creating OSS release archive."
mkdir teleport
cp -rf $(BUILDDIR)/* \
Expand All @@ -385,6 +381,13 @@ release-unix: clean full
tar $(TAR_FLAGS) -c teleport | gzip -n > $(RELEASE).tar.gz
rm -rf teleport
@echo "---> Created $(RELEASE).tar.gz."

#
# make release-unix - Produces a binary release tarball containing teleport,
# tctl, and tsh.
#
.PHONY:
release-unix: clean full build-archive
@if [ -f e/Makefile ]; then \
rm -fr $(ASSETS_BUILDDIR)/webassets; \
$(MAKE) -C e release; \
Expand Down Expand Up @@ -982,52 +985,17 @@ install: build
cp -f $(BUILDDIR)/teleport $(BINDIR)/
mkdir -p $(DATADIR)


# Docker image build. Always build the binaries themselves within docker (see
# the "docker" rule) to avoid dependencies on the host libc version.
.PHONY: image
image: clean docker-binaries
image: OS=linux
image: TARBALL_PATH_SECTION:=-s "$(shell pwd)"
image: clean docker-binaries build-archive oss-deb
Comment thread
fheinecke marked this conversation as resolved.
cp ./build.assets/charts/Dockerfile $(BUILDDIR)/
cd $(BUILDDIR) && docker build --no-cache . -t $(DOCKER_IMAGE_QUAY):$(VERSION)
cd $(BUILDDIR) && docker build --no-cache . -t $(DOCKER_IMAGE):$(VERSION) --target teleport \
--build-arg DEB_PATH="./teleport_$(VERSION)_$(ARCH).deb"
if [ -f e/Makefile ]; then $(MAKE) -C e image; fi

.PHONY: publish
publish: image
docker push $(DOCKER_IMAGE_QUAY):$(VERSION)
if [ -f e/Makefile ]; then $(MAKE) -C e publish; fi

.PHONY: publish-ecr
publish-ecr: image
docker tag $(DOCKER_IMAGE_QUAY) $(DOCKER_IMAGE_ECR)
docker push $(DOCKER_IMAGE_ECR):$(VERSION)
if [ -f e/Makefile ]; then $(MAKE) -C e publish-ecr; fi

# Docker image build in CI.
# This is run to build and push Docker images to a private repository as part of the build process.
# When we are ready to make the images public after testing (i.e. when publishing a release), we pull these
# images down, retag them and push them up to the production repo so they're available for use.
# This job can be removed/consolidated after we switch over completely from using Jenkins to using Drone.
.PHONY: image-ci
image-ci: clean docker-binaries
cp ./build.assets/charts/Dockerfile $(BUILDDIR)/
cd $(BUILDDIR) && docker build --no-cache . -t $(DOCKER_IMAGE_STAGING):$(VERSION)
if [ -f e/Makefile ]; then $(MAKE) -C e image-ci; fi


# DOCKER_CLI_EXPERIMENTAL=enabled is set to allow inspecting the manifest for present images.
# https://docs.docker.com/engine/reference/commandline/cli/#experimental-features
# The internal staging images use amazon ECR's immutable repository settings. This makes overwrites impossible currently.
# This can cause issues when drone tagging pipelines must be re-run due to failures.
# Currently the work around for this is to not attempt to push to the image when it already exists.
.PHONY: publish-ci
publish-ci: image-ci
@if DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect "$(DOCKER_IMAGE_STAGING):$(VERSION)" >/dev/null 2>&1; then\
echo "$(DOCKER_IMAGE_STAGING):$(VERSION) already exists. "; \
else \
docker push "$(DOCKER_IMAGE_STAGING):$(VERSION)"; \
fi
if [ -f e/Makefile ]; then $(MAKE) -C e publish-ci; fi

# Docker image build for Teleport Operator
.PHONY: image-operator-ci
image-operator-ci:
Expand Down Expand Up @@ -1098,13 +1066,17 @@ rpm:
rpm-unsigned:
$(MAKE) UNSIGNED_RPM=true rpm

# build .deb
.PHONY: deb
deb:
# build open source .deb only
.PHONY: oss-deb
oss-deb:
mkdir -p $(BUILDDIR)/
cp ./build.assets/build-package.sh ./build.assets/build-common.sh $(BUILDDIR)/
chmod +x $(BUILDDIR)/build-package.sh
cd $(BUILDDIR) && ./build-package.sh -t oss -v $(VERSION) -p deb -a $(ARCH) $(RUNTIME_SECTION) $(TARBALL_PATH_SECTION)

# build .deb
.PHONY: deb
deb: oss-deb
if [ -f e/Makefile ]; then $(MAKE) -C e deb; fi

# check binary compatibility with different OSes
Expand Down
45 changes: 0 additions & 45 deletions build.assets/Dockerfile-cron

This file was deleted.

44 changes: 0 additions & 44 deletions build.assets/Dockerfile-cron-v8

This file was deleted.

26 changes: 16 additions & 10 deletions build.assets/charts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
FROM ubuntu:20.04
# Stage to build the image, without FIPS entrypoint argument
FROM ubuntu:20.04 AS teleport

# Copy the deb archive
ARG DEB_PATH
COPY ${DEB_PATH?} /tmp/teleport.deb
Comment thread
fheinecke marked this conversation as resolved.

# Install dumb-init and ca-certificates. The dumb-init package is to ensure
# signals and orphaned processes are are handled correctly. The ca-certificate
Expand Down Expand Up @@ -35,22 +40,23 @@ FROM ubuntu:20.04
# * vi
# * wget

# Note that /var/lib/apt/lists/* is cleaned up in the same RUN command as
# "apt-get update" to reduce the size of the image.
# Update the base image
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
# Install dependencies
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y ca-certificates dumb-init libelf1 && \
update-ca-certificates && \
# Install tools
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y net-tools iputils-ping inetutils-telnet netcat tcpdump busybox && \
busybox --install -s && \
update-ca-certificates && \
# Install Teleport
dpkg -i /tmp/teleport.deb && \
# Cleanup
apt-get -y clean && \
rm -rf /var/lib/apt/lists/*

# Bundle "teleport", "tctl", "tbot", and "tsh" binaries into image.
COPY teleport /usr/local/bin/teleport
COPY tctl /usr/local/bin/tctl
COPY tsh /usr/local/bin/tsh
COPY tbot /usr/local/bin/tbot

# By setting this entry point, we expose make target as command.
ENTRYPOINT ["/usr/bin/dumb-init", "teleport", "start", "-c", "/etc/teleport/teleport.yaml"]

FROM teleport AS teleport-fips
ENTRYPOINT ["/usr/bin/dumb-init", "teleport", "start", "-c", "/etc/teleport/teleport.yaml", "--fips"]
56 changes: 0 additions & 56 deletions build.assets/charts/Dockerfile-fips

This file was deleted.

4 changes: 2 additions & 2 deletions docker/sshd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG TELEPORT_TAG
FROM quay.io/gravitational/teleport:${TELEPORT_TAG}
ARG BASE_IMAGE
FROM $BASE_IMAGE

# Demo ansible, ssh, htop
RUN apt-get update && apt-get install -y ansible ssh inetutils-syslogd htop
Expand Down
2 changes: 1 addition & 1 deletion docs/postrelease.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This checklist is to be run after cutting a release.
### Major releases only

- [ ] Update support matrix in docs FAQ page
- [ ] Update `CURRENT_VERSION_ROOT` and other previous versions in Drone `teleport-docker-cron` job
- [ ] Update `teleportVersions` and other previous versions in Dronegen `/dronegen/container_images.go buildContainerImagePipelines` function
- Example: https://github.com/gravitational/teleport/pull/4602
- [ ] Create PR to update default Teleport image referenced in docker/teleport-quickstart.yml and docker/teleport-ent-quickstart.yml
- Example: https://github.com/gravitational/teleport/pull/4655
Expand Down
Loading