-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
63 lines (44 loc) · 2.85 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM alpine
ARG build-sfdc-username
ARG build-sfdc-passwordtoken
ARG build-sfdc-serverurl
RUN apk update
RUN apk add bash
RUN apk add openssh
RUN apk add git
RUN apk add openjdk8
RUN apk add apache-ant --update-cache \
--repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ \
--allow-untrusted
RUN apk add --update curl && \
rm -rf /var/cache/apk/*
RUN mkdir /root/.ssh && echo "StrictHostKeyChecking no " > /root/.ssh/config
RUN apk update \
&& apk add ca-certificates wget \
&& update-ca-certificates
ENV ANT_HOME /usr/share/java/apache-ant
ENV SALESFORCE_API_VERSION 38
ENV SFDC_USERNAME ${build-sfdc-username:test-user-name@test.sfdc.org}
ENV SFDC_PASSWORDSFDC_TOKEN ${build-sfdc-passwordtoken:testpass}
ENV SFDC_SERVERURL ${build-sfdc-serverurl:https://test.salesforce.com}
RUN echo '***********************'
RUN echo $SFDC_USERNAME
RUN echo $SFDC_PASSWORDSFDC_TOKEN
RUN echo $SFDC_SERVERURL
RUN echo '***********************'
RUN mkdir /usr/local/sfdc-build
RUN mkdir /usr/local/sfdc-build/prod-metadata-backup
RUN mkdir /usr/local/sfdc-build/src
RUN mkdir /usr/local/sfdc-build/src/pages
RUN echo '<apex:page id="xNoDeploy"></apex:page>' >> /usr/local/sfdc-build/src/pages/xNoDeploy.page;
RUN echo '<?xml version="1.0" encoding="UTF-8"?><ApexPage xmlns="http://soap.sforce.com/2006/04/metadata"><apiVersion>39.0</apiVersion><availableInTouch>false</availableInTouch><confirmationTokenRequired>false</confirmationTokenRequired><label>xNoDeploy</label></ApexPage>' >> /usr/local/sfdc-build/src/pages/xNoDeploy.page-meta.xml;
RUN wget https://github.com/dancinllama/ant-salesforce/raw/master/ant-salesforce_${SALESFORCE_API_VERSION}.jar -P /usr/local/sfdc-build/
RUN wget https://github.com/dancinllama/DockerApexDoc/raw/master/apexdoc.jar -P /usr/local/sfdc-build/
RUN wget https://github.com/blackcappedchickadee/docker-sfdc-ci-builddev/raw/master/build.xml -P /usr/local/sfdc-build/
RUN wget https://github.com/blackcappedchickadee/docker-sfdc-ci-builddev/raw/master/build.properties -P /usr/local/sfdc-build/
RUN wget https://github.com/blackcappedchickadee/docker-sfdc-ci-builddev/raw/master/package.xml -P /usr/local/sfdc-build/src/
RUN wget https://github.com/blackcappedchickadee/docker-sfdc-ci-builddev/raw/master/package.xml -P /usr/local/sfdc-build/prod-metadata-backup
# RUN ant -buildfile /usr/local/sfdc-build/build.xml banner -Dsfdc.username=SFDC_USERNAME -Dsfdc.password=SFDC_PASSWORDSFDC_TOKEN -Dsfdc.serverurl=SFDC_SERVERURL -Dsfdc.apiversion=SALESFORCE_API_VERSION
RUN ant -buildfile /usr/local/sfdc-build/build.xml retrieveUnpackaged -Dsfdc.username=SFDC_USERNAME -Dsfdc.password=SFDC_PASSWORDSFDC_TOKEN -Dsfdc.serverurl=SFDC_SERVERURL -Dsfdc.apiversion=SALESFORCE_API_VERSION
RUN cd /usr/local/sfdc-build/src
RUN ls -l