This repository has been archived by the owner on May 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Cico planner #2473
Merged
nimishamukherjee
merged 88 commits into
fabric8-ui:master
from
pranavgore09:cico-planner
Apr 4, 2018
Merged
Cico planner #2473
Changes from all commits
Commits
Show all changes
88 commits
Select commit
Hold shift + click to select a range
8604ecc
added cico_build for planner.
pranavgore09 ab527c3
Merge remote-tracking branch 'upstream/master' into cico-planner
pranavgore09 31fdeca
Added more comments
pranavgore09 5c39057
Merge remote-tracking branch 'upstream/master' into cico-planner
pranavgore09 ab65fc3
Merge remote-tracking branch 'upstream/master' into cico-planner
pranavgore09 0137925
MKDIR before docker build
pranavgore09 5d5f6e7
abs destination path
pranavgore09 6627517
update destination addr for copying
pranavgore09 db6dc22
update destination path for mount and copy
pranavgore09 2675cc6
add DEVSHIFT_USERNAME DEVSHIFT_PASSWORD in the build
pranavgore09 1bc21e6
remove accidentally commited directory
pranavgore09 6d85f42
Fix docker push params
pranavgore09 8c1e5d4
Fix docker push
pranavgore09 18be13c
tag the build with registry/repo:tag
pranavgore09 06e1d86
Merge remote-tracking branch 'upstream/master' into cico-planner
pranavgore09 2babc94
docker build and push
pranavgore09 daea144
Rebuild cico
pranavgore09 852ee58
run-functests
pranavgore09 c26d9f3
IMAGE TAG
pranavgore09 5ad32a0
Merge remote-tracking branch 'upstream/master' into cico-planner
pranavgore09 0ec2735
Use ID returned by `docker run`
pranavgore09 dcba94b
Merge remote-tracking branch 'upstream/master' into cico-planner
pranavgore09 23715d1
Merge branch 'master' into cico-planner
pranavgore09 a93f4f5
Merge remote-tracking branch 'upstream/master' into cico-planner
pranavgore09 ee59adb
Merge branch 'cico-planner' of github.com:pranavgore09/fabric8-planne…
pranavgore09 e68c6bc
Merge remote-tracking branch 'upstream/master' into cico-planner
pranavgore09 1acbe65
snapshot command
pranavgore09 e4fcc2f
trigger build
pranavgore09 7cc54aa
run only smoke tests
pranavgore09 d91c766
remove all tests
pranavgore09 5198c05
Fix pull registry
pranavgore09 b7c17d6
install gcc-c++
pranavgore09 850a821
Use image_name , required by cico-template
pranavgore09 1d591df
trigger build
pranavgore09 1bf9562
Merge remote-tracking branch 'upstream/master' into cico-planner
pranavgore09 b7ea66d
run func tests
pranavgore09 b0f5cd1
DIRECT_CONNECT=true added
pranavgore09 8218571
Merge branch 'master' into cico-planner
pranavgore09 e33da93
Merge remote-tracking branch 'upstream/master' into cico-planner
pranavgore09 9c15f94
Merge branch 'cico-planner' of github.com:pranavgore09/fabric8-planne…
pranavgore09 5bbe852
remove DIRECT_CONNECT=true
pranavgore09 66f1647
remove versions
pranavgore09 d26afe7
fix(tests): Use latest version of webdriver
jarifibrahim 7001a53
Merge pull request #2 from jarifibrahim/pranav-cico
pranavgore09 e34b160
fix(CI/CD): Increase /dev/shm volume size of docker container
jarifibrahim 407d980
Merge pull request #3 from jarifibrahim/pranav-cico
pranavgore09 fc583ab
Merge branch 'master' into cico-planner
pranavgore09 1f68de0
Revert "fix(tests): Use latest version of webdriver"
jarifibrahim f800026
Revert "remove versions"
jarifibrahim e576a59
Merge pull request #4 from jarifibrahim/pranav-cico
pranavgore09 a1aa913
fix(CI/CD): Increase /dev/shm size from 256mb to 512mb
jarifibrahim ba64122
Merge pull request #5 from jarifibrahim/pranav-cico
pranavgore09 6c26cc9
fix(CI/CD): Remove webdriver version
jarifibrahim bf03746
fix(tests): Wait for quickpreview to be ready
jarifibrahim 9de5be5
Merge pull request #6 from jarifibrahim/pranav-cico
pranavgore09 853561c
Merge branch 'master' into cico-planner
pranavgore09 86cf597
Merge branch 'master' into cico-planner
pranavgore09 8830ff0
install specific version of chrome
pranavgore09 e151443
Merge branch 'cico-planner' of github.com:pranavgore09/fabric8-planne…
pranavgore09 1ab47f9
Merge remote-tracking branch 'upstream/master' into cico-planner
pranavgore09 5948896
use yum to install rpm
pranavgore09 f6620a4
revert chrome driver version
pranavgore09 7379406
fix(tests): Attempt to stabilize workitemTableTest
jarifibrahim 6b62a18
Merge pull request #7 from jarifibrahim/pranav-cico
pranavgore09 53be071
fix(CI/CD) : comment why need to downgrade
pranavgore09 21114a5
Merge branch 'cico-planner' of github.com:pranavgore09/fabric8-planne…
pranavgore09 075b841
trigger build
pranavgore09 bc7aeab
fix typo
pranavgore09 48e381d
Merge remote-tracking branch 'upstream/master' into cico-planner
pranavgore09 35cdb82
fix typo
pranavgore09 9600ff2
fix(tests): Set webdriver version via env variable
jarifibrahim 17e0213
Merge pull request #8 from jarifibrahim/pranav-cico
pranavgore09 1869dd2
Merge branch 'cico-planner' of github.com:pranavgore09/fabric8-planne…
pranavgore09 0d91900
install latest chrome
pranavgore09 4139eb1
install packages in Dockerfile only
pranavgore09 537acb7
remove the obvious
pranavgore09 6f26e83
Merge branch 'master' into cico-planner
pranavgore09 c7e39bb
Merge branch 'master' into cico-planner
pranavgore09 9709b18
Merge branch 'master' into cico-planner
pranavgore09 bea30b4
remove old comments
pranavgore09 b190458
trigger builds
pranavgore09 162a6fb
use the same user inside container as that of host
pranavgore09 2fb9c91
retrigger cico
pranavgore09 33effc3
Merge branch 'master' into cico-planner
pranavgore09 05ebc6a
Merge branch 'master' into cico-planner
pranavgore09 3df84f1
Merge branch 'master' into cico-planner
pranavgore09 7991b44
Merge branch 'master' into cico-planner
pranavgore09 2938d4c
Merge branch 'master' into cico-planner
pranavgore09 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
node_modules | ||
*~ | ||
*.swp | ||
dist | ||
runtime/node_modules | ||
runtime/*~ | ||
runtime/*.swp | ||
runtime/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
#!/bin/bash | ||
|
||
# This file is supposed to be executed by CICO build (ci.centos.org/view/Devtools/) | ||
# 1. Run tests for fabric8-planner | ||
# 2. Create snapshot with fabric8-ui's master and fabric8-planner's current changes | ||
|
||
# Show command before executing | ||
set -x | ||
|
||
# Exit on error | ||
set -e | ||
|
||
# Source environment variables of the jenkins slave | ||
# that might interest this worker. | ||
if [ -e "jenkins-env" ]; then | ||
cat jenkins-env \ | ||
| grep -E "(JENKINS_URL|DEVSHIFT_USERNAME|DEVSHIFT_PASSWORD|GIT_BRANCH|GIT_COMMIT|BUILD_NUMBER|ghprbSourceBranch|ghprbActualCommit|BUILD_URL|ghprbPullId)=" \ | ||
| sed 's/^/export /g' \ | ||
> /tmp/jenkins-env | ||
source /tmp/jenkins-env | ||
fi | ||
|
||
# We need to disable selinux for now, XXX | ||
/usr/sbin/setenforce 0 | ||
|
||
# Get all the deps in | ||
yum -y install docker | ||
service docker start | ||
|
||
# Build builder image | ||
cp /tmp/jenkins-env . | ||
|
||
mkdir -p fabric8-ui-dist | ||
# Build fabric8-planner image | ||
docker build -t fabric8-planner-builder . | ||
# User root is required to run webdriver-manager update. | ||
# This shouldn't be a problem for CI containers | ||
# Chrome crashes on low size of /dev/shm. We need the --shm-size=256m flag. | ||
CID=$(docker run --detach=true \ | ||
--shm-size=256m \ | ||
-u $(shell id -u $(USER)):$(shell id -g $(USER)) \ | ||
-v $(pwd)/fabric8-ui-dist:/home/fabric8/fabric8-planner/fabric8-ui-dist:Z \ | ||
--cap-add=SYS_ADMIN \ | ||
-t fabric8-planner-builder) | ||
|
||
|
||
# Build fabric8-planner | ||
docker exec $CID npm install | ||
docker exec $CID npm run build | ||
|
||
# Run unit tests | ||
docker exec $CID npm run tests -- --unit | ||
|
||
## Exec functional tests | ||
docker exec $CID bash -c 'cd runtime; npm install' | ||
docker exec $CID bash -c 'DEBUG=true HEADLESS_MODE=true WEBDRIVER_VERSION=2.37 ./scripts/run-functests.sh' | ||
|
||
# Following steps will create a snapshot for testing | ||
|
||
# Build and integrate planner with fabric8-ui | ||
docker exec $CID npm pack dist/ | ||
docker exec $CID git clone https://github.com/fabric8-ui/fabric8-ui.git | ||
docker exec $CID bash -c 'cd fabric8-ui; npm install' | ||
docker exec $CID bash -c 'cd fabric8-ui && npm install ../*0.0.0-development.tgz' | ||
docker exec $CID bash -c ''' | ||
export FABRIC8_WIT_API_URL="https://api.prod-preview.openshift.io/api/" | ||
export FABRIC8_RECOMMENDER_API_URL="https://recommender.prod-preview.api.openshift.io" | ||
export FABRIC8_FORGE_API_URL="https://forge.api.prod-preview.openshift.io" | ||
export FABRIC8_SSO_API_URL="https://sso.prod-preview.openshift.io/" | ||
export FABRIC8_AUTH_API_URL="https://auth.prod-preview.openshift.io/api/" | ||
|
||
export OPENSHIFT_CONSOLE_URL="https://console.free-stg.openshift.com/console/" | ||
export WS_K8S_API_SERVER="f8osoproxy-test-dsaas-preview.b6ff.rh-idev.openshiftapps.com:443" | ||
export FABRIC8_FEATURE_TOGGLES_API_URL="f8osoproxy-test-dsaas-preview.b6ff.rh-idev.openshiftapps.com:443" | ||
|
||
export PROXIED_K8S_API_SERVER="${WS_K8S_API_SERVER}" | ||
export OAUTH_ISSUER="https://${WS_K8S_API_SERVER}" | ||
export PROXY_PASS_URL="https://${WS_K8S_API_SERVER}" | ||
export OAUTH_AUTHORIZE_URI="https://${WS_K8S_API_SERVER}/oauth/authorize" | ||
export AUTH_LOGOUT_URI="https://${WS_K8S_API_SERVER}/connect/endsession?id_token={{id_token}}" | ||
|
||
cd fabric8-ui && npm run build:prod | ||
''' | ||
# Copy dist and Dockerfile.deploy to host (via mounted dir) | ||
docker exec $CID bash -c 'cd fabric8-ui; cp -r dist/ /home/fabric8/fabric8-planner/fabric8-ui-dist/' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to copy because it is already mounted to the correct place (see https://github.com/fabric8-ui/fabric8-planner/pull/2473/files#r176723542). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pease see #2473 (comment) |
||
docker exec $CID bash -c 'cd fabric8-ui; cp Dockerfile.deploy /home/fabric8/fabric8-planner/fabric8-ui-dist' | ||
|
||
REGISTRY="push.registry.devshift.net" | ||
|
||
# login first | ||
if [ -n "${DEVSHIFT_USERNAME}" -a -n "${DEVSHIFT_PASSWORD}" ]; then | ||
docker login -u ${DEVSHIFT_USERNAME} -p ${DEVSHIFT_PASSWORD} ${REGISTRY} | ||
else | ||
echo "Could not login, missing credentials for the registry" | ||
exit 1 | ||
fi | ||
|
||
# Build and push image | ||
# Following code is not tested on local(remove this comment when tested with cico) | ||
TAG="SNAPSHOT-PR-${ghprbPullId}" | ||
IMAGE_REPO="fabric8-ui/fabric8-planner" | ||
|
||
cd fabric8-ui-dist | ||
docker build -t fabric8-planner-snapshot -f Dockerfile.deploy . | ||
docker tag fabric8-planner-snapshot ${REGISTRY}/${IMAGE_REPO}:$TAG | ||
docker push ${REGISTRY}/${IMAGE_REPO}:${TAG} | ||
|
||
PULL_REGISTRY="registry.devshift.net" | ||
image_name="${PULL_REGISTRY}/${IMAGE_REPO}:${TAG}" | ||
echo "======= Snapshot can be created by running following command" | ||
echo "docker run -e PROXY_PASS_URL=\"https://api.free-stg.openshift.com\" -p 8080:8080 ${image_name}" | ||
echo "=======" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add
-u $(shell id -u $(USER)):$(shell id -g $(USER))
?