forked from spinnaker/gate
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1.30.1_v6.58.1-oss' into v4.0.4-1.30.1
# Conflicts: # gate-web/src/main/groovy/com/netflix/spinnaker/gate/config/GateWebConfig.groovy # gradle.properties
- Loading branch information
1 parent
bc0b15b
commit a1d7789
Showing
26 changed files
with
827 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# To Know Git version | ||
git --version | ||
|
||
# To Know Docker version | ||
docker --version | ||
|
||
# To Run Gradale Build need to have Java Vesion 1.11.+ | ||
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 | ||
|
||
# Setting JAVA_HOME to System PATH | ||
export PATH=$PATH:$JAVA_HOME | ||
|
||
# Get the Shorter format of Git-SHA | ||
export GITHASH=`git rev-parse --short HEAD` | ||
|
||
# Get the BUILD Date | ||
export BUILDDATE=`date -u +"%Y%m%d%H%M"` | ||
|
||
# For Assiging the Gradle Resources | ||
export GRADLE_OPTS="-Xmx6g -Xms6g" | ||
|
||
# The Current Build ID | ||
echo "Build id is --------------------- $BUILD_ID" | ||
|
||
# Gradle command to Produce the Dependant targetfiles for Docker build | ||
./gradlew gate-web:installDist -x test | ||
|
||
cp docker/custom-plugin.json custom-plugin.json | ||
|
||
# Assigning Rhel Image Name according to Quay.io Details | ||
IMAGENAME="quay.io/opsmxpublic/ubi8-oes-gate:${GITHASH}-${BUILD_NUMBER}" | ||
|
||
# Assigning Rhel Image Name according to Docker.io Details | ||
RELEASE_IMAGENAME="opsmx11/ubi8-oes-gate:${GITHASH}-${BUILD_NUMBER}" | ||
|
||
|
||
# To Build Docker image with Given Docker File | ||
docker build -t $IMAGENAME . -f ${DOCKERFILE_PATH} --no-cache --build-arg CUSTOMPLUGIN_RELEASEVERSION=${CUSTOMPLUGIN_RELEASEVERSION} | ||
|
||
# Create new Image Tag for Docker.io with the previous Build | ||
docker tag $IMAGENAME $RELEASE_IMAGENAME | ||
|
||
# Quay.io login | ||
docker login -u $quay_user -p $quay_pass quay.io | ||
|
||
# To Push the Docker image into Quay.io | ||
docker push $IMAGENAME | ||
|
||
# Docker.io login | ||
docker login -u $docker_user -p $docker_pass docker.io | ||
|
||
# To Push the Docker image into Quay.io | ||
docker push $RELEASE_IMAGENAME | ||
|
||
echo "Gate: ${IMAGENAME}" | ||
|
||
# Quay Image Name as Artifact | ||
echo \"Gate\": \"${IMAGENAME}\" > file.properties; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM registry.access.redhat.com/ubi8/ubi:8.3 | ||
MAINTAINER [email protected] | ||
COPY ./gate-web/build/install/gate /opt/gate | ||
RUN yum -y install java-11-openjdk-headless.x86_64 wget vim curl net-tools nettle | ||
RUN yum -y update | ||
RUN adduser spinnaker | ||
RUN mkdir -p /opt/gate/plugins && mkdir -p /opt/spinnaker/plugins | ||
####adding customplugin zip | ||
ARG CUSTOMPLUGIN_RELEASEVERSION | ||
ENV CUSTOMPLUGIN_RELEASEVERSION=$CUSTOMPLUGIN_RELEASEVERSION | ||
COPY custom-plugin.json /opt/spinnaker/plugins/plugins.json | ||
RUN wget -O VerificationPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/VerificationPlugin-v1.0.1-SNAPSHOT.zip \ | ||
&& wget -O TestVerificationPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/TestVerificationPlugin-v1.0.1-SNAPSHOT.zip \ | ||
&& wget -O policyPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/policyPlugin-v1.0.1-SNAPSHOT.zip \ | ||
&& wget -O ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip | ||
RUN mv VerificationPlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ \ | ||
&& mv TestVerificationPlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ \ | ||
&& mv policyPlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ \ | ||
&& mv ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip /opt/spinnaker/plugins/ | ||
|
||
RUN sed -i 's/"VERIFICATION_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/VerificationPlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json \ | ||
&& sed -i 's/"TESTVERIFICATION_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/TestVerificationPlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json \ | ||
&& sed -i 's/"POLICY_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/policyPlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json \ | ||
&& sed -i 's/"APPROVAL_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip | awk '{print $1}')"\"'/g' /opt/spinnaker/plugins/plugins.json | ||
RUN chown -R spinnaker:spinnaker /opt/spinnaker | ||
RUN chmod -R 777 /opt/gate/plugins/ | ||
RUN chown -R spinnaker:spinnaker /opt/ | ||
USER spinnaker | ||
CMD ["/opt/gate/bin/gate"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.