Skip to content

Bump cryptography from 39.0.1 to 41.0.3 in /app/magtape-init #219

Bump cryptography from 39.0.1 to 41.0.3 in /app/magtape-init

Bump cryptography from 39.0.1 to 41.0.3 in /app/magtape-init #219

name: e2e-checks
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
e2e-tests:
runs-on: ubuntu-latest
strategy:
matrix:
k8s-version:
- v1.22
- v1.21
- v1.20
- v1.19
include:
- k8s-version: v1.22
kind-node-image: kindest/node:v1.22.7@sha256:1dfd72d193bf7da64765fd2f2898f78663b9ba366c2aa74be1fd7498a1873166
- k8s-version: v1.21
kind-node-image: kindest/node:v1.21.10@sha256:84709f09756ba4f863769bdcabe5edafc2ada72d3c8c44d6515fc581b66b029c
- k8s-version: v1.20
kind-node-image: kindest/node:v1.20.15@sha256:393bb9096c6c4d723bb17bceb0896407d7db581532d11ea2839c80b28e5d8deb
- k8s-version: v1.19
kind-node-image: kindest/node:v1.19.16@sha256:81f552397c1e6c1f293f967ecb1344d8857613fb978f963c30e907c32f598467
name: e2e-tests for K8s ${{ matrix.k8s-version }}
steps:
- name: Check out the repo
uses: actions/checkout@v2
# Collect Release SHA Tag is used to to collect information needed later in the action and expose it so it can be referenced
- name: Collect Release SHA Tag
id: prep
run: |
echo ::set-output name=releasetag::sha-${GITHUB_SHA::7}
# Part of docker/build-push-action@v2; setting up the build system
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver: docker-container
driver-opts: image=moby/buildkit:buildx-stable-1
use: true
- name: Build magtape-init Container Image
timeout-minutes: 10
uses: docker/build-push-action@v2
with:
context: ./app/magtape-init/
# file should be specified relative to the repo root rather than relative to the context
file: ./app/magtape-init/Dockerfile
# Don't push the image to a registry
push: false
# Load image into local docker default context
outputs: type=docker
# Uses the releasetag output exposed by the Collect Release SHA Tag step to set the tag under v2
tags: tmobile/magtape-init:${{ steps.prep.outputs.releasetag }}
- name: Build magtape Container Image
timeout-minutes: 10
uses: docker/build-push-action@v2
with:
context: ./app/magtape/
# file should be specified relative to the repo root rather than relative to the context
file: ./app/magtape/Dockerfile
# Don't push the image to a registry
push: false
# Load image into local docker default context
outputs: type=docker
# Uses the releasetag output exposed by the Collect Release SHA Tag step to set the tag under v2
tags: tmobile/magtape:${{ steps.prep.outputs.releasetag }}
- name: Setup KinD Cluster
timeout-minutes: 10
uses: engineerd/[email protected]
with:
version: "v0.12.0"
image: ${{ matrix.kind-node-image }}
- name: Install MagTape
timeout-minutes: 10
# kind load docker-image: loads image from docker default context into kind node image cache
run: |
echo "Loading MagTape images to KinD nodes"
GIT_SHA=${{github.sha}}
kind load docker-image tmobile/magtape-init:sha-${GIT_SHA::7}
kind load docker-image tmobile/magtape:sha-${GIT_SHA::7}
echo "Updating target image to use local ref"
sed -i='' -E "s/(MAGTAPE_VERSION := )(.*$)/\1sha-${GIT_SHA::7}/" Makefile
sed -i='' -E 's/(imagePullPolicy:) Always/\1 IfNotPresent/' deploy/manifests/magtape-deploy.yaml
make set-release-version
make build-single-manifest
echo "Install MagTape"
make install
kubectl wait --for=condition=available --timeout=120s deployment/magtape -n magtape-system
- name: Configure Test Namespace
timeout-minutes: 5
run: |
make ns-create-test
- name: Install Tools
timeout-minutes: 5
run: |
sudo add-apt-repository ppa:rmescandon/yq
sudo apt update
sudo apt install yq -y
yq --version
- name: Execute Functional Tests
timeout-minutes: 5
run: |
make test-functional