Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
d4830f0
Update TaskParameters.ts
tikicoder Feb 8, 2022
9727129
updates for run action
tikicoder Feb 10, 2022
0678d51
Merge pull request #1 from tikicoder/patch-1
tikicoder Apr 4, 2022
3a8c26c
Merge branch 'tiki_main' into tiki_performance
tikicoder Apr 4, 2022
4a0f06f
added to delete storage once image starts distributing
tikicoder Apr 4, 2022
e1cef13
Merge pull request #2 from tikicoder/performance_updates
tikicoder Apr 4, 2022
bc91684
adding build process
tikicoder Apr 5, 2022
423034a
small update to action
tikicoder Apr 5, 2022
faa3b72
small update to action
tikicoder Apr 5, 2022
ba8204f
package updates
tikicoder Apr 5, 2022
eed1616
Merge branch 'tiki_forked_npm' into tiki_npm_update
tikicoder Apr 5, 2022
646aeea
build updates
tikicoder Apr 5, 2022
8635aeb
Auto Build GH Action
Apr 5, 2022
8f258af
build updates
tikicoder Apr 5, 2022
6fece3b
Merge branch 'main' of https://github.com/Guaranteed-Rate/azure-build…
tikicoder Apr 5, 2022
38a9590
version update
tikicoder Apr 5, 2022
1e1d161
version update
tikicoder Apr 5, 2022
1c87b92
version update
tikicoder Apr 5, 2022
904c87d
version update
tikicoder Apr 5, 2022
529b03a
small refactor based on testing
tikicoder Apr 5, 2022
f515f97
Merge branch 'tiki_performance' into tiki_main
tikicoder Apr 5, 2022
76b571c
Auto Build GH Action
Apr 5, 2022
161d714
updates to add custom run mode
tikicoder Apr 5, 2022
7a1d99e
updates for custom run build
tikicoder Apr 5, 2022
e7adda7
update to add custom
tikicoder Apr 5, 2022
d8e7c94
Merge branch 'tiki_main' into main
tikicoder Apr 5, 2022
8e0e3a0
Auto Build GH Action
Apr 5, 2022
cc09ab4
update action to point to correct file
tikicoder Apr 5, 2022
29700be
Auto Build GH Action
Apr 5, 2022
8c8dc12
update for debug testing
tikicoder Apr 5, 2022
c8e13e8
Merge branch 'main' of https://github.com/Guaranteed-Rate/azure-build…
tikicoder Apr 5, 2022
36086de
Auto Build GH Action
Apr 5, 2022
26df3f0
update for debug testing
tikicoder Apr 5, 2022
46373d4
git pushMerge branch 'main' of https://github.com/Guaranteed-Rate/azu…
tikicoder Apr 5, 2022
b189b0e
Auto Build GH Action
Apr 5, 2022
3812a81
dis update
tikicoder Apr 5, 2022
a9924ce
Auto Build GH Action
Apr 5, 2022
d6fecd2
debug update
tikicoder Apr 5, 2022
31f0b11
Merge branch 'main' of https://github.com/Guaranteed-Rate/azure-build…
tikicoder Apr 5, 2022
607542e
Auto Build GH Action
Apr 5, 2022
1810a77
added dependency on build_action
tikicoder Apr 5, 2022
c8bac6e
Merge branch 'main' of https://github.com/Guaranteed-Rate/azure-build…
tikicoder Apr 5, 2022
5466ea1
debug update
tikicoder Apr 5, 2022
99a4a31
Auto Build GH Action
Apr 5, 2022
5786b3a
debug update
tikicoder Apr 5, 2022
9cce33f
Auto Build GH Action
Apr 5, 2022
d6ff899
update dist
tikicoder Apr 5, 2022
a315594
Auto Build GH Action
Apr 5, 2022
4e1fc90
update debugging
tikicoder Apr 5, 2022
bb7931a
Auto Build GH Action
Apr 5, 2022
d1eb0ff
ensure variabled declared
tikicoder Apr 5, 2022
fe74ac0
Auto Build GH Action
Apr 5, 2022
d61f55f
update to output that max run was hit
tikicoder Apr 5, 2022
c2a2c04
Auto Build GH Action
Apr 5, 2022
ac31079
updates to track if run template was completed.
tikicoder Apr 6, 2022
0c21fef
Auto Build GH Action
Apr 6, 2022
24dfda4
ensures storage acct is not removed for 5 minutes or template is comp…
tikicoder Apr 6, 2022
ec1f767
Auto Build GH Action
Apr 6, 2022
2674764
fixed logic bug
tikicoder Apr 12, 2022
a0e6650
Auto Build GH Action
Apr 12, 2022
37699bc
added feature flag
tikicoder Apr 12, 2022
ddd7752
build system
tikicoder Apr 12, 2022
488ef4f
Merge pull request #5 from Guaranteed-Rate/new_feature_delete_storage
tikicoder Apr 12, 2022
cf38ac2
Auto Build GH Action
Apr 12, 2022
06d2614
verbocity update
tikicoder Apr 13, 2022
a287c42
Merge pull request #6 from Guaranteed-Rate/feature_update_delete_storage
tikicoder Apr 13, 2022
00523fe
action updates
tikicoder Apr 13, 2022
7d79619
update action names
tikicoder Apr 13, 2022
7630e14
Merge pull request #7 from Guaranteed-Rate/action_updates
tikicoder Apr 13, 2022
7a21509
fix issue with action
tikicoder Apr 13, 2022
2e69c2c
update to npm async
tikicoder Apr 13, 2022
873802f
update to ensure push happens
tikicoder Apr 13, 2022
872a2f9
update to ensure push happens
tikicoder Apr 13, 2022
4fb8996
update to ensure push happens
tikicoder Apr 13, 2022
f4eab23
update to ensure push happens
tikicoder Apr 13, 2022
ee645ba
update to ensure push happens
tikicoder Apr 13, 2022
ce79792
update to ensure push happens
tikicoder Apr 13, 2022
c0cd59b
update to ensure push happens
tikicoder Apr 13, 2022
a396e28
update to ensure push happens
tikicoder Apr 13, 2022
5ff3573
updates to build and version when pushed to main
tikicoder Apr 13, 2022
5288f3c
Merge pull request #9 from Guaranteed-Rate/actions_update_V2
tikicoder Apr 13, 2022
0c387a8
update
tikicoder Apr 13, 2022
c727012
Merge pull request #10 from Guaranteed-Rate/update_action_v3
tikicoder Apr 13, 2022
4645a03
Auto Build GH Action
Apr 13, 2022
d3203a7
Auto Build GH Action
Jun 29, 2022
50ee7d7
Merge branch 'main' of https://github.com/tikicoder/build-vm-image-fo…
tikicoder Jun 29, 2022
e49ce07
updates based on total changes
tikicoder Jun 29, 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
75 changes: 75 additions & 0 deletions .github/workflows/build_version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build and Update Version Tag

on:
push:
branches:
- 'main'

jobs:
build_action:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'

- name: 'Install required packages'
shell: bash
run: |
cd ${{ GITHUB.WORKSPACE }}/
npm install
npm i -g @vercel/ncc

- name: 'Build Project'
shell: bash
run: |
ncc build lib/index.js --license LICENSE

- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)

- name: Commit Build file changes
if: steps.git-check.outputs.modified == 'true'
run: |
git config --global user.name 'Azure Image Builder Bot'
git config --global user.email 'azure-image-builder-bot@users.noreply.github.com'
git commit -am "Auto Build GH Action"
git push

tag_new_version:
runs-on: ubuntu-latest
needs: build_action
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.7

- name: Display SemVer
run: |
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"

- name: Create Git tag for PR
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/v${{ steps.gitversion.outputs.semVer }}",
sha: context.sha
})
4 changes: 4 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mode: Mainline
branches:
main:
regex: ^main$
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,34 @@ Learn more about configuring permissions for Azure Image builder Service using [

# Inputs for the Action

* `action-run-mode`: Optional. This is the run mode for the action. The options are
* Full
* default
* Wait until everything completes
* BuildOnly
* Waits until the template starts the distribute process
* NoWait
* This will not wait for actions to complete, like run template
* It will try to get the action to complete the quicket but can require the most manual cleanup
* Custom
* This requires action-run-mode-time-minutes
* This will allow you to specify a max wait time

* `action-run-mode-time-minutes`: Optional. Only applies if action-run-mode is set to Custom. This allows you to specify the length in minutes to run.
* Default 30 minutes
* If over 10 minutes the created storage account created for the build artifacts will be deleted as part of the cleanup
* If Set to 0 will run and set the Actuib Run Mode to Full
* if greater than 0 and less than 5 it will be defaulted to 5 minutes.

* `delete-storage`: Optional. A storage account is created so that the build artifacts can be downloaded. This indicatates how teh deletion of the storage shoudl happen.
* auto
* default
* The systemll decied if its ok to delete the storage
* No
* The system will not delete the storage
* Yes
* The system will always delete the storage.

* `resource-group-name`: Required. This is the resource group where the action creates a storage for saving artifacts needed for customized image. Azure image builder also uses the same resource group for Image Template creation.

* `image-builder-template-name`: The name of the image builder template resource to be used for creating and running the Image builder service. If you already have an [AIB Template file](https://github.com/danielsollondon/azvmimagebuilder/tree/master/quickquickstarts) downloaded in the runner, then you can give the full filepath to that as well. E.g. _${{ GITHUB.WORKSPACE }}/vmImageTemplate/ubuntuCustomVM.json_. Note that incase a filepath is provided in this action input, then parameters in the file will take precedence over action inputs. Irrespective, customizer section of action is always executed.
Expand Down
18 changes: 17 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
name: "Build Azure Virtual Machine Image"
description: "Create custom virtual machine images that contain artifacts built in CI workflows"
inputs:
#action inputs
action-run-mode:
description: 'The run mode for the action. Full (default) wait until everything completes, BuildOnly waits until the template starts the didistribute stro process, NoWait as soon as the action sets up and triggers the action it will quit'
required: false
default: full
action-run-mode-time-minutes:
description: 'If action-run-mode is custom, how long should action run'
required: false
default: 30

#storage inputs
delete-storage:
description: 'A storage account is created so that the build artifacts can be downloaded. The options are: yes, no, auto.'
required: false
default: auto

#general inputs
location:
description: 'This is the Azure region in which the Image Builder will run.'
Expand Down Expand Up @@ -60,4 +76,4 @@ outputs:

runs:
using: 'node12'
main: 'lib/index.js'
main: 'dist/index.js'
Loading