Skip to content

Commit 11cc956

Browse files
authored
Merge pull request #70 from phenixblue/v2.2.1-fix
Prepare v2.2.1 Fix Release
2 parents 23a3b1b + 7701ce9 commit 11cc956

File tree

11 files changed

+198
-136
lines changed

11 files changed

+198
-136
lines changed

.github/workflows/ci-codeql-analysis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ name: "code-ql"
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- master
7+
- release-*
68
pull_request:
79
# The branches below must be a subset of the branches above
8-
branches: [master]
10+
branches:
11+
- master
12+
- release-*
913
schedule:
1014
- cron: '0 23 * * 3'
1115

.github/workflows/ci-e2e-checks.yaml

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- release-*
78
push:
89
branches:
910
- master
11+
- release-*
1012

11-
# Jobs
1213
jobs:
13-
# Job to lint code
14+
1415
e2e-tests:
1516
runs-on: ubuntu-latest
1617
strategy:
@@ -33,44 +34,63 @@ jobs:
3334
name: e2e-tests for K8s ${{ matrix.k8s-version }}
3435

3536
steps:
36-
- uses: actions/checkout@v2
3737

3838
- name: Check out the repo
3939
uses: actions/checkout@v2
4040

41+
# Collect Release SHA Tag is used to to collect information needed later in the action and expose it so it can be referenced
42+
- name: Collect Release SHA Tag
43+
id: prep
44+
run: |
45+
echo ::set-output name=releasetag::sha-${GITHUB_SHA::7}
46+
47+
# Part of docker/build-push-action@v2; setting up the build system
48+
- name: Set up Docker Buildx
49+
uses: docker/setup-buildx-action@v1
50+
with:
51+
driver: docker-container
52+
driver-opts: image=moby/buildkit:buildx-stable-1
53+
use: true
54+
4155
- name: Build magtape-init Container Image
42-
if: github.repository == 'tmobile/magtape'
4356
timeout-minutes: 10
44-
uses: docker/build-push-action@v1
57+
uses: docker/build-push-action@v2
4558
with:
46-
username: ${{ secrets.DOCKERHUB_USERNAME }}
47-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
48-
path: ./app/magtape-init/
49-
repository: tmobile/magtape-init
50-
tag_with_sha: true
59+
context: ./app/magtape-init/
60+
# file should be specified relative to the repo root rather than relative to the context
61+
file: ./app/magtape-init/Dockerfile
62+
# Don't push the image to a registry
5163
push: false
64+
# Load image into local docker default context
65+
outputs: type=docker
66+
# Uses the releasetag output exposed by the Collect Release SHA Tag step to set the tag under v2
67+
tags: tmobile/magtape-init:${{ steps.prep.outputs.releasetag }}
68+
5269

5370
- name: Build magtape Container Image
54-
if: github.repository == 'tmobile/magtape'
5571
timeout-minutes: 10
56-
uses: docker/build-push-action@v1
72+
uses: docker/build-push-action@v2
5773
with:
58-
username: ${{ secrets.DOCKERHUB_USERNAME }}
59-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
60-
path: ./app/magtape/
61-
repository: tmobile/magtape
62-
tag_with_sha: true
74+
context: ./app/magtape/
75+
# file should be specified relative to the repo root rather than relative to the context
76+
file: ./app/magtape/Dockerfile
77+
# Don't push the image to a registry
6378
push: false
79+
# Load image into local docker default context
80+
outputs: type=docker
81+
# Uses the releasetag output exposed by the Collect Release SHA Tag step to set the tag under v2
82+
tags: tmobile/magtape:${{ steps.prep.outputs.releasetag }}
6483

6584
- name: Setup KinD Cluster
66-
timeout-minutes: 5
85+
timeout-minutes: 10
6786
uses: engineerd/setup-kind@v0.4.0
6887
with:
6988
version: "v0.9.0"
7089
image: ${{ matrix.kind-node-image }}
7190

7291
- name: Install MagTape
7392
timeout-minutes: 10
93+
# kind load docker-image: loads image from docker default context into kind node image cache
7494
run: |
7595
echo "Loading MagTape images to KinD nodes"
7696
GIT_SHA=${{github.sha}}
@@ -106,4 +126,4 @@ jobs:
106126
- name: Execute Functional Tests
107127
timeout-minutes: 5
108128
run: |
109-
make test-functional
129+
make test-functional

.github/workflows/ci-image-build.yaml

Lines changed: 54 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,88 @@ name: image-build
22

33
on:
44
release:
5+
# Dynamic releasetag tag is set based on the assumption this ci task only runs on release
56
types: [published]
67

7-
# Jobs
88
jobs:
99
# Build and push magtape-init container image
1010
build-magtape-init-image:
11-
name: Push magtape-init image to DockerHub using release tag
11+
name: Build and push magtape-init images to DockerHub
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
15+
1616
- name: Check out the repo
1717
uses: actions/checkout@v2
1818

19-
- name: Push release tag to Docker Hub
20-
if: github.repository == 'tmobile/magtape'
21-
timeout-minutes: 10
22-
uses: docker/build-push-action@v1
19+
# Collect Release Tag is used to to collect information needed later in the action and expose it so it can be referenced
20+
- name: Collect Release Tag
21+
id: prep
22+
# GITHUB_REF variable must exist in action; this may rely on {{ on: release: types: [published] }} gating the action
23+
run: |
24+
echo ::set-output name=releasetag::${GITHUB_REF#refs/tags/}
25+
26+
# Part of docker/build-push-action@v2; setting up the build system
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v1
29+
30+
# Part of docker/build-push-action@v2; login to dockerhub
31+
- name: Login to DockerHub
32+
uses: docker/login-action@v1
2333
with:
24-
username: ${{ secrets.DOCKERHUB_USERNAME }}
25-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
26-
path: ./app/magtape-init/
27-
repository: tmobile/magtape-init
28-
tag_with_ref: true
34+
username: ${{ secrets.DOCKER_USERNAME }}
35+
password: ${{ secrets.DOCKER_PASSWORD }}
2936

30-
- name: Push magtape-init image to DockerHub using latest tag
37+
- name: Build and push magtape-init image to DockerHub
3138
if: github.repository == 'tmobile/magtape'
3239
timeout-minutes: 10
33-
uses: docker/build-push-action@v1
40+
uses: docker/build-push-action@v2
3441
with:
35-
username: ${{ secrets.DOCKERHUB_USERNAME }}
36-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
37-
path: ./app/magtape-init/
38-
repository: tmobile/magtape-init
39-
tags: latest
42+
context: ./app/magtape-init/
43+
# file should be specified relative to the repo root rather than relative to the context
44+
file: ./app/magtape-init/Dockerfile
45+
# push is no longer defaulted to true under v2; to push you must specify push is true
46+
push: true
47+
# Uses the releasetag output exposed by the Collect Release Tag step to set the tag under v2
48+
tags: tmobile/magtape-init:${{ steps.prep.outputs.releasetag }},tmobile/magtape-init:latest
4049

4150
# Build and push magtape container image
4251
build-magtape-image:
43-
name: Push magtape image to DockerHub using release tag
52+
name: Build and push magtape images to DockerHub
4453
runs-on: ubuntu-latest
4554

4655
steps:
4756

4857
- name: Check out the repo
4958
uses: actions/checkout@v2
5059

51-
- name: Push release tag to Docker Hub
52-
if: github.repository == 'tmobile/magtape'
53-
timeout-minutes: 10
54-
uses: docker/build-push-action@v1
60+
# Collect Release Tag is used to to collect information needed later in the action and expose it so it can be referenced
61+
- name: Collect Release Tag
62+
id: prep
63+
# GITHUB_REF variable must exist in action; this may rely on {{ on: release: types: [published] }} gating the action
64+
run: |
65+
echo ::set-output name=releasetag::${GITHUB_REF#refs/tags/}
66+
67+
# Part of docker/build-push-action@v2; setting up the build system
68+
- name: Set up Docker Buildx
69+
uses: docker/setup-buildx-action@v1
70+
71+
# Part of docker/build-push-action@v2; login to dockerhub
72+
- name: Login to DockerHub
73+
uses: docker/login-action@v1
5574
with:
56-
username: ${{ secrets.DOCKERHUB_USERNAME }}
57-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
58-
path: ./app/magtape/
59-
repository: tmobile/magtape
60-
tag_with_ref: true
75+
username: ${{ secrets.DOCKER_USERNAME }}
76+
password: ${{ secrets.DOCKER_PASSWORD }}
6177

62-
- name: Push magtape-init image to DockerHub using latest tag
78+
- name: Build and push magtape image to DockerHub
6379
if: github.repository == 'tmobile/magtape'
6480
timeout-minutes: 10
65-
uses: docker/build-push-action@v1
81+
uses: docker/build-push-action@v2
6682
with:
67-
username: ${{ secrets.DOCKERHUB_USERNAME }}
68-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
69-
path: ./app/magtape/
70-
repository: tmobile/magtape
71-
tags: latest
83+
context: ./app/magtape/
84+
# file should be specified relative to the repo root rather than relative to the context
85+
file: ./app/magtape/Dockerfile
86+
# push is no longer defaulted to true under v2; to push you must specify push is true
87+
push: true
88+
# Uses the releasetag output exposed by the Collect Release Tag step to set the tag under v2
89+
tags: tmobile/magtape:${{ steps.prep.outputs.releasetag }},tmobile/magtape:latest

.github/workflows/ci-manifest-checks.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- release-*
78
# Commenting out paths for now until GH Actions
89
# Have good suport for required checks + path filters
910
# https://github.community/t5/GitHub-Actions/Feature-request-conditional-required-checks/m-p/36938#M2735
@@ -12,6 +13,7 @@ on:
1213
push:
1314
branches:
1415
- master
16+
- release-*
1517

1618
# Jobs
1719
jobs:

.github/workflows/ci-python-checks.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- release-*
78
push:
89
branches:
910
- master
11+
- release-*
1012

1113
# Jobs
1214
jobs:

.github/workflows/ci-rego-checks.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- release-*
78
push:
89
branches:
910
- master
11+
- release-*
1012

1113
# Jobs
1214
jobs:

.github/workflows/ci-std-checks.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- release-*
78
push:
89
branches:
910
- master
11+
- release-*
1012

1113
# Jobs
1214
jobs:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# its contributors may be used to endorse or promote products derived from this
1717
# software without specific prior written permission.
1818

19-
MAGTAPE_VERSION := v2.2.0
19+
MAGTAPE_VERSION := v2.2.1
2020
OPA_VERSION := 0.23.2
2121
KUBE_MGMT_VERSION := 0.11
2222

0 commit comments

Comments
 (0)