Skip to content
This repository was archived by the owner on May 7, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
af1e48d
fix(header): New header integrated.
michaelkleinhenz Oct 16, 2017
d1dba0a
Merge branch 'master' into new_header
michaelkleinhenz Oct 16, 2017
9478e33
fix(deps): updated deps.
michaelkleinhenz Dec 20, 2017
b32d432
Merge branch 'master' into new_header
michaelkleinhenz Dec 20, 2017
4a41502
fix(linking): Fixed linking in the new header.
michaelkleinhenz Dec 22, 2017
1c1d94c
fix(deps): Updated dependencies.
michaelkleinhenz Dec 22, 2017
1c5ef63
Merge branch 'master' into new_header
michaelkleinhenz Dec 22, 2017
0386021
fix(deps): Updated deps.
michaelkleinhenz Dec 22, 2017
5918da7
fix(tests): Fixed tests to work with new header.
michaelkleinhenz Jan 5, 2018
a6673aa
fix(integration): Added integration glue code.
michaelkleinhenz Jan 5, 2018
0a752e7
Merge branch 'master' into new_header
michaelkleinhenz Jan 5, 2018
d66c788
fix(tests): Fixed space switching.
michaelkleinhenz Jan 5, 2018
4f3d64f
fix(dependencies): updated dependencies.
michaelkleinhenz Jan 5, 2018
32a4f14
using custome pipeline repo, try to deploy standalone planner.
pranavgore09 Jan 7, 2018
abaf761
fix sh command
pranavgore09 Jan 7, 2018
7ebf973
remove $ from echo
pranavgore09 Jan 7, 2018
2d89b10
Merge branch 'new_header' of github.com:michaelkleinhenz/fabric8-plan…
pranavgore09 Jan 8, 2018
bb44ba0
runtime uses ../dist for planner dependency
pranavgore09 Jan 8, 2018
5f0ef21
remove unwanted npm commands from jenkinsfile (done in pipeline)
pranavgore09 Jan 8, 2018
5fce8c8
Dockerfile is in base project
pranavgore09 Jan 8, 2018
7348113
use dir() from groovy
pranavgore09 Jan 8, 2018
db60b23
no need of container
pranavgore09 Jan 8, 2018
7a6d31d
use dockerfile from runtime. keep context as base project
pranavgore09 Jan 8, 2018
f84b202
need correct path
pranavgore09 Jan 8, 2018
259f1a0
use dockerifle from base project
pranavgore09 Jan 9, 2018
0c01e10
verify with pwd
pranavgore09 Jan 9, 2018
96f55bf
Merge remote-tracking branch 'upstream/master' into standalone-planne…
pranavgore09 Jan 9, 2018
9441601
all in one place makes easy to test
pranavgore09 Jan 9, 2018
023c772
build for prod
pranavgore09 Jan 9, 2018
66fce30
remove pack
pranavgore09 Jan 9, 2018
5e0bdbd
use docker container
pranavgore09 Jan 9, 2018
fadfc5c
fix imagename
pranavgore09 Jan 9, 2018
7d15bcb
export ENV
pranavgore09 Jan 10, 2018
425e442
just push the image, dont deploy
pranavgore09 Jan 10, 2018
6544a62
use prod build
pranavgore09 Jan 10, 2018
2a0c6fe
dump ENV before build
pranavgore09 Jan 10, 2018
a08762e
added API_URL env
pranavgore09 Jan 10, 2018
1968096
test timeout on jenkins build
pranavgore09 Jan 10, 2018
b474839
unit value as CONSTANT
pranavgore09 Jan 10, 2018
6295abd
use string
pranavgore09 Jan 10, 2018
df2a002
set timeout for build
pranavgore09 Jan 10, 2018
999df74
Merge branch 'master' into new_header
michaelkleinhenz Jan 10, 2018
80267ff
ENV set in build-image step
pranavgore09 Jan 10, 2018
c9afa62
Merge remote-tracking branch 'michael/new_header' into standalone-pla…
pranavgore09 Jan 11, 2018
ff547f5
keep 4 stages in Jenkinsfile only
pranavgore09 Jan 11, 2018
21cfbe4
need UI container
pranavgore09 Jan 11, 2018
1e42de1
perform CD to get snapshot URl
pranavgore09 Jan 11, 2018
008da3b
Merge branch 'master' into new_header
michaelkleinhenz Jan 11, 2018
9200498
Merge remote-tracking branch 'michael/new_header' into standalone-pla…
pranavgore09 Jan 11, 2018
2d01125
Merge remote-tracking branch 'upstream/master' into standalone-planne…
pranavgore09 Jan 11, 2018
5ab5604
fix(deps): Fixed dependencies.
michaelkleinhenz Jan 11, 2018
46ffb8f
Merge remote-tracking branch 'michael/new_header' into standalone-pla…
pranavgore09 Jan 11, 2018
2e9ee13
Merge branch 'master' into new_header
michaelkleinhenz Jan 11, 2018
584dbec
fix(trigger): Trigger build.
michaelkleinhenz Jan 11, 2018
3254871
Use deployPlannerSnapshot. Use custom openshift yaml
pranavgore09 Jan 12, 2018
ae48866
Merge remote-tracking branch 'michael/new_header' into standalone-pla…
pranavgore09 Jan 12, 2018
ce53115
adjust timeout for CI & snapshot deployment
pranavgore09 Jan 12, 2018
2dd3e2c
update dockerignore to ignore node_modules from runtime
pranavgore09 Jan 12, 2018
99d6ee6
Use raw URL for openshift.yml
pranavgore09 Jan 12, 2018
24e8de5
Merge branch 'master' into standalone-planner-cd
pranavgore09 Jan 22, 2018
84f80ce
added openshift template and config to deploy the snapshot
pranavgore09 Jan 24, 2018
c21a37b
Merge branch 'standalone-planner-cd' of github.com:pranavgore09/fabri…
pranavgore09 Jan 24, 2018
e0b4e54
remove other build steps for now because it takes luck and time to pa…
pranavgore09 Jan 25, 2018
7001701
update parameters inside openshift.yaml
pranavgore09 Jan 25, 2018
75642dd
add labels provider and app
pranavgore09 Jan 25, 2018
3eb021a
change route name
pranavgore09 Jan 25, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
# Exclude files and directories whose names start with node_modules in any
# immediate subdirectory of the base project. see https://docs.docker.com/engine/reference/builder/#dockerignore-file
*/node_modules*
*~
*.swp
26 changes: 26 additions & 0 deletions Dockerfile.builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM centos:7
ENV LANG=en_US.utf8

ENV NODE_VERSION 8.3.0

RUN yum -y update && \
yum install -y bzip2 tar git \
yum -y clean all

ENV FABRIC8_USER_NAME=fabric8

RUN useradd --user-group --create-home --shell /bin/false ${FABRIC8_USER_NAME}

ENV HOME=/home/${FABRIC8_USER_NAME}
ENV WORKSPACE=$HOME/fabric8-planner
RUN mkdir $WORKSPACE

COPY . $WORKSPACE
RUN chown -R ${FABRIC8_USER_NAME}:${FABRIC8_USER_NAME} $HOME/*

USER ${FABRIC8_USER_NAME}
WORKDIR $WORKSPACE/

VOLUME /dist

# ENTRYPOINT ["/home/fabric8/fabric8-planner/docker-entrypoint.sh"]
12 changes: 12 additions & 0 deletions Dockerfile.deploy.runtime
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM fabric8/fabric8-openshift-nginx:vd83b3a1
MAINTAINER "Pete Muir <[email protected]>"

USER root

RUN rm -rf /usr/share/nginx/html/
COPY ./runtime/dist /usr/share/nginx/html
RUN chmod -R 777 /var/lib/nginx/
RUN chmod -R 777 /usr/share/nginx/html/


USER ${FABRIC8_USER_NAME}
180 changes: 126 additions & 54 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@Library('github.com/fabric8io/fabric8-pipeline-library@master')
@Library('github.com/pranavgore09/fabric8-pipeline-library@standalone-planner')
def utils = new io.fabric8.Utils()
def flow = new io.fabric8.Fabric8Commands()
def project = 'fabric8-ui/fabric8-planner'
Expand All @@ -14,53 +14,97 @@ node{
fabric8UITemplate{
dockerNode{
ws {
timeout(time: 1, unit: 'HOURS') {
timeout(time: 20, unit: 'MINUTES') {
checkout scm
readTrusted 'deploy/release.groovy'
def pipeline = load 'deploy/release.groovy'
if (utils.isCI()){

pipeline.ci()

// build standalone planner
imageName = "fabric8/fabric8-planner:standalone"
// container('ui'){
// tempVersion = pipeline.ciBuildPlannerProject(project)
// }
container('ui'){
tempVersion = pipeline.ciBuildDownstreamProject(project)
}
// stage('build planner npm'){
// sh '''
// npm cache clean --force
// export API_URL=https://api.prod-preview.openshift.io/api/
// export FORGE_URL=https://forge.api.prod-preview.openshift.io/
// export FABRIC8_REALM=fabric8-test
// export FABRIC8_WIT_API_URL=https://api.prod-preview.openshift.io/api/
// export FABRIC8_SSO_API_URL=https://sso.prod-preview.openshift.io/
// export FABRIC8_AUTH_API_URL=https://auth.prod-preview.openshift.io/api/
// export PROXY_PASS_URL=https://api.free-int.openshift.com
// npm install
// npm run build
// '''
// }

imageName = "fabric8/fabric8-ui:${tempVersion}"
container('docker'){
pipeline.buildImage(imageName)
}
// stage('build runtime npm'){
// dir('runtime'){
// sh 'pwd'
// sh 'npm cache clean --force'
// sh 'npm install'
// // sh 'npm link ../dist/'
// sh '''
// export API_URL=https://api.prod-preview.openshift.io/api/
// export FORGE_URL=https://forge.api.prod-preview.openshift.io/
// export FABRIC8_REALM=fabric8-test
// export FABRIC8_WIT_API_URL=https://api.prod-preview.openshift.io/api/
// export FABRIC8_SSO_API_URL=https://sso.prod-preview.openshift.io/
// export FABRIC8_AUTH_API_URL=https://auth.prod-preview.openshift.io/api/
// export PROXY_PASS_URL=https://api.free-int.openshift.com
// npm run build
// '''
// }
// }

ciDeploy = true
imageName = "fabric8/fabric8-planner:standalone"
// stage('build standalone snapshot image'){
// container('docker'){
// sh 'pwd'
// sh "docker build -t ${imageName} -f ./Dockerfile.deploy.runtime ."
// }
// }

// stage('push standalone snapshot image'){
// container('docker'){
// sh 'pwd'
// sh "docker push ${imageName}"
// }
// }
}
ciDeploy = true

} else if (utils.isCD()){
sh "git checkout master"
sh "git pull"
sh "git remote set-url origin [email protected]:${project}.git"

container('ui'){
pipeline.ci()
}
sh "skip following content, not needed as of now"
// container('ui'){
// pipeline.ci()
// }

def branch
container('ui'){
branch = utils.getBranch()
}
// def branch
// container('ui'){
// branch = utils.getBranch()
// }

def published
container('ui'){
published = pipeline.cd(branch)
}
// def published
// container('ui'){
// published = pipeline.cd(branch)
// }

def releaseVersion
container('ui'){
releaseVersion = utils.getLatestVersionFromTag()
}
// def releaseVersion
// container('ui'){
// releaseVersion = utils.getLatestVersionFromTag()
// }

if (published){
pipeline.updateDownstreamProjects(releaseVersion)
}
// if (published){
// pipeline.updateDownstreamProjects(releaseVersion)
// }
}
}
}
Expand All @@ -72,30 +116,58 @@ if (ciDeploy){
def prj = 'fabric8-ui-'+ env.BRANCH_NAME
prj = prj.toLowerCase()
def route
deployOpenShiftNode(openshiftConfigSecretName: 'fabric8-intcluster-config'){
stage("deploy ${prj}"){
route = deployOpenShiftSnapshot{
mavenRepo = 'http://central.maven.org/maven2/io/fabric8/online/apps/fabric8-ui'
githubRepo = 'fabric8-ui'
originalImageName = 'registry.devshift.net/fabric8-ui/fabric8-ui'
newImageName = imageName
openShiftProject = prj
githubProject = project
}
}
stage('notify'){
def changeAuthor = env.CHANGE_AUTHOR
if (!changeAuthor){
error "no commit author found so cannot comment on PR"
}
def pr = env.CHANGE_ID
if (!pr){
error "no pull request number found so cannot comment on PR"
}
def message = "@${changeAuthor} ${imageName} is deployed and available for testing at https://${route}"
container('clients'){
flow.addCommentToPullRequest(message, pr, project)
}
}
timeout(time: 20, unit: 'MINUTES') {
deployOpenShiftNode(openshiftConfigSecretName: 'fabric8-intcluster-config'){
// stage("deploy ${prj}"){
// route = deployOpenShiftSnapshot{
// mavenRepo = 'http://central.maven.org/maven2/io/fabric8/online/apps/fabric8-ui'
// githubRepo = 'fabric8-ui'
// originalImageName = 'registry.devshift.net/fabric8-ui/fabric8-ui'
// newImageName = imageName
// openShiftProject = prj
// githubProject = project
// }
// }
// stage('notify'){
// def changeAuthor = env.CHANGE_AUTHOR
// if (!changeAuthor){
// error "no commit author found so cannot comment on PR"
// }
// def pr = env.CHANGE_ID
// if (!pr){
// error "no pull request number found so cannot comment on PR"
// }
// def message = "@${changeAuthor} ${imageName} is deployed and available for testing at https://${route}"
// container('clients'){
// flow.addCommentToPullRequest(message, pr, project)
// }
// }
prj = 'fabric8-planner-'+ env.BRANCH_NAME
prj = prj.toLowerCase()
stage("deploy ${prj}"){
route = deployPlannerSnapshot{
mavenRepo = 'https://raw.githubusercontent.com/pranavgore09/fabric8-pipeline-library/standalone-planner/planner-openshift.yml'
githubRepo = 'fabric8-planner'
originalImageName = 'fabric8/fabric8-planner@sha256:3ec108c095febe1fb5d54d27e595f38408736c2e0ab37bba26cf138f5674d861'
newImageName = imageName
openShiftProject = prj
githubProject = project
}
}
stage('notify'){
def changeAuthor = env.CHANGE_AUTHOR
if (!changeAuthor){
error "no commit author found so cannot comment on PR"
}
def pr = env.CHANGE_ID
if (!pr){
error "no pull request number found so cannot comment on PR"
}
def message = "@${changeAuthor} ${imageName} is deployed and available for testing at https://${route}"
container('clients'){
flow.addCommentToPullRequest(message, pr, project)
}
}
}
}
}
101 changes: 101 additions & 0 deletions Jenkinsfile.backup
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
@Library('github.com/fabric8io/fabric8-pipeline-library@master')
def utils = new io.fabric8.Utils()
def flow = new io.fabric8.Fabric8Commands()
def project = 'fabric8-ui/fabric8-planner'
def ciDeploy = false
def tempVersion
def imageName
node{
properties([
disableConcurrentBuilds()
])
}

fabric8UITemplate{
dockerNode{
ws {
timeout(time: 1, unit: 'HOURS') {
checkout scm
readTrusted 'deploy/release.groovy'
def pipeline = load 'deploy/release.groovy'
if (utils.isCI()){

pipeline.ci()

container('ui'){
tempVersion = pipeline.ciBuildDownstreamProject(project)
}

imageName = "fabric8/fabric8-ui:${tempVersion}"
container('docker'){
pipeline.buildImage(imageName)
}

ciDeploy = true


} else if (utils.isCD()){
sh "git checkout master"
sh "git pull"
sh "git remote set-url origin [email protected]:${project}.git"

container('ui'){
pipeline.ci()
}

def branch
container('ui'){
branch = utils.getBranch()
}

def published
container('ui'){
published = pipeline.cd(branch)
}

def releaseVersion
container('ui'){
releaseVersion = utils.getLatestVersionFromTag()
}

if (published){
pipeline.updateDownstreamProjects(releaseVersion)
}
}
}
}
}
}

// deploy a snapshot fabric8-ui pod and notify pull request of details
if (ciDeploy){
def prj = 'fabric8-ui-'+ env.BRANCH_NAME
prj = prj.toLowerCase()
def route
deployOpenShiftNode(openshiftConfigSecretName: 'fabric8-intcluster-config'){
stage("deploy ${prj}"){
route = deployOpenShiftSnapshot{
mavenRepo = 'http://central.maven.org/maven2/io/fabric8/online/apps/fabric8-ui'
githubRepo = 'fabric8-ui'
originalImageName = 'registry.devshift.net/fabric8-ui/fabric8-ui'
newImageName = imageName
openShiftProject = prj
githubProject = project
}
}
stage('notify'){
def changeAuthor = env.CHANGE_AUTHOR
if (!changeAuthor){
error "no commit author found so cannot comment on PR"
}
def pr = env.CHANGE_ID
if (!pr){
error "no pull request number found so cannot comment on PR"
}
def message = "@${changeAuthor} ${imageName} is deployed and available for testing at https://${route}"
container('clients'){
flow.addCommentToPullRequest(message, pr, project)
}
}
}
}
Loading