-
Notifications
You must be signed in to change notification settings - Fork 1
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 #404 from outcobra/tryout/non_normaized!branch-name
Tryout/non normaized!branch name
- Loading branch information
Showing
11 changed files
with
208 additions
and
99 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,76 @@ | ||
on: | ||
push: | ||
paths: | ||
- backend/** | ||
- VERSION | ||
- .github/workflows/** | ||
pull_request: | ||
paths: | ||
- backend/** | ||
- VERSION | ||
- .github/workflows/** | ||
env: | ||
target_version: '' | ||
branch_name: '' | ||
full_version: '' | ||
|
||
jobs: | ||
prepareEnvironment: | ||
name: Setup build job environment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Determine artifact version | ||
run: echo "target_version=$(cat VERSION)" >> $GITHUB_ENV | ||
- name: Add version to artifact tag | ||
run: echo "target_version=${{ env.target_version }}.${{ github.run_number }}" >> $GITHUB_ENV | ||
- name: Add buildnumber to artifact tag | ||
run: echo ${{ env.target_version }} | ||
- name: Determine branch suffix [remove prefix] | ||
uses: frabert/[email protected] | ||
id: removeRefPrefix | ||
with: | ||
pattern: 'refs/(\w+)/(.*)' | ||
string: ${{ github.ref }} | ||
replace-with: '$2' | ||
- name: Determine branch suffix [normalize name] | ||
uses: frabert/[email protected] | ||
id: normalizeBranchName | ||
with: | ||
pattern: '[^a-zA-Z\d]' | ||
string: ${{ steps.removeRefPrefix.outputs.replaced }} | ||
flags: g | ||
replace-with: '-' | ||
- name: Determine branch suffix [write to env] | ||
run: echo "branch_name=${{ steps.normalizeBranchName.outputs.replaced }}" >> $GITHUB_ENV | ||
- name: Set full version [Part 1] | ||
run: echo "full_version=${{ env.target_version }}" >> $GITHUB_ENV | ||
- name: Set full version [Part 2] | ||
if: ${{ env.branch_name != 'master' }} | ||
run: echo "full_version=${{ env.target_version }}-${{env.branch_name}}" >> $GITHUB_ENV | ||
- name: Debug env | ||
run: echo ${{ env.full_version }} | ||
testAndBuild: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Execute Unittests | ||
run: gradle :backend:test | ||
- name: Build Jar | ||
run: gradle :backend:assemble :backend:check -x test | ||
- name: Upload jar | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: oc-server-jar | ||
path: backend/build/libs/.jar | ||
|
||
buildContainerImage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Checkout | ||
- name: Build and tag Docker image | ||
run: docker build ./backend -t diniMueter | ||
|
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,30 @@ | ||
on: | ||
push: | ||
paths: | ||
- frontend/** | ||
- VERSION | ||
- .github/workflows/** | ||
pull_request: | ||
paths: | ||
- frontend/** | ||
- VERSION | ||
- .github/workflows/** | ||
env: | ||
TARGET_VERSION: '' | ||
ARTIFACT_VERSION_TAG: '' | ||
jobs: | ||
prepareEnvironment: | ||
name: Setup build job environment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: This is going to do stuff eventually | ||
run: cat ./VERSION | ||
testAndBuild: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: This is going to do stuff eventually | ||
run: echo "Hello Angular 5 my old friend" |
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 was deleted.
Oops, something went wrong.
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,21 @@ | ||
//buildscript { | ||
// configurations { | ||
// compile | ||
// extra | ||
// } | ||
//} | ||
|
||
plugins { | ||
id("org.jetbrains.dokka") version "1.4.20" | ||
} | ||
|
||
//tasks.withType<DokkaTask>().configureEach { | ||
// | ||
//} | ||
// | ||
//dokka { | ||
// moduleName = 'outcobra-server' | ||
// outputFormat = 'javadoc' | ||
// outputDirectory = "$buildDir/javadoc" | ||
// sourceDirs = files('backend/src/main/kotlin/outcobra') | ||
//} |
Binary file not shown.
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Thu Oct 19 13:07:14 CEST 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip |
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.