Skip to content

Commit

Permalink
Sync releng templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gromit authored and asutosh committed Jul 11, 2022
1 parent 7b07f4c commit da639bb
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 215 deletions.
9 changes: 2 additions & 7 deletions .github/dependabot.yml
@@ -1,11 +1,6 @@


# Generated by: tyk-ci/wf-gen
# Generated on: Friday 04 March 2022 11:40:32 AM UTC

# Generation commands:
# ./pr.zsh -repos tyk -base td-883-test -branch td-883-test -title Sync from latest releng templates
# m4 -E -DxREPO=tyk
# Generated by: gromit policy
# Generated on: Mon Jul 11 07:20:30 UTC 2022

version: 2
updates:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/del-env.yml
@@ -1,11 +1,6 @@


# Generated by: tyk-ci/wf-gen
# Generated on: Friday 04 March 2022 11:40:32 AM UTC

# Generation commands:
# ./pr.zsh -repos tyk -base td-883-test -branch td-883-test -title Sync from latest releng templates
# m4 -E -DxREPO=tyk
# Generated by: gromit policy
# Generated on: Mon Jul 11 07:20:30 UTC 2022

name: Retiring dev env

Expand Down
26 changes: 5 additions & 21 deletions .github/workflows/release.yml
@@ -1,11 +1,7 @@

# Generated by: gromit policy
# Generated on: Mon Jul 11 07:20:30 UTC 2022

# Generated by: tyk-ci/wf-gen
# Generated on: Friday 04 March 2022 11:40:32 AM UTC

# Generation commands:
# ./pr.zsh -repos tyk -base td-883-test -branch td-883-test -title Sync from latest releng templates
# m4 -E -DxREPO=tyk

# Distribution channels covered by this workflow
# - Ubuntu and Debian
Expand Down Expand Up @@ -42,7 +38,7 @@ jobs:
strategy:
fail-fast: false
matrix:
golang_cross: [ 1.15 , 1.15-el7 ]
golang_cross: [ 1.15, 1.15-el7 ]
include:
- golang_cross: 1.15-el7
goreleaser: 'ci/goreleaser/goreleaser-el7.yml'
Expand All @@ -52,7 +48,6 @@ jobs:
goreleaser: 'ci/goreleaser/goreleaser.yml'
rpmvers: 'el/8'
debvers: 'ubuntu/focal debian/buster debian/bullseye'

outputs:
tag: ${{ steps.targets.outputs.tag }}

Expand All @@ -67,7 +62,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: docker/setup-qemu-action@v1

- uses: docker/setup-buildx-action@v1
Expand Down Expand Up @@ -113,8 +107,6 @@ jobs:
*.tar.gz
*.txt.sig
*.txt
- name: Fix vendor
run: |
export GOPATH=/go
Expand All @@ -128,7 +120,6 @@ jobs:
mkdir -p /go/src/github.com/TykTechnologies/tyk
cp -r ./* /go/src/github.com/TykTechnologies/tyk
- uses: goreleaser/goreleaser-action@v2
with:
version: latest
Expand Down Expand Up @@ -161,8 +152,6 @@ jobs:
path: |
dist/*.rpm
!dist/*PAYG*.rpm
ci:
needs:
- goreleaser
Expand All @@ -173,7 +162,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
Expand Down Expand Up @@ -286,9 +274,8 @@ jobs:
ARG TARGETARCH
COPY tyk-gateway*_${TARGETARCH}.deb /tyk-gateway.deb
RUN apt-get update && apt-get install -y curl
RUN curl -fsSL https://packagecloud.io/install/repositories/tyk/tyk-gateway/script.deb.sh | bash && apt-get install -y tyk-gateway=3.0.8
RUN dpkg -i tyk-gateway.deb
RUN dpkg -i tyk-gateway.deb
RUN apt-get install -y jq
RUN /opt/tyk-gateway/install/setup.sh --listenport=8080 --redishost=localhost --redisport=6379 --domain=""
COPY ci/tests/api-functionality/api_test.sh /
Expand Down Expand Up @@ -337,11 +324,10 @@ jobs:
echo 'FROM registry.access.redhat.com/${{ matrix.distro }}
COPY tyk-gateway*.x86_64.rpm /tyk-gateway.rpm
RUN yum install -y curl
RUN curl -fsSL https://packagecloud.io/install/repositories/tyk/tyk-gateway/script.rpm.sh | bash && yum install -y tyk-gateway-3.0.8-1
RUN curl https://keyserver.tyk.io/tyk.io.rpm.signing.key.2020 -o tyk-gateway.key && rpm --import tyk-gateway.key
RUN rpm --checksig tyk-gateway.rpm
RUN rpm -Uvh --force tyk-gateway.rpm
RUN rpm -Uvh --force tyk-gateway.rpm
RUN curl -fSL https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 --output /usr/local/bin/jq && chmod a+x /usr/local/bin/jq
RUN /opt/tyk-gateway/install/setup.sh --listenport=8080 --redishost=localhost --redisport=6379 --domain=""
COPY ci/tests/api-functionality/data/api.json /opt/tyk-gateway/apps/
Expand Down Expand Up @@ -404,7 +390,6 @@ jobs:
fi
done
# AWS updates only for stable releases
aws-mktplace-byol:
if: ( 'a' == 'b' )
Expand Down Expand Up @@ -436,4 +421,3 @@ jobs:
packer build -var-file=${{ matrix.flavour }}.vars.json byol.pkr.hcl
25 changes: 10 additions & 15 deletions ci/Dockerfile.std
@@ -1,36 +1,31 @@


# Generated by: tyk-ci/wf-gen
# Generated on: Friday 04 March 2022 11:40:32 AM UTC

# Generation commands:
# ./pr.zsh -repos tyk -base td-883-test -branch td-883-test -title Sync from latest releng templates
# m4 -E -DxREPO=tyk
# Generated by: gromit policy
# Generated on: Mon Jul 11 07:20:30 UTC 2022

FROM debian:bullseye-slim
ARG TARGETARCH

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get dist-upgrade -y ca-certificates
# Install curl and python3
RUN apt update \
&& apt dist-upgrade -y ca-certificates curl \
&& apt install -y python3-setuptools libpython3.9 python3.9-dev \
RUN apt-get install -y curl python3-setuptools libpython3.9 python3.9-dev \
&& curl https://bootstrap.pypa.io/get-pip.py | python3 \
&& pip3 install --only-binary ":all:" grpcio protobuf==3.20.1


# Remove some things to decrease CVE surface
RUN apt remove -y --allow-remove-essential libtiff5 ncurses-base \
RUN apt-get remove -y --allow-remove-essential libtiff5 ncurses-base \
&& rm /usr/bin/passwd && rm /usr/sbin/adduser

# Clean up caches, unwanted .a and .o files
RUN rm -rf /root/.cache \
&& apt -y autoremove \
&& apt clean \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /usr/include/* \
&& find /usr/lib -type f -name '*.a' -delete \
&& find /usr/lib -type f -name '*.o' -delete

# Print included pip/python versions
RUN pip3 --version && python3 --version

Expand All @@ -46,6 +41,6 @@ WORKDIR /opt/tyk-gateway/

# Uncomment this to test in dev
# COPY tyk .

ENTRYPOINT ["/opt/tyk-gateway/tyk" ]

CMD [ "--conf=/opt/tyk-gateway/tyk.conf" ]
14 changes: 3 additions & 11 deletions ci/aws/byol.pkr.hcl
@@ -1,12 +1,6 @@


# Generated by: tyk-ci/wf-gen
# Generated on: Friday 04 March 2022 11:40:32 AM UTC

# Generation commands:
# ./pr.zsh -repos tyk -base td-883-test -branch td-883-test -title Sync from latest releng templates
# m4 -E -DxREPO=tyk

# Generated by: gromit policy
# Generated on: Mon Jul 11 07:20:30 UTC 2022

packer {
required_plugins {
Expand All @@ -29,7 +23,6 @@ variable "source_ami_owner" {
variable "ami_search_string" {
type = string
}

variable "geoip_license" {
type = string
default = "${env("GEOIP_LICENSE")}"
Expand Down Expand Up @@ -93,7 +86,6 @@ source "amazon-ebs" "byol" {
# https://www.packer.io/docs/from-1.5/blocks/build
build {
sources = ["source.amazon-ebs.byol"]

provisioner "file" {
destination = "/tmp/semver.sh"
source = "utils/semver.sh"
Expand All @@ -107,7 +99,7 @@ build {
source = "utils/10-run-tyk.conf"
}
provisioner "shell" {
environment_vars = ["VERSION=${var.version}" , "GEOIP_LICENSE=${var.geoip_license}"]
environment_vars = ["VERSION=${var.version}" , "GEOIP_LICENSE=${var.geoip_license}" ]
script = "byol/install-tyk.sh"
}
}
36 changes: 6 additions & 30 deletions ci/goreleaser/goreleaser-el7.yml
@@ -1,22 +1,13 @@


# Generated by: tyk-ci/wf-gen
# Generated on: Friday 04 March 2022 11:40:32 AM UTC

# Generation commands:
# ./pr.zsh -repos tyk -base td-883-test -branch td-883-test -title Sync from latest releng templates
# m4 -E -DxEL7_SUFFIX=-el7 -DxREPO=tyk

# Generated by: gromit policy
# Generated on: Mon Jul 11 07:20:30 UTC 2022

# Check the documentation at http://goreleaser.com
# This project needs CGO_ENABLED=1 and the cross-compiler toolchains for
# - arm64
# - amd64


builds:
- id: std-linux

flags:
- -tags=goplugin
ldflags:
Expand All @@ -25,8 +16,8 @@ builds:
- linux
goarch:
- amd64
binary: tyk
- id: std-arm64

flags:
- -tags=goplugin
ldflags:
Expand All @@ -37,26 +28,17 @@ builds:
- linux
goarch:
- arm64
# static builds strip symbols and do not allow plugins
- id: static-amd64
ldflags:
- -s -w -X github.com/TykTechnologies/tyk/gateway.VERSION={{.Version}} -X github.com/TykTechnologies/tyk/gateway.Commit={{.FullCommit}} -X github.com/TykTechnologies/tyk/gateway.buildDate={{.Date}} -X github.com/TykTechnologies/tyk/gateway.builtBy=goreleaser
- -linkmode external -extldflags -static
goos:
- linux
goarch:
- amd64

binary: tyk

nfpms:
- id: std
vendor: "Tyk Technologies Ltd"
homepage: "https://tyk.io"
maintainer: "Tyk <info@tyk.io>"
description: Tyk API Gateway

package_name: tyk-gateway
builds:

- std-linux
- std-arm64
formats:
Expand All @@ -71,7 +53,6 @@ nfpms:
dst: /lib/systemd/system/tyk-gateway.service
- src: ci/install/inits/sysv/init.d/tyk-gateway
dst: /etc/init.d/tyk-gateway

- src: /opt/tyk-gateway
dst: /opt/tyk
type: "symlink"
Expand Down Expand Up @@ -120,8 +101,6 @@ nfpms:
key_file: tyk.io.signing.key
type: origin



publishers:
- name: tyk-gateway-unstable
env:
Expand All @@ -136,15 +115,13 @@ publishers:
archives:
- format: binary
allow_different_binary_count: true

dockers:

# Build plugin-compiler
- ids:
- std
image_templates:
- tykio/tyk-plugin-compiler:{{ .Tag }}-el7
- "tykio/tyk-plugin-compiler:v{{ .Major }}.{{ .Minor }}{{.Prerelease}}-el7"
- tykio/tyk-plugin-compiler:v{{ .Major }}.{{ .Minor }}{{.Prerelease}}-el7
build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=tyk-plugin-compiler"
Expand Down Expand Up @@ -183,7 +160,6 @@ dockers:
- trace
- user


checksum:
disable: true

Expand Down

0 comments on commit da639bb

Please sign in to comment.