-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
13,871 additions
and
6,435 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,3 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"] | ||
} |
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,7 @@ | ||
#!/bin/bash | ||
|
||
oc login $OPENSHIFT_URL --token=$OPENSHIFT_TOKEN --certificate-authority=/tmp/openshift.crt | ||
echo "Redeploying..." | ||
oc rollout latest cv-ci -n mydata | ||
oc logout | ||
rm /tmp/openshift.crt |
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,6 @@ | ||
{ | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS", | ||
"pre-commit": "lint-staged" | ||
} | ||
} |
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,3 @@ | ||
{ | ||
"*.js": "npm run lint" | ||
} |
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,39 @@ | ||
{ | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"npmPublish": false | ||
} | ||
], | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": ["package.json"], | ||
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}" | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"publishCmd": "docker build -t jobtechswe/mydata-cv ." | ||
} | ||
], | ||
[ | ||
"semantic-release-docker", | ||
{ | ||
"registryUrl": "docker.io", | ||
"name": "jobtechswe/mydata-cv" | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"publishCmd": "bash ./.deploy.bash ${nextRelease.version}" | ||
} | ||
] | ||
] | ||
} |
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,37 @@ | ||
# The jobs section declares jobs available in this build context | ||
jobs: | ||
include: | ||
# lint and run tests | ||
- stage: "lint-and-test" | ||
name: "Lint, run tests" | ||
language: node_js | ||
install: | ||
- npm ci | ||
script: | ||
- npm run testAndLint | ||
|
||
- stage: publish | ||
name: "Run semantic-release and publish a new version" | ||
language: node_js | ||
install: | ||
- npm ci | ||
# Install a new version of the openshift cli | ||
- mkdir -p /opt/openshift | ||
- wget -qO- https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz | tar xvzf - -C /opt/openshift --strip-components=1 | ||
- export PATH=$PATH:/opt/openshift | ||
- echo $OPENSHIFT_CERT | base64 --decode > /tmp/openshift.crt | ||
script: | ||
- npx semantic-release | ||
|
||
# Flow control | ||
# This section defines the order in which stages are run and when to run certain stages | ||
stages: | ||
- name: lint-and-test | ||
if: branch != master AND tag IS NOT present | ||
- name: publish | ||
if: (branch = master AND type != pull_request) | ||
|
||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: change |
Oops, something went wrong.