Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit 4b12fad

Browse files
committed
drop support for bitbucket
1 parent 7b58005 commit 4b12fad

File tree

4 files changed

+6
-178
lines changed

4 files changed

+6
-178
lines changed

.github/workflows/ktorbase-example.yml

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -81,75 +81,3 @@ jobs:
8181
BACKEND_BASE_URL: https://ktorbase.opencpms.io/
8282
BACKEND_PORT: 443
8383
run: ./gradlew integrationTest
84-
85-
bitbucket-build-and-test:
86-
needs: github-build-and-test
87-
runs-on: ubuntu-latest
88-
steps:
89-
- uses: actions/cache@v2
90-
with:
91-
path: |
92-
~/.gradle/caches
93-
~/.gradle/wrapper
94-
key: ${{ runner.os }}-gradle-example-ktorbase-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
95-
restore-keys: |
96-
${{ runner.os }}-gradle-example-ktorbase-
97-
98-
# ktor prevents compile-time 11, see: https://youtrack.jetbrains.com/issue/KTOR-619
99-
- name: Set up JDK 8
100-
uses: actions/setup-java@v2
101-
with:
102-
java-version: '8'
103-
distribution: 'adopt'
104-
105-
- name: Install SSH key
106-
uses: shimataro/ssh-key-action@v2
107-
with:
108-
name: id_rsa
109-
key: ${{ secrets.BITBUCKET_SSH_KEY }}
110-
known_hosts: ${{ secrets.BITBUCKET_KNOWN_HOSTS }}
111-
112-
- name: Clone from Bitbucket
113-
run: >
114-
git clone [email protected]:linked-planet/com.linked-planet.ktor-bitbucket-example.git /tmp/com.linked-planet.ktor-bitbucket-example
115-
116-
- name: Update
117-
run: >
118-
BRANCH=${GITHUB_REF#refs/heads/};
119-
curl -O -s "https://raw.githubusercontent.com/linked-planet/ktorbase/$BRANCH/update.sh";
120-
sh ./update.sh /tmp/com.linked-planet.ktor-bitbucket-example com.linked-planet ktor-example "$BRANCH"
121-
122-
- name: Commit and Push to Bitbucket
123-
run: |
124-
ORIG_DIR=$(pwd);
125-
cd /tmp/com.linked-planet.ktor-bitbucket-example;
126-
git config --global user.email "${{ secrets.BITBUCKET_USER_MAIL }}";
127-
git config --global user.name "${{ secrets.BITBUCKET_USER_NAME }}";
128-
git add -A;
129-
echo "Identifying changes ...";
130-
git status --porcelain;
131-
if ! git diff-index --quiet HEAD --; then git commit -m "updated project from Github commit ${GITHUB_SHA} (${GITHUB_REF})" && touch "$ORIG_DIR/run_pipeline"; fi;
132-
git push
133-
134-
- name: Watch Bitbucket Pipeline
135-
run: |
136-
if [ ! -f run_pipeline ]; then echo "-> Skip this step as nothing was pushed to Bitbucket" && exit 0; fi
137-
cd /tmp/com.linked-planet.ktor-bitbucket-example;
138-
BITBUCKET_COMMIT_HASH=$(git log --format="%h" -n 1);
139-
echo "Searching Pipeline for commit $BITBUCKET_COMMIT_HASH in Bitbucket ...";
140-
sleep 30;
141-
BITBUCKET_PIPELINE_RESPONSE=$(curl -s "https://api.bitbucket.org/2.0/repositories/linked-planet/com.linked-planet.ktor-bitbucket-example/commit/$BITBUCKET_COMMIT_HASH/statuses");
142-
BITBUCKET_PIPELINE_ERROR=$(echo "$BITBUCKET_PIPELINE_RESPONSE" | jq -r '.error.message');
143-
if [[ $BITBUCKET_PIPELINE_ERROR == "Commit not found" ]]; then echo "-> Nothing to commit and therewith no Pipeline run" && exit 0; fi;
144-
BITBUCKET_PIPELINE_LINK=$(echo $BITBUCKET_PIPELINE_RESPONSE | jq -r '.values[0].url');
145-
echo "Watching Pipeline $BITBUCKET_PIPELINE_LINK in Bitbucket ...";
146-
BITBUCKET_PIPELINE_STATE=$(echo $BITBUCKET_PIPELINE_RESPONSE | jq -r '.values[0].state');
147-
while [ $BITBUCKET_PIPELINE_STATE = "INPROGRESS" ]; do \
148-
echo "Pipeline still running, waiting ..."; \
149-
sleep 5;
150-
BITBUCKET_PIPELINE_RESPONSE=$(curl -s "https://api.bitbucket.org/2.0/repositories/linked-planet/com.linked-planet.ktor-bitbucket-example/commit/$BITBUCKET_COMMIT_HASH/statuses"); \
151-
BITBUCKET_PIPELINE_STATE=$(echo $BITBUCKET_PIPELINE_RESPONSE | jq -r '.values[0].state'); \
152-
done;
153-
if [[ $BITBUCKET_PIPELINE_STATE == "FAILED" || $BITBUCKET_PIPELINE_STATE == "STOPPED" ]]; then echo "-> Bitbucket Pipeline failed/stopped" && exit 1; fi;
154-
if [[ $BITBUCKET_PIPELINE_STATE == "SUCCESSFUL" ]]; then echo "-> Bitbucket Pipeline succedded" && exit 0; fi;
155-
echo "-> Unknown Error with Bitbucket Pipeline" && exit 1

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ A template for a Kotlin fullstack web application.
1414
- [AWS Container Insights Prometheus Metrics Monitoring][aws-prometheus]
1515
- [jmx-exporter.yml](docker-build/jmx-exporter.yml)
1616
- [start.sh](docker-build/start.sh)
17-
- Bitbucket Pipelines CI/CD
18-
- [bitbucket-pipelines.yml](bitbucket-pipelines.yml)
17+
- GitHub Actions CI/CD
18+
- [.github/workflows](.github/workflows)
1919
- [Ktor OneLogin SAML Integration][ktor-onelogin-saml]
2020
- [Typesafe Config][tsconfig]
2121
- [application.conf](backend/src/main/resources/application.conf)
@@ -154,11 +154,11 @@ please tell us :-)
154154

155155
## Deployment
156156
### Overview
157-
[Bitbucket Pipelines][bitbucket-pipelines] is used to build a
157+
[GitHub Actions][github-actions] is used to build a
158158
[Docker][docker] image and deploy the application on
159159
[AWS Elastic Container Service][aws-ecs] via [AWS CloudFormation][aws-cloudformation].
160160

161-
- If you don't use Bitbucket Pipelines, delete [bitbucket-pipelines.yml](bitbucket-pipelines.yml)
161+
- If you don't use GitHub Actions, delete [.github](.github)
162162
- If you don't use AWS (or you don't want to use our template), delete
163163
the [aws](aws) folder
164164
- If you don't use Docker either, delete the [docker-build](docker-build) directory
@@ -199,7 +199,7 @@ It is used to encrypt the data stored within the session cookie.**
199199

200200

201201
## Template License
202-
Written in 2020-2021 by [linked-planet GmbH](https://www.linked-planet.com).
202+
Written in 2020-2022 by [linked-planet GmbH](https://www.linked-planet.com).
203203

204204
To the extent possible under law, the author(s) have dedicated all copyright and related
205205
and neighboring rights to this template to the public domain worldwide.
@@ -215,7 +215,7 @@ This template is distributed without any warranty. See <http://creativecommons.o
215215
[sass]: https://sass-lang.com/
216216
[sassy-vs-scss]: http://thesassway.com/editorial/sass-vs-scss-which-syntax-is-better
217217
[ktor-onelogin-saml]: https://github.com/linked-planet/ktor-onelogin-saml
218-
[bitbucket-pipelines]: https://bitbucket.org/product/features/pipelines
218+
[github-actions]: https://github.com/features/actions
219219
[docker]: https://www.docker.com/
220220
[aws-ecs]: https://aws.amazon.com/ecs/
221221
[aws-cloudformation]: https://aws.amazon.com/cloudformation/

bitbucket-pipelines.yml

Lines changed: 0 additions & 93 deletions
This file was deleted.

frontend/build.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import org.jetbrains.kotlin.gradle.targets.js.nodejs.*
2-
31
val buildVersion: String = System.getProperty("buildVersion", "BUILD_VERSION")
42
val kotlinVersion: String by project
53

@@ -85,8 +83,3 @@ dependencies {
8583
implementation(devNpm("file-loader", "6.2.0"))
8684
implementation(devNpm("@babel/core", "7.12.9"))
8785
}
88-
89-
// without this, node will fail to execute in the Bitbucket Pipeline Build Container
90-
rootProject.plugins.withType(NodeJsRootPlugin::class.java) {
91-
rootProject.the<NodeJsRootExtension>().download = false
92-
}

0 commit comments

Comments
 (0)