Skip to content
Snippets Groups Projects
Commit aa8fcf23 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Remove setup job

parent f1468592
No related branches found
No related tags found
1 merge request!10Add gitlab ci into project
......@@ -19,8 +19,6 @@ cache:
- bin/
- .cache/pip
- venv/
- CRI_XCBC/
- ansible/files/
before_script:
- |
......@@ -29,58 +27,46 @@ before_script:
unzip packer_1.8.3_linux_amd64.zip -d bin
rm -vf *.zip
fi
- $CI_PROJECT_DIR/bin/packer --version
- python --version
- python3 -m venv venv
- source venv/bin/activate
- pip install --upgrade pip
- pip install s3cmd ansible python-openstackclient
- |
if [ ! -d $CI_PROJECT_DIR/CRI_XCBC ]; then
git clone https://github.com/uabrc/CRI_XCBC.git
cd CRI_XCBC
git remote add upstream https://github.com/jprorama/CRI_XCBC.git
cd ..
fi
- cd CRI_XCBC
- git config user.name "${GIT_AUTHOR_NAME}"
- git config user.email "${GIT_AUTHOR_EMAIL}"
- git fetch --all
- git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*'
- git fetch upstream '+refs/pull/*/head:refs/remotes/upstream/pr/*'
- git checkout uab-prod
- git merge origin/uab-prod
- git checkout -b integration
- git merge upstream/dev
- cd ..
stages:
- build
- deploy
- cleanup
setup_environment:
build_image:
stage: build
environment:
name: knightly
tags:
- build
script:
- |
if [ ! -d $CI_PROJECT_DIR/CRI_XCBC ]; then
git clone https://github.com/uabrc/CRI_XCBC.git
cd CRI_XCBC
git remote add upstream https://github.com/jprorama/CRI_XCBC.git
cd ..
fi
- cd CRI_XCBC
- git config user.name "${GIT_AUTHOR_NAME}"
- git config user.email "${GIT_AUTHOR_EMAIL}"
- git fetch --all
- git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*'
- git fetch upstream '+refs/pull/*/head:refs/remotes/upstream/pr/*'
- git checkout uab-prod
- git merge origin/uab-prod
- git checkout -b integration
- git merge upstream/dev
- cd ..
- echo "CRI_XCBC_HEAD=$(cd CRI_XCBC; git rev-parse --short HEAD)" | tee $CI_PROJECT_DIR/build.env
- echo "BUILD_DATE=$(TZ=America/Chicago date +%Y%m%d)" | tee $CI_PROJECT_DIR/build.env
- s3cmd get --force --host=$AWS_HOST --host-bucket=$AWS_HOST s3://ood-config/group_vars/all CRI_XCBC/group_vars/prod
- s3cmd get --force -r --host=$AWS_HOST --host-bucket=$AWS_HOST s3://cheaha-cloud-ansible-files/ ansible/files/
artifacts:
reports:
dotenv: build.env
build_image:
stage: build
environment:
name: knightly
needs:
- setup_environment
tags:
- build
script:
- tail -n 10 CRI_XCBC/group_vars/prod
- source venv/bin/activate
- $CI_PROJECT_DIR/bin/packer validate openstack-ood
- >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment