diff --git a/jenkins/jobs/magnum.yaml b/jenkins/jobs/magnum.yaml index 85d4705a1a..cbd89ffccb 100644 --- a/jenkins/jobs/magnum.yaml +++ b/jenkins/jobs/magnum.yaml @@ -204,7 +204,7 @@ #!/bin/bash -eux cd ~ - if [ "{image-name}" == "ubuntu-mesos" ]; then + if [[ "{image-name}" =~ ^(ubuntu-mesos|centos-dcos)$ ]]; then EXTRA_PROJECTS="openstack/tripleo-image-elements openstack/heat-templates" else EXTRA_PROJECTS="" @@ -249,6 +249,30 @@ heat-config heat-config-script -o $WORKSPACE/{image-name}.qcow2 $MESOS_ELEMENTS/validate_image.sh $WORKSPACE/{image-name}.qcow2 + elif [ "{image-name}" == "centos-dcos" ]; then + DCOS_ELEMENTS=./openstack/magnum/contrib/drivers/dcos_centos_v1/image + TRIPLEO_ELEMENTS=./openstack/tripleo-image-elements/elements + HEAT_ELEMENTS=./openstack/heat-templates/hot/software-config/elements + # Order matters, we need the docker elements from DCOS_ELEMENTS to be used first + export ELEMENTS_PATH=$DCOS_ELEMENTS:$DIB_ELEMENTS:$TRIPLEO_ELEMENTS:$HEAT_ELEMENTS + + # TODO: Add install_imagebuild_deps scipt in DC/OS dir + $MESOS_ELEMENTS/install_imagebuild_deps.sh + + export DIB_IMAGE_SIZE=3.0 + + export FS_TYPE=xfs + + curl -O https://downloads.dcos.io/dcos/stable/commit/e64024af95b62c632c90b9063ed06296fcf38ea5/dcos_generate_config.sh + export DCOS_GENERATE_CONFIG_SRC=`pwd`/dcos_generate_config.sh + + disk-image-create \ + centos7 vm docker dcos selinux-permissive \ + os-collect-config os-refresh-config os-apply-config \ + heat-config heat-config-script \ + -o $WORKSPACE/{image-name}.qcow2 + + #TODO: Add size validation else MAGNUM_ELEMENTS=./openstack/magnum/magnum/drivers/common/image export ELEMENTS_PATH=$DIB_ELEMENTS:$MAGNUM_ELEMENTS diff --git a/jenkins/jobs/projects.yaml b/jenkins/jobs/projects.yaml index a152c68926..74b09ae7d2 100644 --- a/jenkins/jobs/projects.yaml +++ b/jenkins/jobs/projects.yaml @@ -6753,6 +6753,7 @@ image-name: - 'fedora-atomic-25' - 'ubuntu-mesos' + - 'centos-dcos' - api-ref-jobs: service: container-infrastructure-management diff --git a/zuul/layout.yaml b/zuul/layout.yaml index b5896b7418..34d2274506 100755 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -11656,6 +11656,7 @@ projects: periodic: - periodic-magnum-dib-buildimage-fedora-atomic-25-ubuntu-xenial - periodic-magnum-dib-buildimage-ubuntu-mesos-ubuntu-xenial + - periodic-magnum-dib-buildimage-centos-dcos-ubuntu-xenial experimental: - gate-functional-dsvm-magnum-k8s-multinode-ubuntu-xenial-nv - gate-functional-dsvm-magnum-swarm-multinode-ubuntu-xenial-nv