Skip to content

Commit cdda1d3

Browse files
BrandonRomanonywilken
authored andcommitted
Upgrade plugin for integrations library
1 parent aa1aa87 commit cdda1d3

File tree

10 files changed

+761
-12
lines changed

10 files changed

+761
-12
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Ensure Docs are Compiled
2+
on:
3+
push:
4+
jobs:
5+
ensure-docs-compiled:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout 🛎
9+
uses: actions/checkout@v2
10+
- uses: actions/setup-go@v4
11+
- shell: bash
12+
run: make build-docs
13+
- shell: bash
14+
run: |
15+
if [[ -z "$(git status -s)" ]]; then
16+
echo "OK"
17+
else
18+
echo "Docs have been updated, but the compiled docs have not been committed."
19+
echo "Run 'make build-docs', and commit the result to resolve this error."
20+
exit 1
21+
fi
22+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Notify Integration Release (Manual)
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: "The release version (semver)"
7+
default: 0.0.1
8+
required: false
9+
branch:
10+
description: "A branch or SHA"
11+
default: 'main'
12+
required: false
13+
jobs:
14+
notify-release:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout this repo
18+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
19+
with:
20+
ref: ${{ github.event.inputs.branch }}
21+
# Ensure that Docs are Compiled
22+
- uses: actions/setup-go@v4
23+
- shell: bash
24+
run: make build-docs
25+
- shell: bash
26+
run: |
27+
if [[ -z "$(git status -s)" ]]; then
28+
echo "OK"
29+
else
30+
echo "Docs have been updated, but the compiled docs have not been committed."
31+
echo "Run 'make build-docs', and commit the result to resolve this error."
32+
exit 1
33+
fi
34+
# Perform the Release
35+
- name: Checkout integration-release-action
36+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
37+
with:
38+
repository: hashicorp/integration-release-action
39+
path: ./integration-release-action
40+
- name: Notify Release
41+
uses: ./integration-release-action
42+
with:
43+
integration_identifier: 'packer/BrandonRomano/ucloud'
44+
release_version: ${{ github.event.inputs.version }}
45+
release_sha: ${{ github.event.inputs.branch }}
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Notify Integration Release (Tag)
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*' # Proper releases
6+
- '*.*.*-*' # Pre releases
7+
jobs:
8+
notify-release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout this repo
12+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
13+
with:
14+
ref: ${{ github.ref }}
15+
# Ensure that Docs are Compiled
16+
- uses: actions/setup-go@v4
17+
- shell: bash
18+
run: make build-docs
19+
- shell: bash
20+
run: |
21+
if [[ -z "$(git status -s)" ]]; then
22+
echo "OK"
23+
else
24+
echo "Docs have been updated, but the compiled docs have not been committed."
25+
echo "Run 'make build-docs', and commit the result to resolve this error."
26+
exit 1
27+
fi
28+
# Perform the Release
29+
- name: Checkout integration-release-action
30+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
31+
with:
32+
repository: hashicorp/integration-release-action
33+
path: ./integration-release-action
34+
- name: Notify Release
35+
uses: ./integration-release-action
36+
with:
37+
integration_identifier: 'packer/BrandonRomano/ucloud'
38+
release_version: ${{ github.ref_name }}
39+
release_sha: ${{ github.ref }}
40+
github_token: ${{ secrets.GITHUB_TOKEN }}

.web-docs/README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# UCloud Plugins
2+
3+
The UCloud plugin is able to build
4+
customized images based on an existing base image for use in UHost Instance.
5+
6+
## Components
7+
8+
The Scaffolding plugin is intended as a starting point for creating Packer plugins, containing:
9+
10+
### Builders
11+
12+
- [ucloud-uhost](/docs/builders/uhost.mdx) - The `ucloud-uhost` builder provides the capability to build
13+
customized images based on an existing base image for use in UHost Instance.
14+
15+
### Post-processors
16+
17+
- [ucloud-import](/docs/post-processors/import.mdx) - The UCloud Import post-processor takes the RAW, VHD, VMDK, or qcow2
18+
artifact from various builders and imports it to UCloud customized image list
19+
for UHost Instance.
20+
21+
## Installation
22+
23+
### Using pre-built releases
24+
25+
#### Using the `packer init` command
26+
27+
Starting from version 1.7, Packer supports a new `packer init` command allowing
28+
automatic installation of Packer plugins. Read the
29+
[Packer documentation](https://www.packer.io/docs/commands/init) for more information.
30+
31+
To install this plugin, copy and paste this code into your Packer configuration .
32+
Then, run [`packer init`](https://www.packer.io/docs/commands/init).
33+
34+
```hcl
35+
packer {
36+
required_plugins {
37+
ucloud = {
38+
version = ">= 1.0.8"
39+
source = "github.com/hashicorp/ucloud"
40+
}
41+
}
42+
}
43+
```
44+
45+
#### Manual installation
46+
47+
You can find pre-built binary releases of the plugin [here](https://github.com/hashicorp/packer-plugin-name/releases).
48+
Once you have downloaded the latest archive corresponding to your target OS,
49+
uncompress it to retrieve the plugin binary file corresponding to your platform.
50+
To install the plugin, please follow the Packer documentation on
51+
[installing a plugin](https://www.packer.io/docs/extending/plugins/#installing-plugins).
52+
53+
54+
#### From Source
55+
56+
If you prefer to build the plugin from its source code, clone the GitHub
57+
repository locally and run the command `go build` from the root
58+
directory. Upon successful compilation, a `packer-plugin-ucloud` plugin
59+
binary file can be found in the root directory.
60+
To install the compiled plugin, please follow the official Packer documentation
61+
on [installing a plugin](https://www.packer.io/docs/extending/plugins/#installing-plugins).

0 commit comments

Comments
 (0)