Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 new release #54

Merged
merged 8 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @OliverMKing @rsamigullin
* @Azure/aks-atlanta
57 changes: 29 additions & 28 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
name: Integration test for k8s-bake-v1
on:
pull_request:
jobs:

jobs:
run-integration-test:
name: Validate release and master branch
name: Validate release and main branch
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:

- uses: actions/checkout@v2.3.4
name: Checkout branch
with:
path: 'k8s-bake'
ref: ${{ github.ref }}
repository: ${{ github.repository }}

- name: Building latest changes
- name: Install npm packages
run: |
cd k8s-bake
npm install --prod

npm install --no-bin-links

- name: Install ncc
run: npm i -g @vercel/ncc

- name: Build
run: ncc build src/run.ts -o lib

- name: Bake using Helm on ${{ matrix.os }}
uses: ./k8s-bake
uses: ./
with:
renderEngine: 'helm'
helmChart: './k8s-bake/testResources/Helm/HelmCharts'
helm-version: 'latest'
silent: 'false'
overrideFiles: './k8s-bake/testResources/Helm/values.yaml'
overrides: |
serviceName:aks-helloworld-test
renderEngine: "helm"
helmChart: "./testResources/Helm/HelmCharts"
helm-version: "latest"
silent: "false"
namespace: "namespaceExample"
overrideFiles: "./testResources/Helm/values.yaml"
overrides: |
serviceName:aks-helloworld-test
id: helm-bake

- name: Validate created manifest ${{ matrix.os }}
Expand All @@ -41,11 +42,11 @@ jobs:
manifests: ${{ steps.helm-bake.outputs.manifestsBundle }}

- name: Executing latest changes on ${{ matrix.os }}
uses: ./k8s-bake
uses: ./
with:
renderEngine: 'kompose'
dockerComposeFile: './k8s-bake/testResources/Kompose/docker-compose.yml'
kompose-version: 'latest'
renderEngine: "kompose"
dockerComposeFile: "./testResources/Kompose/docker-compose.yml"
kompose-version: "latest"
id: kompose-bake

- name: validate created manifest ${{ matrix.os }}
Expand All @@ -54,11 +55,11 @@ jobs:
manifests: ${{ steps.kompose-bake.outputs.manifestsBundle }}

- name: Bake using Kustomize on ${{ matrix.os }}
uses: ./k8s-bake
uses: ./
with:
renderEngine: 'kustomize'
kustomizationPath: './k8s-bake/testResources/Kustomize'
kubectl-version: 'latest'
renderEngine: "kustomize"
kustomizationPath: "./testResources/Kustomize"
kubectl-version: "latest"
id: kustomize-bake

- name: Validate created manifest ${{ matrix.os }}
Expand Down
52 changes: 5 additions & 47 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Create release PR"
name: Create release PR

on:
workflow_dispatch:
Expand All @@ -8,49 +8,7 @@ on:
required: true

jobs:
createPullRequest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check if remote branch exists
env:
BRANCH: releases/${{ github.event.inputs.release }}
run: |
echo "##[set-output name=exists;]$(echo $(if [[ -z $(git ls-remote --heads origin ${BRANCH}) ]]; then echo false; else echo true; fi;))"
id: extract-branch-status
# these two only need to occur if the branch exists
- name: Checkout proper branch
if: ${{ steps.extract-branch-status.outputs.exists == 'true' }}
env:
BRANCH: releases/${{ github.event.inputs.release }}
run: git checkout ${BRANCH}
- name: Reset promotion branch
if: ${{ steps.extract-branch-status.outputs.exists == 'true' }}
run: |
git fetch origin master:master
git reset --hard master
- name: Install packages
run: |
rm -rf node_modules/
npm install --no-bin-links
npm run build
- name: Remove node_modules from gitignore
run: |
sed -i '/node_modules/d' ./.gitignore
- name: Create branch
uses: peterjgrainger/action-create-branch@v2.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: releases/${{ github.event.inputs.release }}
- name: Create pull request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Add node modules and new code for release
title: ${{ github.event.inputs.release }} new release
base: releases/${{ github.event.inputs.release }}
branch: create-release
delete-branch: true
release-pr:
uses: OliverMKing/javascript-release-workflow/.github/workflows/release-pr.yml@main
with:
release: ${{ github.event.inputs.release }}
10 changes: 10 additions & 0 deletions .github/workflows/tag-and-draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Tag and create release draft

on:
push:
branches:
- releases/*

jobs:
tag-and-release:
uses: OliverMKing/javascript-release-workflow/.github/workflows/tag-and-release.yml@main
77 changes: 0 additions & 77 deletions .github/workflows/tag-and-release.yml

This file was deleted.

22 changes: 11 additions & 11 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ name: "Run unit tests."
on: # rebuild any PRs and main branch changes
pull_request:
branches:
- master
- 'releases/*'
- main
- "releases/*"
push:
branches:
- master
- 'releases/*'
- main
- "releases/*"

jobs:
build: # make sure build/ci works properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Running L0 tests.
run: |
sudo npm install n
sudo n latest
npm install
npm test
- uses: actions/checkout@v1
- name: Running L0 tests.
run: |
sudo npm install n
sudo n latest
npm install
npm test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -327,3 +327,4 @@ ASALocalRun/

# MFractors (Xamarin productivity tool) working folder
.mfractor/

Loading