-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #221 from bcgov/dev
merge release 2.0.1 to master There errors in the github actions build are a failure to contact slack. I suspect this was setup when we were using slack and before it was shut done. I'm going to ignore the error and proceed with the merge.
- Loading branch information
Showing
209 changed files
with
18,038 additions
and
203 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,49 @@ | ||
name: GitHub CI for Router | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
branches: | ||
- master | ||
- dev | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
java_version: [1.11] | ||
os: [ubuntu-latest] | ||
pom_ver: [2.0.0] | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v1 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java_version }} | ||
- name: Update Maven Release Version | ||
run: mvn versions:set -DnewVersion='${{ matrix.pom_ver }}' -DgenerateBackupPoms=false --file pom.xml | ||
- name: Build with Maven and Scan with SonarQube | ||
env: | ||
SONAR_URL: ${{ secrets.SONAR_URL }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: mvn clean package sonar:sonar -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_TOKEN --file pom.xml | ||
- uses: 8398a7/action-slack@v1 | ||
with: | ||
type: failure | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK }} | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
if: failure() | ||
- uses: 8398a7/action-slack@v1 | ||
with: | ||
type: success | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK }} | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
if: success() |
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,16 @@ | ||
name: sidecar package | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
dockerize: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v1 | ||
- name: One Click Docker | ||
uses: pangzineng/Github-Action-One-Click-Docker@v1.1.1 |
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,10 @@ | ||
FROM maven:3-jdk-11-slim AS builder | ||
ADD . /app | ||
WORKDIR /app | ||
RUN mvn versions:set -DnewVersion='1' -DgenerateBackupPoms=false && mvn package | ||
|
||
FROM busybox | ||
RUN mkdir /app | ||
COPY --from=builder /app/ols-*/target/ols-*.war /app/ | ||
RUN ls -la /app/ | ||
CMD ["tail", "-f", "/dev/null"] |
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,65 @@ | ||
pipeline { | ||
agent any | ||
options { | ||
buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '1')) | ||
} | ||
parameters { | ||
string(defaultValue: 'https://github.com/bcgov/ols-router.git', description: 'Source Code Repo URL', name: 'gitRepo') | ||
string(defaultValue: 'dev', description: 'Git Branch or Tag Name', name: 'gitBranch') | ||
choice(name: 'pn', choices: ['ols-router-admin', 'ols-router-web'], description: 'Product Name to build, used by docker package') | ||
string(defaultValue: '2.0.0-SNAPSHOT', description: 'Version Tag will be used by Arctifactory', name: 'mvnTag', trim: false) | ||
string(defaultValue: 'clean package -Pk8s -pl ${pn} -am', description: 'default maven life cycle goal', name: 'mvnGoal', trim: false) | ||
} | ||
stages { | ||
stage ('code checkout') { | ||
steps { | ||
git branch: '${gitBranch}', url: "${gitRepo}" | ||
} | ||
} | ||
|
||
stage('build && SonarQube analysis') { | ||
environment { | ||
scannerHome = tool 'appqa' | ||
} | ||
steps { | ||
withSonarQubeEnv('SonarQube') { | ||
withMaven(maven:'m3') { | ||
sh 'mvn clean package sonar:sonar -Dsonar.java.source=11' | ||
} | ||
} | ||
} | ||
} | ||
/* stage("Quality Gate") { | ||
steps { | ||
timeout(time: 1, unit: 'MINUTES') { | ||
waitForQualityGate abortPipeline: false | ||
} | ||
} | ||
} */ | ||
|
||
stage ('create docker sidecar image') { | ||
steps { | ||
script { | ||
def ocDir = tool "oc3.11" | ||
withEnv(["PATH+OC=${ocDir}"]) { | ||
openshift.withCluster() { | ||
def models = openshift.process( "-f", "https://raw.githubusercontent.com/bcgov/ols-router/tools/ols-router.bc.yaml", "-p", "PROJ_NAME=${pn}", "SITE_REPO=${gitRepo}", "REPO_BRANCH=${gitBranch}", "MVN_GOAL=${mvnGoal}" ) | ||
openshift.delete( models ) | ||
def created = openshift.create( models ) | ||
def bc = openshift.selector( 'bc', [build: '${pn}'] ) | ||
def statusv = openshift.raw( 'status', '-v' ) | ||
echo "Cluster status: ${statusv.out}" | ||
def buildSelector = bc.startBuild() | ||
buildSelector.logs('-f') | ||
def result = buildSelector.logs('-f') | ||
def logsString = result.actions[0].out | ||
def logsErr = result.actions[0].err | ||
echo "The logs operation require ${result.actions.size()} oc interactions" | ||
echo "Logs executed: ${result.actions[0].cmd}" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.