Skip to content

Commit

Permalink
copy config file on assemble
Browse files Browse the repository at this point in the history
  • Loading branch information
startxfr committed Mar 3, 2018
1 parent f801467 commit 2ee8630
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .s2i/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
cd $APP_PATH
if[[ -d /tmp/src ]]; then
cp -R /tmp/src/* $APP_PATH/
if[[ -f /tmp/src/sxapi.json ]]; then
cp -f /tmp/src/sxapi.json $CONF_PATH/sxapi.json
fi;
# rm -rf /tmp/src
fi;
npm install -production
Expand Down
53 changes: 16 additions & 37 deletions openshift-template-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "sxapi",
"name": "${APP_NAME}",
"annotations": {
"openshift.io/display-name": "Startx SXAPI framework (S2I)",
"openshift.io/display-name": "Application ${APP_NAME}",
"openshift.io/generated-by": "STARTX"
},
"labels": {
Expand All @@ -39,6 +39,17 @@
"tags": [
{
"name": "latest",
"annotations": {
"openshift.io/display-name": "Application ${APP_NAME}",
"description": "Base image for the application ${APP_NAME}",
"iconClass": "icon-nodejs",
"tags": "startx,alpine,nodejs,sxapi-latest,application,${APP_NAME}",
"supports": "sxapi:latest,nodejs,http",
"version": "latest"
}
},
{
"name": "sxapi",
"annotations": {
"openshift.io/display-name": "S2I Startx SXAPI framework (latest)",
"description": "Builder for Simple and eXtensible API framework based on alpine (latest)",
Expand All @@ -56,38 +67,6 @@
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APP_NAME}",
"annotations": {
"openshift.io/display-name": "Application ${APP_NAME}",
"openshift.io/generated-by": "STARTX"
},
"labels": {
"base-image": "sxapi",
"app": "${APP_NAME}",
"type": "${APP_TYPE}",
"provider": "startx"
}
},
"spec": {
"tags": [
{
"name": "latest",
"annotations": {
"openshift.io/display-name": "Application ${APP_NAME}",
"description": "Base image for the application ${APP_NAME}",
"iconClass": "icon-nodejs",
"tags": "startx,alpine,nodejs,sxapi-latest,application,${APP_NAME}",
"supports": "sxapi:latest,nodejs,http",
"version": "latest"
}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
Expand Down Expand Up @@ -159,7 +138,7 @@
"containers": [
{
"name": "${APP_NAME}",
"image": "startx/sxapi@sha256:d39be654d7336f665e8901c543ebf363baff093c5d21d6d24e4a3405629eeb40",
"image": "startx/sxapi@sha256:a553b19f6858737f1b2cef8946aa260a9ba34a995ffca12fc25f380e58703544",
"command": [
"start"
],
Expand Down Expand Up @@ -329,7 +308,7 @@
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"name": "sxapi:latest"
"name": "${APP_NAME}:sxapi"
},
"env": [
{
Expand Down Expand Up @@ -357,7 +336,7 @@
"name": "APP_NAME",
"displayName": "Application name",
"description": "The name of the created application",
"value": "sxapi",
"value": "app",
"required": true
},
{
Expand Down
2 changes: 1 addition & 1 deletion openshift-template-dc.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
"name": "APP_NAME",
"displayName": "Application name",
"description": "The name of the created application",
"value": "sxapi",
"value": "app",
"required": true
},
{
Expand Down

0 comments on commit 2ee8630

Please sign in to comment.