Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Satak committed Jul 13, 2020
1 parent 0667194 commit 64b0c81
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 6 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Publish to DockerHub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: satak/vcsim
tags: latest
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ FROM vmware/photon:latest
LABEL name="vCenter Appliance Simulator"
LABEL description="A VMware vCenter API mock server based on govmomi"
LABEL maintainer="satak"
LABEL version="1.0.0"

COPY --from=builder /go/bin/vcsim .
CMD ["./vcsim", "-l", "0.0.0.0:443"]
11 changes: 8 additions & 3 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ resource "vsphere_virtual_machine" "vm" {
adapter_type = data.vsphere_virtual_machine.template.network_interface_types[0]
}

clone {
/*clone {
template_uuid = data.vsphere_virtual_machine.template.id
/*
customize {
linux_options {
host_name = var.vm_name
Expand All @@ -65,9 +65,14 @@ resource "vsphere_virtual_machine" "vm" {
ipv4_netmask = "24"
}
}
*/
} */

clone {
template_uuid = "b487e561-5b48-535a-9ad8-b130c10eda5a"
}


wait_for_guest_net_routable = false
wait_for_guest_ip_timeout = 0
wait_for_guest_net_timeout = -1
Expand Down
7 changes: 4 additions & 3 deletions terraform/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ datastore = "datastore/LocalDS_0"
resource_pool = "DC0_H0/Resources"
network = "network/VM Network"

vm_name = "vcsimtest"
vm_template = "DC0_H0_VM0"
vm_name = "vcsimtest4"
// vm_template = "DC0_H0_VM0"
vm_template = "vcsimtest2"
// vm_folder = "vm"
vm_password = "password"
vm_password = "xxx"

0 comments on commit 64b0c81

Please sign in to comment.