-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into update-micronaut-to-4
- Loading branch information
Showing
18 changed files
with
808 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.7.2 | ||
0.10.0 |
90 changes: 90 additions & 0 deletions
90
wave-api/src/main/java/io/seqera/wave/api/BuildStatusResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/* | ||
* Copyright 2024, Seqera Labs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
package io.seqera.wave.api; | ||
|
||
import java.time.Duration; | ||
import java.time.Instant; | ||
import java.util.Objects; | ||
|
||
|
||
/** | ||
* Build status response | ||
* | ||
* @author Munish Chouhan <[email protected]> | ||
*/ | ||
public class BuildStatusResponse { | ||
public enum Status { PENDING, COMPLETED } | ||
|
||
/** Build Id */ | ||
final public String id; | ||
|
||
/** Status of image build */ | ||
final public Status status; | ||
|
||
/** Build start time */ | ||
final public Instant startTime; | ||
|
||
/** Duration to complete build */ | ||
final public Duration duration; | ||
|
||
/** Build success status */ | ||
final public Boolean succeeded; | ||
|
||
/** | ||
* This is required to allow jackson serialization - do not remove | ||
*/ | ||
private BuildStatusResponse() { | ||
id = null; | ||
status = null; | ||
startTime = null; | ||
duration = null; | ||
succeeded = null; | ||
} | ||
|
||
public BuildStatusResponse(String id, Status status, Instant startTime, Duration duration, Boolean succeeded) { | ||
this.id = id; | ||
this.status = status; | ||
this.startTime = startTime; | ||
this.duration = duration; | ||
this.succeeded = succeeded; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object object) { | ||
if (this == object) return true; | ||
if (object == null || getClass() != object.getClass()) return false; | ||
BuildStatusResponse that = (BuildStatusResponse) object; | ||
return Objects.equals(id, that.id) && status == that.status && Objects.equals(startTime, that.startTime) && Objects.equals(duration, that.duration) && Objects.equals(succeeded, that.succeeded); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(id, status, startTime, duration, succeeded); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "BuildStatusResponse{" + | ||
"id='" + id + '\'' + | ||
", status=" + status + | ||
", startTime=" + startTime + | ||
", duration=" + duration + | ||
", succeeded=" + succeeded + | ||
'}'; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
wave-api/src/main/java/io/seqera/wave/api/ImageNameStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Wave, containers provisioning service | ||
* Copyright (c) 2023-2024, Seqera Labs | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package io.seqera.wave.api; | ||
|
||
/** | ||
* Model automatic naming strategy for containers built by wave | ||
* | ||
* @author Paolo Di Tommaso <[email protected]> | ||
*/ | ||
public enum ImageNameStrategy { | ||
none, | ||
tagPrefix, | ||
imageSuffix | ||
} |
120 changes: 120 additions & 0 deletions
120
wave-api/src/main/java/io/seqera/wave/api/PackagesSpec.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
/* | ||
* Copyright 2024, Seqera Labs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
package io.seqera.wave.api; | ||
|
||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
import io.seqera.wave.config.CondaOpts; | ||
import io.seqera.wave.config.SpackOpts; | ||
/** | ||
* Model a Package environment requirements | ||
* | ||
* @author Paolo Di Tommaso <[email protected]> | ||
*/ | ||
public class PackagesSpec { | ||
|
||
public enum Type { CONDA, SPACK } | ||
|
||
public Type type; | ||
|
||
/** | ||
* The package environment file encoded as a base64 string. When this is provided the field {@link #entries} is not allowed | ||
*/ | ||
public String environment; | ||
|
||
/** | ||
* A list of one or more packages. When this is provided the field {@link #environment} is not allowed | ||
*/ | ||
public List<String> entries; | ||
|
||
/** | ||
* Conda build options | ||
*/ | ||
public CondaOpts condaOpts; | ||
|
||
/** | ||
* Spack build options | ||
*/ | ||
public SpackOpts spackOpts; | ||
|
||
/** | ||
* channels used for downloading packages | ||
*/ | ||
public List<String> channels; | ||
|
||
@Override | ||
public boolean equals(Object object) { | ||
if (this == object) return true; | ||
if (object == null || getClass() != object.getClass()) return false; | ||
PackagesSpec that = (PackagesSpec) object; | ||
return type == that.type | ||
&& Objects.equals(environment, that.environment) | ||
&& Objects.equals(entries, that.entries) | ||
&& Objects.equals(condaOpts, that.condaOpts) | ||
&& Objects.equals(spackOpts, that.spackOpts) | ||
&& Objects.equals(channels, that.channels); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(type, environment, entries, condaOpts, spackOpts, channels); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "PackagesSpec{" + | ||
"type=" + type + | ||
", envFile='" + environment + '\'' + | ||
", packages=" + entries + | ||
", condaOpts=" + condaOpts + | ||
", spackOpts=" + spackOpts + | ||
", channels=" + ObjectUtils.toString(channels) + | ||
'}'; | ||
} | ||
|
||
public PackagesSpec withType(Type type) { | ||
this.type = type; | ||
return this; | ||
} | ||
|
||
public PackagesSpec withEnvironment(String encoded) { | ||
this.environment = encoded; | ||
return this; | ||
} | ||
|
||
public PackagesSpec withEntries(List<String> entries) { | ||
this.entries = entries; | ||
return this; | ||
} | ||
|
||
public PackagesSpec withChannels(List<String> channels) { | ||
this.channels = channels; | ||
return this; | ||
} | ||
|
||
public PackagesSpec withCondaOpts(CondaOpts opts) { | ||
this.condaOpts = opts; | ||
return this; | ||
} | ||
|
||
public PackagesSpec withSpackOpts(SpackOpts opts) { | ||
this.spackOpts = opts; | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.