Skip to content

Commit 9f275fa

Browse files
authored
Feature/golang (#195)
Fixes #40 Fixes #42 Fixes #128
1 parent 298eba7 commit 9f275fa

File tree

221 files changed

+5443
-8349
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+5443
-8349
lines changed

.cobra.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
author: The Titan Project Contributors
2+
license: Apache-2.0

.github/workflows/end-to-end-test.yml

Lines changed: 10 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,74 +5,28 @@ on:
55
- cron: '30 3 * * *'
66

77
jobs:
8-
build-linux:
9-
name: Build Linux
10-
runs-on: ubuntu-18.04
11-
steps:
12-
- uses: actions/checkout@v1
13-
- uses: actions/setup-java@v1
14-
with:
15-
java-version: '8.0.212'
16-
- name: Setup Env
17-
run: ./scripts/setup.sh ubuntu-18.04
18-
- name: Build Jar
19-
run: ./scripts/compile-maven.sh
20-
- name: Compile Binary
21-
run: ./scripts/build.sh ubuntu-18.04
22-
- name: Upload Binary
23-
uses: actions/upload-artifact@master
24-
with:
25-
name: titan-linux.zip
26-
path: ./titan
278
test-linux:
289
name: Test Linux
2910
runs-on: ubuntu-18.04
30-
needs: build-linux
3111
steps:
3212
- uses: actions/checkout@v1
33-
- uses: actions/download-artifact@master
34-
with:
35-
name: titan-linux.zip
36-
path: ./
3713
- name: Config Git
3814
run: |
3915
git config --global user.name "test.runner"
4016
git config --global user.email "[email protected]"
41-
- name: Install Titan
17+
- name: Output Kernel Info
4218
run: |
43-
chmod +x titan
44-
sudo cp ./titan /usr/local/bin/titan
45-
- name: Install Vexrun
46-
run: |
47-
curl -L https://github.com/mcred/vexrun/releases/download/v0.0.5/vexrun-0.0.5.jar -o vexrun.jar
48-
- name: Run Getting Started Tests
49-
run: java -jar vexrun.jar -d ./src/endtoend-test/getting-started
50-
- name: Run Multiple Context tests
51-
run: java -jar vexrun.jar -d ./src/endtoend-test/multi-context
52-
- name: Run S3 Workflow Tests
53-
run: java -jar vexrun.jar -f ./src/endtoend-test/remotes/s3/s3WorkflowTests.yml
54-
env:
55-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
56-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
57-
AWS_REGION: ${{ secrets.AWS_REGION }}
58-
- name: Run SSH Workflow Tests
19+
docker pull busybox
20+
docker run busybox uname -a
21+
- name: Build Titan
22+
run: make build
23+
- name: Setup Test Requirements
5924
run: |
25+
export PATH=$GITHUB_WORKSPACE/build:$PATH
6026
ssh-keygen -b 2048 -t rsa -f ./sshKey -q -N ""
61-
java -jar vexrun.jar -f ./src/endtoend-test/remotes/ssh/sshWorkflowTests.yml
62-
- name: Run Tag Tests
63-
run: java -jar vexrun.jar -d ./src/endtoend-test/tags
64-
env:
65-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
66-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
67-
AWS_REGION: ${{ secrets.AWS_REGION }}
68-
- name: Run DB Matrix Tests
69-
run: java -jar vexrun.jar -f ./src/endtoend-test/db-matrix/databases.yml
27+
- name: Run Test Suit
28+
run: make e2e
7029
env:
7130
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
7231
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
73-
AWS_REGION: ${{ secrets.AWS_REGION }}
74-
- name: Build Nginx Docker Container
75-
working-directory: ./src/endtoend-test/context/docker
76-
run: docker build -t nginx-test .
77-
- name: Run Docker Context Tests
78-
run: java -jar vexrun.jar -d ./src/endtoend-test/context/docker
32+
AWS_REGION: ${{ secrets.AWS_REGION }}

.github/workflows/publish.yml

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

.github/workflows/pull-request.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ jobs:
1313
os: [ubuntu-18.04, windows-2019, macos-latest]
1414
steps:
1515
- uses: actions/checkout@v1
16-
- uses: actions/setup-java@v1
17-
with:
18-
java-version: '8.0.212'
19-
- name: Run Maven Tests
20-
run: ./mvnw clean verify
16+
- name: Test Build
17+
run: make build
18+
shell: bash
2119
docs:
2220
name: Build Documentation
2321
runs-on: ubuntu-18.04

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ bin
1111
coverage
1212
/titan
1313
/titan*.zip
14-
releases
14+
release
15+
build
1516

1617
# Development files
1718
/notes
@@ -26,3 +27,4 @@ releases
2627
# Testing Files
2728
sshKey
2829
sshKey.pub
30+

.mvn/wrapper/MavenWrapperDownloader.java

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

.mvn/wrapper/maven-wrapper.jar

-49.5 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

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

DEVELOPING.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,11 @@ For general information about contributing changes, see the
55

66
## How it Works
77

8-
Titan is written with Kotlin for JVM and binaries are compiled using GraalVM.
8+
Titan is written with GoLang,
99

1010
## Requirements
11-
* openjdk 1.8.0_212 (see notes for GraalVM)
12-
* [GraalVM](https://www.graalvm.org/)
13-
14-
###Setting up GraalVM
15-
* [Install GraalVM](https://www.graalvm.org/docs/getting-started/#install-graalvm)
16-
* Set JAVA_HOME to be the openjdk include with GraalVM
17-
* Add the GraalVM bin directory to your PATH
11+
* GoLang 1.13.5
12+
* Make
1813

1914
###Setting up Documentation Building
2015
Please read the details in /docs/README.md. As a prerequisite, you must:
@@ -28,19 +23,17 @@ pip install virtualenv
2823

2924
## Building
3025
```bash
31-
./mvnw clean install
32-
java -jar ./target/titan-VERSION-jar-with-dependencies.jar
26+
make build
3327
```
3428

35-
Once the jar is created, native binaries can be built with the following scripts.
36-
```bash
37-
./scripts/build-osx.sh
38-
./scripts/build-linux.sh
39-
4029
## Testing
30+
Titan testing is handled by a simple e2e framework. Full test suite requires that an SSH Key and AWS CLI are configured.
31+
```bash
32+
make e2e
33+
```
4134

42-
Describe how to test the project.
4335

4436
## Releasing
45-
46-
The version for the CLI is maintained with the `VERSION` file. Bump the version in this file and then run `./scripts/compile-maven.sh` to update the version in the POM.xml file and build a new versioned jar. Currently, an OSX binary release file needs to be committed to a proper release directory. If you are on OSX, run `./scripts/build-osx.sh` to create this file. CI/CD will handle the rest of the builds.
37+
```bash
38+
make release
39+
```

Dockerfile

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

0 commit comments

Comments
 (0)