Adds a docker image and build task for said image
This commit is contained in:
parent
37ba232a54
commit
d87c0192ac
6 changed files with 110 additions and 2 deletions
40
Dockerfile
Normal file
40
Dockerfile
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
FROM git.zontreck.com/packages/flutter:latest as BUILDER
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY ./pubspec.yaml ./
|
||||||
|
COPY ./cli ./
|
||||||
|
COPY ./lib ./
|
||||||
|
COPY ./android ./
|
||||||
|
COPY ./linux ./
|
||||||
|
COPY ./ios ./
|
||||||
|
COPY ./macos ./
|
||||||
|
COPY ./test ./
|
||||||
|
COPY ./web ./
|
||||||
|
COPY ./windows ./
|
||||||
|
COPY ./analysis_options.yaml ./
|
||||||
|
|
||||||
|
|
||||||
|
RUN dart pub get
|
||||||
|
RUN dart fix --apply
|
||||||
|
RUN dart compile exe -o bugvaultd cli/server.dart
|
||||||
|
|
||||||
|
FROM git.zontreck.com/packages/flutter:latest
|
||||||
|
|
||||||
|
LABEL author Tara Piccari
|
||||||
|
LABEL email tarapiccari@gmail.com
|
||||||
|
|
||||||
|
ENV BUGVAULT_DATA_DIRECTORY /data
|
||||||
|
|
||||||
|
COPY --from=BUILDER /app/bugvaultd /sbin/bugvaultd
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
|
COPY ./docker-entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
WORKDIR /data
|
||||||
|
RUN useradd -s /bin/bash -d /data -M bugvault
|
||||||
|
|
||||||
|
USER bugvault:bugvault
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/entrypoint.sh" ]
|
54
Jenkinsfile
vendored
54
Jenkinsfile
vendored
|
@ -130,5 +130,59 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage("Build Server") {
|
||||||
|
agent {
|
||||||
|
label 'linux'
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
sh '''
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
dart pub get
|
||||||
|
mkdir out
|
||||||
|
dart compile exe -o out/server cli/server.dart
|
||||||
|
|
||||||
|
mv out/server bugvaultd
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
archiveArtifacts artifacts: "bugvaultd"
|
||||||
|
|
||||||
|
cleanWs()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage("Build Docker") {
|
||||||
|
agent {
|
||||||
|
label 'dockermain'
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
sh '''
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
docker build -t git.zontreck.com/packages/bugvault:latest "$(pwd)"
|
||||||
|
docker push git.zontreck.com/packages/bugvault:latest
|
||||||
|
|
||||||
|
docker rmi -f git.zontreck.com/packages/bugvault:latest
|
||||||
|
docker buildx prune -a -f
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
cleanWs()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
9
cli/server.dart
Normal file
9
cli/server.dart
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
Future<int> main(List<String> args) async {
|
||||||
|
print("Starting BugVault Server...");
|
||||||
|
|
||||||
|
// Check for settings.dat, which should contain all basic information.
|
||||||
|
// Then check if any data exists. If not, create data hierarchy
|
||||||
|
|
||||||
|
print("Thank you for choosing BugVault! - Shutting down...");
|
||||||
|
return 0;
|
||||||
|
}
|
4
docker-entrypoint.sh
Normal file
4
docker-entrypoint.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "Welcome to BugVault - Docker"
|
||||||
|
/sbin/bugvaultd
|
|
@ -1,4 +1,4 @@
|
||||||
class Constants {
|
class Constants {
|
||||||
static const VERSION = "1.0.031425+2339";
|
static const VERSION = "1.0.031525+0003";
|
||||||
static const APP_NAME = "BugVault";
|
static const APP_NAME = "BugVault";
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.031425+2339
|
version: 1.0.031525+0003
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.7.0
|
sdk: ^3.7.0
|
||||||
|
@ -40,6 +40,7 @@ dependencies:
|
||||||
libac_dart:
|
libac_dart:
|
||||||
hosted: https://git.zontreck.com/api/packages/Packages/pub/
|
hosted: https://git.zontreck.com/api/packages/Packages/pub/
|
||||||
version: 1.4.20325+1215
|
version: 1.4.20325+1215
|
||||||
|
totp: ^0.1.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue