Skip to content

Commit

Permalink
[zen] build using packetfence version
Browse files Browse the repository at this point in the history
bump requirements
  • Loading branch information
nqb committed Jun 3, 2021
1 parent 10d2a8b commit d65600c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
7 changes: 6 additions & 1 deletion addons/vagrant/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ roles:

collections:
- name: inverse_inc.packetfence
version: 1.1.1-1
- name: debops.debops
- name: inverse_inc.windows
- name: inverse_inc.cumulus
- name: inverse_inc.utils
- name: inverse_inc.wireless


# to test locally with Vagrant (due to --force option)
# Ansible will create an export, not a symlink to git repository
# - name: file:///home/nqb/git/ansible-packetfence/.git
# type: git
# version: feature/my-branch
12 changes: 7 additions & 5 deletions ci/packer/zen/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
include ../../../config.mk
#==============================================================================
# Specific variables
#==============================================================================
PF_VERSION=$(CI_COMMIT_REF_NAME)
PF_VERSION=$(PKR_VAR_pf_version)
VM_NAME=$(PKR_VAR_vm_name)
RESULT_DIR=results
# PKR_VAR_myvar environment variable is read by Packer to set myvar in Packer
# PKR_VAR_myvar environment variable is read by Packer to set myvar in Packer
PKR_VAR_pf_version=$(PF_MINOR_RELEASE)
PKR_VAR_vm_name=PacketFence-ZEN
PKR_VAR_output_vbox_directory=$(RESULT_DIR)/virtualbox
PKR_VAR_output_vmware_directory=$(RESULT_DIR)/vmware
Expand All @@ -14,6 +16,7 @@ PKR_VAR_output_vmware_directory=$(RESULT_DIR)/vmware
#==============================================================================
.PHONY: zen
zen:
PKR_VAR_pf_version=$(PKR_VAR_pf_version) \
PKR_VAR_vm_name=$(PKR_VAR_vm_name) \
PKR_VAR_output_vbox_directory=$(PKR_VAR_output_vbox_directory) \
PKR_VAR_output_vmware_directory=$(PKR_VAR_output_vmware_directory) \
Expand Down Expand Up @@ -43,7 +46,7 @@ zen-release:
.PHONY: zen-devel
zen-devel:
make \
PKR_VAR_pf_repo=packetfence-devel \
PKR_VAR_pf_repo=packetfence \
PKR_VAR_pf_package=packetfence \
PKR_VAR_pf_branch=devel \
zen \
Expand All @@ -54,5 +57,4 @@ zen-devel:
.PHONY: zen-test
zen-test:
make \
PF_VERSION=devel \
zen-devel \
zen-devel
1 change: 1 addition & 0 deletions ci/packer/zen/build.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ build {
execute_command = "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'"
script = "scripts/install-pf.sh"
environment_vars = [
"PFVERSION=${var.pf_version}",
"PFREPO=${var.pf_repo}",
"PFPACKAGE=${var.pf_package}",
"PFBRANCH=${var.pf_branch}"
Expand Down
2 changes: 1 addition & 1 deletion ci/packer/zen/scripts/install-pf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o nounset -o pipefail -o errexit
echo "nameserver 8.8.8.8" > /etc/resolv.conf

# Install the PacketFence repos
yum localinstall http://packetfence.org/downloads/PacketFence/RHEL7/packetfence-release-7.${PFBRANCH}.noarch.rpm -y
yum localinstall http://packetfence.org/downloads/PacketFence/RHEL7/${PFVERSION}/packetfence-release-el7.${PFBRANCH}.noarch.rpm -y

# Utils installation
yum install ntp e2fsprogs cloud-utils-growpart -y
Expand Down
4 changes: 4 additions & 0 deletions ci/packer/zen/variables.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ variable pf_package {
variable pf_branch {
type = string
}

variable pf_version {
type = string
}

0 comments on commit d65600c

Please sign in to comment.