Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Cico planner #2473

Merged
merged 88 commits into from
Apr 4, 2018
Merged

Cico planner #2473

merged 88 commits into from
Apr 4, 2018

Conversation

pranavgore09
Copy link
Contributor

Run build + unit + func tests on cico

@pranavgore09 pranavgore09 self-assigned this Feb 21, 2018
@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-3 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-4 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

docker build -t fabric8-planner-builder -f Dockerfile .
# User root is required to run webdriver-manager update.
# This shouldn't be a problem for CI containers
docker run --detach=true --name=fabric8-planner -v $(pwd)/fabric8-ui-dist:/home/fabric8/fabric8-planner/fabric8-ui-dist:Z --cap-add=SYS_ADMIN -t fabric8-planner-builder
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker run returns the ID of the container being run. It would be nice if you don't specify the name fabric8-planner but instead use the ID below in docker exec fabric8-planner.

# Following steps will create a snapshot for testing

# Build and integrate planner with fabric8-ui
docker exec fabric8-planner npm pack dist/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of running each command individually you might as well mount a file to the fabric8-planner image and execute that. It probably is cleaner.

@@ -0,0 +1,215 @@
{
"name": "fabric8-planner",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file added here? It looks pretty much like something that exists in another place as well and maintaining multiple versions in different locations is too hard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accident!

"npm": ">= 5.3.0"
},
"dependencies": {
"@angular/animations": "^4.4.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you want to use sticky versions? @michaelkleinhenz what do you think?

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-5 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-6 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-7 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-8 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-10 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-11 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@centos-ci
Copy link
Collaborator

@pranavgore09 Your image is available in the registry: docker pull registry.devshift.net/MISSING_IMAGE_NAME:SNAPSHOT-PR-2473.

Copy link
Member

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to cleanup the docker file and the cico_run_tests.sh file. Let's do that in a separate PR.
Let's merge this 🚀

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-53 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-54 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@centos-ci
Copy link
Collaborator

@pranavgore09 Your image is available in the registry: Run docker run -e PROXY_PASS_URL="https://api.free-stg.openshift.com" -p 8080:8080 MISSING_IMAGE.

# Chrome crashes on low size of /dev/shm. We need the --shm-size=256m flag.
CID=$(docker run --detach=true \
--shm-size=256m \
-v $(pwd)/fabric8-ui-dist:/home/fabric8/fabric8-planner/fabric8-ui-dist:Z \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to: -v $(pwd)/fabric8-ui-dist:/home/fabric8/fabric8-planner/dist:Z \

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @kwk while we were discussing I forgot, this dist we want on the host is not from planner. It is from fabric8-ui directory that we have cloned inside the container. So, I do not see other option than to copy it ATM

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pranavgore09 you could simply mount two directories into the container :)

Copy link
Contributor

@debloper debloper Mar 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we talking about something like this (or am I missing something): https://github.com/fabric8-ui/fabric8-planner/blob/master/scripts/bootstrap.sh#L102

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@debloper I'm just saying that we can have one dist for planner and one dist for platform mounted into the container upon start.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kwk I'm not sure why do you want to mount 2 directories. We do not need to mount two directories. Right now we mount a temporary directory with name fabric8-ui-dist into the container. Once planner is integrated into fabric8-ui; we build the new fabric8-ui (using npm run build:prod) and copy the final dist folder from fabric8-ui to the host.
We use this dist directory in the host to build the docker image.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@debloper Nope. We mount the volume for a completely different purpose.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clarify the purpose, so that we're on the same page. Something seems off here.

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/'
Copy link
Collaborator

Choose a reason for hiding this comment

The 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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pease see #2473 (comment)

Copy link
Collaborator

@kwk kwk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# 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 \
Copy link
Collaborator

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))?

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-55 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@centos-ci
Copy link
Collaborator

@pranavgore09 Your image is available in the registry: Run docker run -e PROXY_PASS_URL="https://api.free-stg.openshift.com" -p 8080:8080 MISSING_IMAGE.

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-56 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@centos-ci
Copy link
Collaborator

@pranavgore09 Your image is available in the registry: Run docker run -e PROXY_PASS_URL="https://api.free-stg.openshift.com" -p 8080:8080 MISSING_IMAGE.

@centos-ci
Copy link
Collaborator

@pranavgore09 Your image is available in the registry: Run docker run -e PROXY_PASS_URL="https://api.free-stg.openshift.com" -p 8080:8080 MISSING_IMAGE.

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-57 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@jarifibrahim
Copy link
Member

[test]

@jarifibrahim
Copy link
Member

@pranavgore09 The [test] command triggered a new build. The [test] command is not project specific, it is cico specific.

@centos-ci
Copy link
Collaborator

@pranavgore09 Your image is available in the registry: Run docker run -e PROXY_PASS_URL="https://api.free-stg.openshift.com" -p 8080:8080 MISSING_IMAGE.

1 similar comment
@centos-ci
Copy link
Collaborator

@pranavgore09 Your image is available in the registry: Run docker run -e PROXY_PASS_URL="https://api.free-stg.openshift.com" -p 8080:8080 MISSING_IMAGE.

@centos-ci
Copy link
Collaborator

@pranavgore09 Your image is available in the registry: Run docker run -e PROXY_PASS_URL="https://api.free-stg.openshift.com" -p 8080:8080 MISSING_IMAGE.

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2473-60 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2473-fabric8-planner.badger.fabric8.io

@centos-ci
Copy link
Collaborator

@pranavgore09 Your image is available in the registry: Run docker run -e PROXY_PASS_URL="https://api.free-stg.openshift.com" -p 8080:8080 MISSING_IMAGE.

@nimishamukherjee nimishamukherjee merged commit f3f07b8 into fabric8-ui:master Apr 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants