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

Fix release GitHub actions job #108

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
1221794
Get plugin building and mostly working
ddelnano Sep 13, 2020
d258626
Fix issues with typing the boot command over VNC and ensure that cent…
ddelnano Dec 16, 2020
70adca2
Add support for setting final VM as template and remove hard coding o…
ddelnano Dec 22, 2020
b2a858f
Ensure that SRs are set via the config file and fix other todos
ddelnano Dec 22, 2020
404e5a0
Remove binary from repo
ddelnano Dec 22, 2020
eeb6660
Update docs to reflect current state of the project
ddelnano Dec 22, 2020
cdb9300
Merge pull request #1 from ddelnano/build-the-packer-plugin
ddelnano Dec 28, 2020
3f14bb9
Add goreleaser config file
ddelnano Dec 28, 2020
e0a4a0b
Remove go mod tidy changes and add dist file to gitignore
ddelnano Dec 28, 2020
03cabed
Specify the correct main.go file
ddelnano Dec 28, 2020
1e5b636
Update the docs to point to the builder's official binaries
ddelnano Dec 28, 2020
0b9fe16
Fix unreleated typo in the README
ddelnano Dec 28, 2020
ae4cfe5
Merge pull request #2 from ddelnano/add-official-binary-releases
ddelnano Dec 28, 2020
ee25c7b
Add start of centos 8 and ubuntu 20.04 examples
ddelnano Dec 31, 2020
c3a255d
Remove unused replace directive in go.mod file
ddelnano Dec 31, 2020
fba3a9c
Merge pull request #4 from ddelnano/remove-unnecessary-go-mod-change
ddelnano Dec 31, 2020
04120e8
Ensure required LockingMode parameter is set on VIF and fail the pack…
ddelnano Jan 3, 2021
a5a2b49
Update documentation with changes from upstream, fix shutdown command…
ddelnano Jan 3, 2021
f2d5671
Specify relative addressing for markdown links
ddelnano Jan 3, 2021
a69d198
Fixing more links
ddelnano Jan 3, 2021
4869b52
Remove unnecesary step
ddelnano Jan 3, 2021
1a562a2
Merge pull request #3 from ddelnano/add-examples-of-using-packer-builder
ddelnano Jan 3, 2021
3d07850
Upgrade packer to v1.6.5
ddelnano Jan 3, 2021
8526cde
Add hcl2 spec configuration and fix tests
ddelnano Jan 4, 2021
906728b
Upgrade packer and ensure that provisioners work
ddelnano Jan 14, 2021
f584aa6
Merge pull request #5 from ddelnano/upgrade-to-latest-packer-version
ddelnano Jan 14, 2021
fbb343a
Update README.md
ddelnano Jan 14, 2021
d4d97c1
added centos8-netinstall
Feb 2, 2021
06c5188
updated examples/README.md to refekt current state
Feb 2, 2021
ca10207
added local DVD install example
Feb 2, 2021
567ecb1
Added a commented example of a centos8 build
Feb 3, 2021
9451608
added vendor/* to .gitignore
Feb 23, 2021
b380fa3
ran go mod tidy
Feb 23, 2021
2266bc8
removed KeyboardInteractive from ssh auth methods
Feb 23, 2021
9d066f3
Ran the migrator tool from hashicorp and fixed all resulting compile …
Feb 23, 2021
000bba4
added a new main with the new rpc server
Feb 23, 2021
5414483
updated the readme
Feb 23, 2021
68ad75e
removed no longer needed plugin/ dir
Feb 23, 2021
657145a
ran gofmt
Feb 23, 2021
0d4d8a6
added centos8-netinstall
Feb 2, 2021
0eb7ab3
updated examples/README.md to refekt current state
Feb 2, 2021
d7b80ba
added local DVD install example
Feb 2, 2021
0180b47
Added a commented example of a centos8 build
Feb 3, 2021
b906dc4
Merge remote-tracking branch 'origin/add-more-examples' into add-more…
Feb 23, 2021
4632737
Update goreleaser with the packer template
ddelnano Mar 9, 2021
a0c3a73
Don't run unit test on goreleaser
ddelnano Mar 9, 2021
705baaa
Another fix
ddelnano Mar 9, 2021
f71febe
Add github workflow on release
ddelnano Mar 10, 2021
51ed1d7
Use go 1.14
ddelnano Mar 10, 2021
63821d6
Add github workflow to master for #10:
ddelnano Mar 10, 2021
ce98892
Use go 1.16
ddelnano Mar 10, 2021
f854587
Use go 1.16
ddelnano Mar 10, 2021
4f96ba4
Adjust goreleaser file to align with upstream and update docs about g…
ddelnano Mar 10, 2021
794e583
Update release version in main.go
ddelnano Mar 10, 2021
ea75b25
Add v prefix to version number
ddelnano Mar 10, 2021
870a6d1
Remove prerelease suffix
ddelnano Mar 10, 2021
33cca1a
Fix issues with ubuntu example
ddelnano Mar 10, 2021
a7026bb
Merge pull request #13 from ddelnano/upgrade-to-packer-sdk
ddelnano Mar 11, 2021
ed54475
Moved some files around ind docs/
Mar 12, 2021
43b251d
Merge remote-tracking branch 'origin/add-more-examples' into add-more…
Mar 12, 2021
0093487
removed centos8 json example and kickstart
Mar 12, 2021
06436eb
Updated examples/readme.md for the ubuntu example
Mar 12, 2021
dbff7f1
Replace conn master host > instance host
Mar 15, 2021
fb1d23c
Update step_type_boot_command.go
ebrainte Mar 16, 2021
64fb82b
Update step_type_boot_command.go
ebrainte Mar 16, 2021
20da456
Merge pull request #15 from ebrainte/master
ddelnano Mar 17, 2021
aec4d8e
Add documentation for the network_names configuration option
ddelnano Mar 24, 2021
30f276e
Use consistent naming for variable types
ddelnano Mar 24, 2021
cefc156
Merge pull request #17 from ddelnano/add-documentation-for-network-names
ddelnano Mar 24, 2021
5a484e0
Add a shared vm cleanup struct and function and ensure that the wait …
ddelnano Mar 24, 2021
fd40348
Update go.mod to reflect currently supported go version
ddelnano Mar 24, 2021
e4b9d11
Merge pull request #18 from ddelnano/ensure-vm-is-cleaned-up-on-wait-…
ddelnano Mar 24, 2021
8835d60
Update docs on and remove it from the examples in favor of the defau…
ddelnano Mar 31, 2021
a472fd2
Merge pull request #20 from ddelnano/update-shutdown-docs
ddelnano Mar 31, 2021
5533ec9
Added a commented example of a centos8 build
Feb 3, 2021
d2e851b
removed centos8 json example and kickstart
Mar 12, 2021
7f0fdc9
Updated examples/readme.md for the ubuntu example
Mar 12, 2021
cd705b5
Added the packer init block to the local and netinstall centos example
Apr 14, 2021
4ba3117
Added packer init and explanation to the commented example
Apr 14, 2021
b403283
updated the example readme
Apr 14, 2021
34779f1
Added packer init to Examples.md
Apr 14, 2021
92ab62a
Update the Ubuntu example to hcl and packer init
Apr 14, 2021
8a95bb4
Merge branch 'add-more-examples' of github.com:4censord/packer-builde…
Apr 14, 2021
29b2cc7
Removed the ubuntu specific section from examples/readme
Apr 14, 2021
2efce1b
Add github workflow to master for #10:
ddelnano Mar 10, 2021
a054887
Use go 1.16
ddelnano Mar 10, 2021
d192d78
Update goreleaser with the packer template
ddelnano Mar 9, 2021
990069d
Don't run unit test on goreleaser
ddelnano Mar 9, 2021
6fd58d9
Another fix
ddelnano Mar 9, 2021
8b81550
Use go 1.14
ddelnano Mar 10, 2021
3d6c58d
Use go 1.16
ddelnano Mar 10, 2021
f3c88bc
Adjust goreleaser file to align with upstream and update docs about g…
ddelnano Mar 10, 2021
8189a3f
Update release version in main.go
ddelnano Mar 10, 2021
ff088d4
Add v prefix to version number
ddelnano Mar 10, 2021
9dded61
Remove prerelease suffix
ddelnano Mar 10, 2021
649093b
Fix issues with ubuntu example
ddelnano Mar 10, 2021
02d6278
Replace conn master host > instance host
Mar 15, 2021
f566af1
Update step_type_boot_command.go
ebrainte Mar 16, 2021
393edf4
Update step_type_boot_command.go
ebrainte Mar 16, 2021
5db3c95
Add documentation for the network_names configuration option
ddelnano Mar 24, 2021
ebbd618
Use consistent naming for variable types
ddelnano Mar 24, 2021
dbe697b
Add a shared vm cleanup struct and function and ensure that the wait …
ddelnano Mar 24, 2021
e9eae45
Update go.mod to reflect currently supported go version
ddelnano Mar 24, 2021
ab6bbce
Update docs on and remove it from the examples in favor of the defau…
ddelnano Mar 31, 2021
76cc31f
Moved some files around ind docs/
Mar 12, 2021
5dcec23
added centos8-netinstall
Feb 2, 2021
efa6074
added local DVD install example
Feb 2, 2021
846ee51
Added a commented example of a centos8 build
Feb 3, 2021
de46204
removed centos8 json example and kickstart
Mar 12, 2021
dc747b5
added centos8-netinstall
Feb 2, 2021
fb4d888
updated examples/README.md to refekt current state
Feb 2, 2021
5f97c22
added local DVD install example
Feb 2, 2021
0d9c90b
Added a commented example of a centos8 build
Feb 3, 2021
9156283
Moved some files around ind docs/
Mar 12, 2021
b06e8e4
Added a commented example of a centos8 build
Feb 3, 2021
81c219f
removed centos8 json example and kickstart
Mar 12, 2021
8a32e10
Updated examples/readme.md for the ubuntu example
Mar 12, 2021
da63294
Added the packer init block to the local and netinstall centos example
Apr 14, 2021
87fe878
Added packer init and explanation to the commented example
Apr 14, 2021
53ad501
updated the example readme
Apr 14, 2021
7887114
Added packer init to Examples.md
Apr 14, 2021
c89f97d
Update the Ubuntu example to hcl and packer init
Apr 14, 2021
93fd8f8
added centos8-netinstall
Feb 2, 2021
672de99
added local DVD install example
Feb 2, 2021
4cccce2
Added a commented example of a centos8 build
Feb 3, 2021
03a1045
removed centos8 json example and kickstart
Mar 12, 2021
ab7b302
Updated examples/readme.md for the ubuntu example
Mar 12, 2021
3b9ae65
Removed the ubuntu specific section from examples/readme
Apr 14, 2021
1743373
Use go 1.14
ddelnano Mar 10, 2021
e198000
Add documentation for the network_names configuration option
ddelnano Mar 24, 2021
b41d0a5
Use consistent naming for variable types
ddelnano Mar 24, 2021
8b7b733
Moved some files around ind docs/
Mar 12, 2021
3729341
Merge branch 'master' of github.com:ddelnano/packer-plugin-xenserver …
4censord Apr 15, 2021
276a88d
Merge branch 'add-more-examples' of github.com:4censord/packer-builde…
Apr 16, 2021
edbaaff
Changed all examples to 'version = ">= v0.3.2"'
4censord Apr 16, 2021
4c183b3
Removed kickstart from Commented-Example.md
4censord Apr 16, 2021
207656b
Moved explanation of the centos example into the pkr file
4censord Apr 16, 2021
36af56d
removed shutdown_command from all examples
4censord Apr 16, 2021
659c607
Update to latest Ubuntu image
4censord Apr 16, 2021
b2a1659
Revert "Use go 1.14"
4censord Apr 17, 2021
7789f3f
Removed old lines of documentation
4censord Apr 17, 2021
05d31eb
Updated the variable description of centos8-netinstall and centos8-local
4censord Apr 22, 2021
320e8de
Workaround for problems with the Ubuntu template
4censord Apr 22, 2021
e32a202
Removed shutdown_timeout to be in line with master
4censord Apr 22, 2021
e607da2
Removed centos-example
4censord Apr 22, 2021
77801d5
Merge pull request #7 from 4censord/add-more-examples
ddelnano Apr 23, 2021
6005f12
Update set up instructions to include packer init
ddelnano Apr 23, 2021
ac62f77
Small dependency refresh on Xen API client
ringods Nov 22, 2021
31683d2
Merge pull request #31 from ringods/bump-xen-api-client
ddelnano Nov 23, 2021
aa4ea9d
More reliable cloud-init startup
liath Dec 15, 2021
d9cb44c
add example of needed cloud-config
liath Dec 15, 2021
7a4a1d0
update ubuntu example to use floppy_files for cloud-config
liath Dec 15, 2021
509b6b3
Fix XenServer tools guest IP address resolution
liath Dec 15, 2021
8b8bd28
Add Xen guest utilities to ubuntu user-data example
liath Dec 16, 2021
5525b73
Merge pull request #32 from liath/more-reliable-cloud-init
ddelnano Dec 19, 2021
f4a161e
Merge pull request #33 from liath/fix-xen-tools-ip-resolution
ddelnano Dec 19, 2021
ac90dec
Remove unused files
ddelnano Mar 4, 2022
38ef075
Update README.md
ddelnano Mar 19, 2022
c5e5a86
Merge pull request #37 from ddelnano/ddelnano-add-buymeacoffee
ddelnano Mar 19, 2022
c6147b1
feat: Make firmware configurable
mboutet Jun 5, 2022
7b40fd4
Merge pull request #39 from mboutet/feature/configurable-firmware
ddelnano Jun 8, 2022
6fc83b9
Add goreleaser config back
ddelnano Jun 8, 2022
88e403f
Upgrade packer-plugin-sdk to v0.3.0 and update release process and go…
ddelnano Jun 10, 2022
1e35a0d
Merge pull request #41 from ddelnano/upgrade-terraform-sdk-go-version…
ddelnano Jun 12, 2022
f7de8aa
Add missing Makefile
ddelnano Jun 12, 2022
4b531de
add step to remove disks param from other-config
BMeach Jan 12, 2023
79c6b50
Merge pull request #51 from BryceTech122/master
ddelnano Jan 21, 2023
8a823a1
Update the ubuntu example to use an available 20.04 iso and proper cl…
ddelnano Jan 21, 2023
4df2465
Remove hashicorps gpg github action to one that doesn't collide with …
ddelnano Jan 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This GitHub action can publish assets for release when a tag is created.
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
#
# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `GPG_PASSPHRASE`
# secret. If you would rather own your own GPG handling, please fork this action
# or use an alternative one for key handling.
#
# You will need to pass the `--batch` flag to `gpg` in your signing step
# in `goreleaser` to indicate this is being used in a non-interactive mode.
#
name: release
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Describe plugin
id: plugin_describe
run: echo "::set-output name=api_version::$(go run . describe | jq -r '.api_version')"
- name: Import GPG key
id: import_gpg
uses: crazy-max/[email protected]
env:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_VERSION: ${{ steps.plugin_describe.outputs.api_version }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@
*~
bin
pkg
crash.log
packer_cache/*
builder-*
dist/*
vendor/*
packer-plugin-xenserver
74 changes: 74 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
env:
- CGO_ENABLED=0
before:
hooks:
# TODO(ddelnano): for now there aren't tests to run
# - go test ./...
# As part of the release doc files are included as a separate deliverable for
# consumption by Packer.io. To include a separate docs.zip uncomment the following command.
#- make ci-release-docs
# Check plugin compatibility with required version of the Packer SDK
- make plugin-check
builds:
# A separated build to run the packer-plugins-check only once for a linux_amd64 binary
-
id: plugin-check
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath #removes all file system paths from the compiled executable
ldflags:
- '-s -w -X {{ .ModulePath }}/version.Version={{.Version}} -X {{ .ModulePath }}/version.VersionPrerelease= '
goos:
- linux
goarch:
- amd64
binary: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
-
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath #removes all file system paths from the compiled executable
ldflags:
- '-s -w -X {{ .ModulePath }}/version.Version={{.Version}} -X {{ .ModulePath }}/version.VersionPrerelease= '
goos:
- freebsd
- windows
- linux
- darwin
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
- goos: linux
goarch: amd64
binary: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
archives:
- format: zip
files:
- none*
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
checksum:
name_template: '{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS'
algorithm: sha256
signs:
- artifacts: checksum
args:
# if you are using this is in a GitHub action or some other automated pipeline, you
# need to pass the batch flag to indicate its not interactive.
- "--batch"
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
draft: true

changelog:
skip: true
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

34 changes: 34 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
NAME=xenserver
BINARY=packer-plugin-${NAME}

COUNT?=1
TEST?=$(shell go list ./...)
HASHICORP_PACKER_PLUGIN_SDK_VERSION?=$(shell go list -m github.com/hashicorp/packer-plugin-sdk | cut -d " " -f2)

.PHONY: dev

build:
@go build -o ${BINARY}

dev: build
@mkdir -p ~/.packer.d/plugins/
@mv ${BINARY} ~/.packer.d/plugins/${BINARY}

test:
@go test -race -count $(COUNT) $(TEST) -timeout=3m

install-packer-sdc: ## Install packer sofware development command
@go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@${HASHICORP_PACKER_PLUGIN_SDK_VERSION}

ci-release-docs: install-packer-sdc
@packer-sdc renderdocs -src docs -partials docs-partials/ -dst docs/
@/bin/sh -c "[ -d docs ] && zip -r docs.zip docs/"

plugin-check: install-packer-sdc build
@packer-sdc plugin-check ${BINARY}

testacc: dev
@PACKER_ACC=1 go test -count $(COUNT) -v $(TEST) -timeout=120m

generate: install-packer-sdc
@go generate ./...
202 changes: 0 additions & 202 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

Loading