Skip to content

Commit

Permalink
feat: 🎸 deploy openshift app as part of semantic-release (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
raduachim authored Aug 29, 2019
1 parent 4c2470f commit 04b5a06
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 14 deletions.
7 changes: 7 additions & 0 deletions .deploy.bash
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 operator-ci -n mydata
oc logout
rm /tmp/openshift.crt
7 changes: 6 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/github",
[
"@semantic-release/git",
Expand All @@ -17,6 +16,12 @@
"registryUrl": "docker.io",
"name": "jobtechswe/mydata-operator"
}
],
[
"@semantic-release/exec",
{
"publishCmd": "bash ./deploy.bash ${nextRelease.version}"
}
]
]
}
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
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:
- docker build -t jobtechswe/mydata-operator .
- npx semantic-release
Expand Down
49 changes: 37 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"uuid": "3.3.2"
},
"devDependencies": {
"@semantic-release/changelog": "^3.0.4",
"@semantic-release/exec": "^3.3.6",
"@semantic-release/git": "^7.0.16",
"@types/axios": "0.14.0",
"@types/ioredis": "4.0.10",
Expand Down

0 comments on commit 04b5a06

Please sign in to comment.