Skip to content

Commit

Permalink
Dockerfile: patch edmx with custom fields, add .dockerignore
Browse files Browse the repository at this point in the history
  • Loading branch information
sacnl committed Dec 28, 2018
1 parent 0a8b06f commit ecefe3e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
integration-tests
s4hana_pipeline
manifest.yml
.git
.gitignore
.cfignore
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
## Builder to hide credentials from image
FROM alpine:latest AS builder

RUN apk add curl
RUN apk add curl libxml2-utils

ARG API_KEY
RUN curl -H "apikey: $API_KEY"\
"https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_BUSINESS_PARTNER/\$metadata"\
-o "API_BUSINESS_PARTNER.edmx"
| xmllint --format - > API_BUSINESS_PARTNER.edmx

COPY business-partner/API_BUSINESS_PARTNER.patch .
RUN patch API_BUSINESS_PARTNER.edmx API_BUSINESS_PARTNER.patch

## Node.js app
FROM node:8
Expand All @@ -26,4 +29,4 @@ COPY --from=builder API_BUSINESS_PARTNER.edmx business-partner/

ENV PORT 8080
EXPOSE 8080
CMD [ "npm", "start" ]
CMD [ "npm", "start" ]
11 changes: 11 additions & 0 deletions business-partner/API_BUSINESS_PARTNER.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- API_BUSINESS_PARTNER.edmx 2018-12-28 23:23:26.539432245 +0100
+++ API_BUSINESS_PARTNER_copy.edmx 2018-12-28 23:27:08.822710416 +0100
@@ -196,6 +196,8 @@
<Key>
<PropertyRef Name="BusinessPartner"/>
</Key>
+ <Property Name="YY1_AddrLastCheckedOn_bus" Type="Edm.DateTime" Precision="0" sap:display-format="Date" sap:label="Addresses Last Checked On"/>
+ <Property Name="YY1_AddrLastCheckedBy_bus" Type="Edm.String" MaxLength="50" sap:label="Addresses Last Checked By"/>
<Property Name="BusinessPartner" Type="Edm.String" Nullable="false" MaxLength="10" sap:display-format="UpperCase" sap:label="Business Partner" sap:quickinfo="Business Partner Number"/>
<Property Name="Customer" Type="Edm.String" MaxLength="10" sap:display-format="UpperCase" sap:label="Customer" sap:quickinfo="Customer Number" sap:creatable="false" sap:updatable="false"/>
<Property Name="Supplier" Type="Edm.String" MaxLength="10" sap:display-format="UpperCase" sap:label="Supplier" sap:quickinfo="Account Number of Supplier" sap:creatable="false" sap:updatable="false"/>

0 comments on commit ecefe3e

Please sign in to comment.