Removed extra files.

This commit is contained in:
Andrew Pitt 2020-03-17 11:47:14 -04:00
parent 47f06c48a5
commit 5644575888
2 changed files with 0 additions and 149 deletions

View file

@ -1,70 +0,0 @@
try {
def appName=env.APP_NAME
def gitSourceUrl=env.GIT_SOURCE_URL
def gitSourceRef=env.GIT_SOURCE_REF
def project=""
def projectVersion=""
node('jenkins-slave-skopeo') {
def quayUser=env.QUAY_USER
def quayPassword=env.QUAY_PASS
def ocpUser=env.OCP_USER
def ocpPassword=env.OCP_PASS
stage('Clair Container Vulnerability Scan') {
echo "Printing ocp and quay users:"
echo "OCP: ${ocpUser}"
echo "OCP from env: ${env.OCP_USER}"
echo "Quay: ${quayUser}"
echo "Git repo: ${gitSourceUrl}"
sh "oc login -u $ocpUser -p $ocpPassword --insecure-skip-tls-verify https://api.cluster-ottawa-7b89.ottawa-7b89.example.opentlc.com:6443 2>&1"
sh 'skopeo --debug copy --src-creds="$(oc whoami)":"$(oc whoami -t)" --src-tls-verify=false --dest-tls-verify=false' + " --dest-creds=$quayUser:$quayPassword docker://docker-registry.default.svc:5000/cicd/petclinic:latest docker://quay.io/$quayUser/petclinic:latest"
}
stage("Tag DEV") {
echo "Tag image to DEV"
openshift.withCluster() {
openshift.withProject('cicd') {
openshift.tag("${appName}:latest", "${appName}:dev")
}
}
}
stage("Deploy DEV") {
echo "Deploy to DEV."
openshift.withCluster() {
openshift.withProject("${appName}-dev") {
echo "Rolling out to DEV."
def dc = openshift.selector('dc', "${appName}")
dc.rollout().latest()
dc.rollout().status()
}
}
}
stage("Tag for QA") {
echo "Tag to UAT"
openshift.withCluster() {
openshift.withProject('cicd') {
openshift.tag("${appName}:dev", "${appName}:uat")
}
}
}
stage("Deploy UAT") {
echo "Deploy to UAT."
openshift.withCluster() {
openshift.withProject("${appName}-uat") {
echo "Rolling out to UAT."
def dc = openshift.selector('dc', "${appName}")
dc.rollout().latest()
dc.rollout().status()
}
}
}
}
} catch (err) {
echo "in catch block"
echo "Caught: ${err}"
currentBuild.result = 'FAILURE'
throw err
}

View file

@ -1,79 +0,0 @@
apiVersion: 1.0.0
metadata:
name: petclinic-gh
projects:
- name: spring-petclinic
source:
location: 'https://github.com/pittar/spring-petclinic.git'
type: git
branch: master
components:
- id: redhat/java8/latest
type: chePlugin
- id: redhat/dependency-analytics/latest
type: chePlugin
- mountSources: true
endpoints:
- name: 8080/tcp
port: 8080
memoryLimit: 768Mi
type: dockerimage
volumes:
- name: m2
containerPath: /home/jboss/.m2
alias: maven
image: 'registry.redhat.io/codeready-workspaces/stacks-java-rhel8:2.0'
env:
- value: >-
-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4
-XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true
-Xms20m -Djava.security.egd=file:/dev/./urandom
-Duser.home=/home/jboss
name: JAVA_OPTS
- value: $(JAVA_OPTS)
name: MAVEN_OPTS
commands:
- name: build
actions:
- workdir: '${CHE_PROJECTS_ROOT}/spring-petclinic'
type: exec
command: >-
MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} -DskipTests clean
install
component: maven
- name: Debug remote java application
actions:
- referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach) - Remote",
"request": "attach",
"hostName": "localhost",
"port": 8000
}]
}
type: vscode-launch
- name: run
actions:
- workdir: '${CHE_PROJECTS_ROOT}/spring-petclinic'
type: exec
command: 'MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} spring-boot:run'
component: maven
- name: debug
actions:
- workdir: '${CHE_PROJECTS_ROOT}/spring-petclinic'
type: exec
command: >-
mvn -Duser.home=${HOME} spring-boot:run -Drun.jvmArguments="-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
component: maven
- name: test
actions:
- workdir: '${CHE_PROJECTS_ROOT}/spring-petclinic'
type: exec
command: 'MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} verify'
component: maven