-
Notifications
You must be signed in to change notification settings - Fork 32
Develop->Master #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Develop->Master #360
Changes from all commits
965cc0c
e3684ed
4d7bdb7
fa01d62
ef10268
2ea5555
b1c51ba
35e7479
8d0e981
2a7474a
7e58f55
835b9cc
9ac1aba
2384e3b
48f8e29
c3e81fb
ad5e402
2813c80
965b840
8fc4c60
76e3728
5be329c
782e415
b7b7d16
ebfcf73
c03ad16
7df70d8
55a2d35
0325651
492c5f7
23401e5
e7ad917
6d0d36f
ad6b089
51a73c7
9a37a53
861d335
54ac374
b2f6651
1c53e97
3ef8ad2
71fc4d7
b9a313a
60d9939
0f955f3
cf29601
2eacd99
07a0a3c
401b3d7
29d1ee5
6eecbf5
e9dd950
03c6a09
8b2d1e6
f22afe7
f7f7f26
dad228a
830e4af
c1b938c
13caa04
3acd45d
28f15f5
85bc764
edd9146
8f14d80
1a1e51e
89e620e
2501e08
ad8134e
0ab2a97
3a7e1b2
cedcfc2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
name: Basic kb-sdk functionality tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- main | ||
- master | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- closed | ||
|
||
jobs: | ||
test_kb-sdk_builds: | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04, ubuntu-latest] | ||
language: [perl, python, java] | ||
test_type: [base] #, example] | ||
auth: [token, env_var] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
# build kb-sdk from source and test basic functions | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 8.0.362+9 | ||
|
||
- name: Build with Ant | ||
run: | | ||
make | ||
|
||
- name: Add bin to $PATH | ||
run: | | ||
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH | ||
|
||
- name: checking kb-sdk functions | ||
env: | ||
KBASE_TEST_TOKEN: ${{ secrets.KBASE_TEST_TOKEN }} | ||
LANGUAGE_TOKEN: ${{ matrix.language }} | ||
run: | | ||
env | ||
kb-sdk help | ||
kb-sdk version | ||
|
||
# the following steps create a KBase app using the SDK | ||
# and runs some checks to ensure the app generated | ||
# is functional and that the SDK can test it. | ||
- name: init base repo | ||
if: matrix.test_type == 'base' | ||
env: | ||
LANGUAGE_TOKEN: ${{ matrix.language }} | ||
run: | | ||
kb-sdk init -l $LANGUAGE_TOKEN -u user SampleApp | ||
|
||
- name: init example repo | ||
if: matrix.test_type == 'example' | ||
env: | ||
LANGUAGE_TOKEN: ${{ matrix.language }} | ||
run: | | ||
kb-sdk init -l $LANGUAGE_TOKEN -u user --example SampleApp | ||
|
||
- name: test ${{ matrix.test_type }} repo, using test.cfg for auth | ||
if: matrix.auth == 'token' | ||
run: | | ||
cd SampleApp | ||
kb-sdk test || true | ||
|
||
- name: test ${{ matrix.test_type }} repo, using test.cfg for auth, add env var to test.cfg | ||
if: matrix.auth == 'token' | ||
env: | ||
KBASE_TEST_TOKEN: ${{ secrets.KBASE_TEST_TOKEN }} | ||
run: | | ||
cd SampleApp | ||
sed -i "s/test_token=/test_token=$KBASE_TEST_TOKEN/" test_local/test.cfg | ||
kb-sdk test | ||
|
||
- name: test ${{ matrix.test_type }} repo, using env var for auth | ||
if: matrix.auth == 'env_var' | ||
env: | ||
KBASE_TEST_TOKEN: ${{ secrets.KBASE_TEST_TOKEN }} | ||
run: | | ||
cd SampleApp | ||
kb-sdk test | ||
|
||
- name: make resulting app available as artefact in case of failure | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: kbaseapp-${{ matrix.language }}-${{ matrix.test_type }}-${{ matrix.os }} | ||
path: SampleApp | ||
|
||
|
||
test_existing_repos: | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04, ubuntu-latest] | ||
# TODO: add a Java app. WsLargeDataIO does not currently build as it relies on a Java | ||
# repo that no longer exists. | ||
app: [KBaseReport] # , WsLargeDataIO] | ||
auth: [token, env_var] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 8.0.362+9 | ||
|
||
- name: Build with Ant | ||
run: | | ||
make | ||
|
||
- name: Add bin to $PATH | ||
run: | | ||
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH | ||
|
||
- name: checking basic kb-sdk functions | ||
run: | | ||
env | ||
kb-sdk help | ||
kb-sdk version | ||
|
||
# the following steps check out and run the tests of an existing KBase app | ||
- name: Checkout existing kbase module ${{ matrix.app }} | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: kbaseapps/${{ matrix.app }} | ||
path: kbase_app | ||
|
||
- name: run repo tests, using test.cfg for auth | ||
if: matrix.auth == 'token' | ||
run: | | ||
cd kbase_app | ||
kb-sdk test || true | ||
|
||
- name: run repo tests, using test.cfg for auth | ||
if: matrix.auth == 'token' | ||
env: | ||
KBASE_TEST_TOKEN: ${{ secrets.KBASE_TEST_TOKEN }} | ||
run: | | ||
cd kbase_app | ||
sed -i "s/test_token=/test_token=$KBASE_TEST_TOKEN/" test_local/test.cfg | ||
kb-sdk test | ||
|
||
- name: run repo tests, using env var for auth | ||
if: matrix.auth == 'env_var' | ||
env: | ||
KBASE_TEST_TOKEN: ${{ secrets.KBASE_TEST_TOKEN }} | ||
run: | | ||
cd kbase_app | ||
kb-sdk test | ||
|
||
- name: make resulting app available as artefact in case of failure | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: kbaseapp-${{ matrix.app }}-${{ matrix.os }} | ||
path: kbase_app | ||
Comment on lines
+104
to
+174
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
name: Manual Build & Push | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build-push: | ||
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main | ||
with: | ||
name: '${{ github.event.repository.name }}-develop' | ||
tags: br-${{ github.ref_name }} | ||
secrets: inherit | ||
Comment on lines
+7
to
+11
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
name: Pull Request Build, Tag, & Push | ||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- main | ||
- master | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- closed | ||
jobs: | ||
build-develop-open: | ||
if: github.base_ref == 'develop' && github.event.pull_request.merged == false | ||
uses: kbase/.github/.github/workflows/reusable_build.yml@main | ||
secrets: inherit | ||
build-develop-merge: | ||
Comment on lines
+16
to
+19
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
if: github.base_ref == 'develop' && github.event.pull_request.merged == true | ||
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main | ||
with: | ||
name: '${{ github.event.repository.name }}-develop' | ||
tags: pr-${{ github.event.number }},latest | ||
secrets: inherit | ||
build-main-open: | ||
Comment on lines
+20
to
+26
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == false | ||
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main | ||
with: | ||
name: '${{ github.event.repository.name }}' | ||
tags: pr-${{ github.event.number }} | ||
secrets: inherit | ||
build-main-merge: | ||
Comment on lines
+27
to
+33
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == true | ||
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main | ||
with: | ||
name: '${{ github.event.repository.name }}' | ||
tags: pr-${{ github.event.number }},latest-rc | ||
secrets: inherit | ||
trivy-scans: | ||
Comment on lines
+34
to
+40
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
if: (github.base_ref == 'develop' || github.base_ref == 'main' || github.base_ref == 'master' ) && github.event.pull_request.merged == false | ||
uses: kbase/.github/.github/workflows/reusable_trivy-scans.yml@main | ||
secrets: inherit | ||
Comment on lines
+41
to
+43
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Release - Build & Push Image | ||
on: | ||
release: | ||
branches: | ||
- main | ||
- master | ||
types: [ published ] | ||
jobs: | ||
check-source-branch: | ||
uses: kbase/.github/.github/workflows/reusable_validate-branch.yml@main | ||
with: | ||
build_branch: '${{ github.event.release.target_commitish }}' | ||
validate-release-tag: | ||
Comment on lines
+11
to
+14
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
needs: check-source-branch | ||
uses: kbase/.github/.github/workflows/reusable_validate-release-tag.yml@main | ||
with: | ||
release_tag: '${{ github.event.release.tag_name }}' | ||
build-push: | ||
Comment on lines
+15
to
+19
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
needs: validate-release-tag | ||
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main | ||
with: | ||
name: '${{ github.event.repository.name }}' | ||
tags: '${{ github.event.release.tag_name }},latest' | ||
secrets: inherit | ||
Comment on lines
+20
to
+25
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
FROM ubuntu:14.04 | ||
MAINTAINER Shane Canon <[email protected]> | ||
FROM ubuntu:20.04 | ||
LABEL MAINTAINER KBase developers | ||
|
||
# Update apt and install jdk and docker engine to get docker clients | ||
# Docker installation instructions from https://docs.docker.com/engine/install/ubuntu/ | ||
RUN apt-get -y update && \ | ||
apt-get -y install openjdk-7-jdk make git ant && \ | ||
apt-get -y install apt-transport-https ca-certificates && \ | ||
apt-key adv \ | ||
--keyserver hkp://ha.pool.sks-keyservers.net:80 \ | ||
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \ | ||
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list && \ | ||
apt-get -y update && apt-get -y install docker-engine=1.11.2-0~trusty | ||
DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata openjdk-8-jdk make git ant curl gnupg-agent apt-transport-https ca-certificates software-properties-common && \ | ||
update-java-alternatives -s java-1.8.0-openjdk-amd64 && \ | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ | ||
add-apt-repository \ | ||
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | ||
$(lsb_release -cs) \ | ||
stable" && \ | ||
apt-get -y update && \ | ||
apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin | ||
|
||
# Add kb-sdk src and fix CallbackServer interface | ||
ADD . /src | ||
|
||
# Add kb_sdk src and fix CallbackServer interface | ||
RUN \ | ||
cd /src && \ | ||
sed -i 's/en0/eth0/' src/java/us/kbase/common/executionengine/CallbackServer.java && \ | ||
make && \ | ||
/src/entrypoint prune && rm -rf /src/.git | ||
cd /src && \ | ||
sed -i 's/en0/eth0/' src/java/us/kbase/common/executionengine/CallbackServer.java && \ | ||
make && \ | ||
/src/entrypoint prune && rm -rf /src/.git | ||
|
||
ENV PATH=$PATH:/src/bin | ||
|
||
|
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium