Skip to content

Commit

Permalink
Centosbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
Hardik Tolia (c) authored and Shariqu Sharique e Shaikh (c) committed Feb 10, 2023
1 parent 529cdfb commit 3f10b8a
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ cache:
- .cache/pip
- venv/
- venv-prov/
- venv-centos/

stages:
- build
Expand Down Expand Up @@ -54,7 +55,7 @@ build-windows:
paths:
- VMware-NSX-Migration-for-VMware-Cloud-Director-*.zip

build-linux:
build-ubuntu:
stage: build
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
Expand All @@ -72,7 +73,7 @@ build-linux:
- pip install pycrypto
script:
- echo "Build Linux package - RELEASE_VERSION=$RELEASE_VERSION"
- export LINUX_PACKAGE="VMware-NSX-Migration-for-VMware-Cloud-Director-$RELEASE_VERSION.tar.gz"
- export LINUX_PACKAGE="VMware-NSX-Migration-for-VMware-Cloud-Director-$RELEASE_VERSION-Ubuntu.tar.gz"
- echo "LINUX_PACKAGE=$LINUX_PACKAGE"
- python -m PyInstaller src/vcdNSXMigrator.spec
- tar -czvf $LINUX_PACKAGE -C dist/ .
Expand All @@ -83,6 +84,36 @@ build-linux:
paths:
- VMware-NSX-Migration-for-VMware-Cloud-Director-*.tar.gz

build-centos:
image: centos/python-36-centos7:latest
stage: build
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH =~ /v1.*/
- if: $CI_COMMIT_BRANCH == "master"
- if: $FORCE_BUILD == "true"
before_script:
- python --version
- pip install virtualenv
- python3 -m virtualenv venvnew
- source venvnew/bin/activate
- python --version
- pip install -r ./requirements_build.txt
- pip install -r ./src/requirements.txt
- pip install pycrypto
script:
- echo "Build Linux package - RELEASE_VERSION=$RELEASE_VERSION"
- export LINUX_PACKAGE="VMware-NSX-Migration-for-VMware-Cloud-Director-$RELEASE_VERSION-Centos.tar.gz"
- echo "LINUX_PACKAGE=$LINUX_PACKAGE"
- python -m PyInstaller src/vcdNSXMigrator.spec
- tar -czvf $LINUX_PACKAGE -C dist/ .
tags:
- centos
artifacts:
name: "$CI_JOB_NAME-binaries"
paths:
- VMware-NSX-Migration-for-VMware-Cloud-Director-*.tar.gz

provenance:
stage: generate-provenance
rules:
Expand Down

0 comments on commit 3f10b8a

Please sign in to comment.