Skip to content

Commit

Permalink
Merge branch 'master' into brig/allow-regexp-in-filters
Browse files Browse the repository at this point in the history
  • Loading branch information
brig authored Dec 25, 2023
2 parents b973042 + d07ffc9 commit 01d0cea
Show file tree
Hide file tree
Showing 203 changed files with 1,751 additions and 583 deletions.
13 changes: 13 additions & 0 deletions .github/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>gha</id>
<properties>
<it.skipDocker>true</it.skipDocker>
</properties>
</profile>
</profiles>
</settings>

30 changes: 7 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,12 @@ jobs:
build:
strategy:
matrix:
jdk_version: ['17']
jdk_version: [ '17' ]
fail-fast: false

runs-on: self-hosted
runs-on: ubuntu-latest

steps:
- name: Clear /tmp
run: |
docker run --rm -v /tmp:/data alpine find /data -ctime +2 -exec rm -rf '{}' \; 2>&1 > /dev/null || true
- name: Clear old Docker resources
run: |
docker rm -f $(docker ps -aq) || true
docker volume rm $(docker volume ps -q) || true
docker system prune -af || true
docker image prune -af || true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
Expand All @@ -42,21 +31,16 @@ jobs:
username: ${{ secrets.OSS_DOCKERHUB_USERNAME }}
password: ${{ secrets.OSS_DOCKERHUB_PASSWORD }}

- uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '${{ matrix.jdk_version }}'
distribution: 'temurin'

- name: Remove old Concord artifacts
run: |
rm -rf ~/.m2/repository/com/walmartlabs/concord
rm -rf ~/actions-runner/.m2/repository/com/walmartlabs/concord
- name: Checkout
uses: actions/checkout@v3

- name: Build and test with Maven
run: ./mvnw -B clean install -Pdocker -Pit -Pjdk${{ matrix.jdk_version }}

- name: Build with debian docker images
run: ./mvnw -C -B -f docker-images install -DskipTests -Pdocker -Pdebian -Pjdk${{ matrix.jdk_version }}
env:
SKIP_DOCKER_TESTS: "true"
run: ./mvnw -s .github/settings.xml -B clean install -Pgha -Pdocker -Pit -Pjdk${{ matrix.jdk_version }}
96 changes: 95 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,89 @@
# Change log

## [2.5.0] - 2023-12-10

### Added

- concord-server: support @Priority annotation when binding
Jetty components
([#841](https://github.com/walmartlabs/concord/pull/841));

### Changed

- runtime-v2: allow "true|false" string in if expression
([#844](https://github.com/walmartlabs/concord/pull/844));
- docker-images: Upgrade default Ansible installation to 2.14
([#843](https://github.com/walmartlabs/concord/pull/843));
- ansible-plugin: callback compatibility for Ansible 2.14
([#842](https://github.com/walmartlabs/concord/pull/842));
- concord-server: resume process now returns BAD_REQUEST
if no event found
([#838](https://github.com/walmartlabs/concord/pull/838)).

### Breaking

- docker-images: drop CentOS-based images, use Debian by default
([#843](https://github.com/walmartlabs/concord/pull/843).



## [2.4.0] - 2023-11-26

### Added

- concord-server: add `EXTRA_CLASSPATH` to start script
([#836](https://github.com/walmartlabs/concord/pull/836));

### Changed

- concord-agent-operator: use JDK 17 base image
([#836](https://github.com/walmartlabs/concord/pull/836));
- concord-common: shared ObjectMapperProvider
([#836](https://github.com/walmartlabs/concord/pull/836)).



## [2.3.0] - 2023-11-21

### Added

- testing-concord-server: add getter for the server instance
([#832](https://github.com/walmartlabs/concord/pull/832));
- testing-concord-server: add agent wrapper, simple test
([835](https://github.com/walmartlabs/concord/pull/835)).

### Changed

- project: attach source jars only on release
([#832](https://github.com/walmartlabs/concord/pull/832));
- concord-server: auto-wire modules in concord-server/dist
instead of impl
([#834](https://github.com/walmartlabs/concord/pull/834)).



## [2.2.0] - 2023-11-13

### Added

- pfed-sso: enable bearer token authentication
([#811](https://github.com/walmartlabs/concord/pull/811)).

### Changed

- runtime-v2: fix exit from parallel loop #830
([#830](https://github.com/walmartlabs/concord/pull/830));
- console2: calculate process duration from process last running timestamp
([#794](https://github.com/walmartlabs/concord/pull/794));
- console2: do not drop secrets form values on error/password check fail
([#798](https://github.com/walmartlabs/concord/pull/798));
- project: attach javadoc jars only on release
([#823](https://github.com/walmartlabs/concord/pull/823));
- project: upgrade to source level 17
([#824](https://github.com/walmartlabs/concord/pull/824));
- project: remove more @Named usage
([#828](https://github.com/walmartlabs/concord/pull/828)).

## [2.1.0] - 2023-10-10

### Added
Expand Down Expand Up @@ -31,9 +115,10 @@
- cli: active profiles fix
([#789](https://github.com/walmartlabs/concord/pull/789)).

## [2.0.0] - 2023-08-16


## [2.0.0] - 2023-08-16

# Breaking

- project: drop support for JDK 8 and JDK 11. Make JDK 17
Expand Down Expand Up @@ -90,6 +175,8 @@ auth ([#764](https://github.com/walmartlabs/concord/pull/764));
- console2: do not remove project after rename;
([#770](https://github.com/walmartlabs/concord/pull/770)).



## [1.102.0] - 2023-05-22

### Added
Expand Down Expand Up @@ -124,6 +211,8 @@ improve error messages
- runtime-v2: allow increment variables in expressions
([#740](https://github.com/walmartlabs/concord/pull/740)).



## [1.101.0] - 2023-03-29

### Added
Expand Down Expand Up @@ -170,6 +259,8 @@ forms
- concord-server: remove more @Named usage
([#650](https://github.com/walmartlabs/concord/pull/650)).



## [1.99.0] - 2023-02-24

### Added
Expand Down Expand Up @@ -376,6 +467,7 @@ to support k8s 1.22+
([#639](https://github.com/walmartlabs/concord/pull/639)).



## [1.95.0] - 2022-04-16

### Added
Expand Down Expand Up @@ -417,6 +509,8 @@ files ([#593](https://github.com/walmartlabs/concord/pull/593)).
- it: explicitly specify initialBranch for git tests
([#582](https://github.com/walmartlabs/concord/pull/582)).



## [1.93.3] - 2022-03-11

### Changed
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ different systems together using scenarios and plugins created by users.

Dependencies:
- [Git](https://git-scm.com/) 2.18+
- [Java 8](https://adoptium.net/)
- [Java 17](https://adoptium.net/)
- [Docker Community Edition](https://www.docker.com/community-edition)
- [Docker Buildx](https://docs.docker.com/build/buildx/install/)
- (Optional) [NodeJS and NPM](https://nodejs.org/en/download/) (Node 16 or greater)
Expand All @@ -39,14 +39,13 @@ cd concord
Available Maven profiles:

- `docker` - build Docker images;
- `debian` - build Debian-based Docker images instead of the default CentOS base;
- `it` - run integration tests;
- `jdk17`, `jdk17-aarch64` - use a different JDK version for building artifacts and Docker images.
- `jdk17-aarch64` - use a different JDK version for building artifacts and Docker images.

Profiles can be combined, e.g.

```
./mvnw clean install -Pdocker -Pdebian -Pit -Pjdk17-aarch64
./mvnw clean install -Pdocker -Pit -Pjdk17-aarch64
```

## Console
Expand Down Expand Up @@ -122,4 +121,4 @@ See the [examples](examples) directory.

## Development Notes

See [NOTES.md](NOTES.md).
See [NOTES.md](NOTES.md).
14 changes: 9 additions & 5 deletions agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.walmartlabs.concord</groupId>
<artifactId>parent</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.5.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -81,6 +81,14 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
Expand Down Expand Up @@ -125,10 +133,6 @@
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-guava</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions agent/src/main/java/com/walmartlabs/concord/agent/Agent.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,13 @@
import org.slf4j.LoggerFactory;

import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicBoolean;

@Named
@Singleton
public class Agent {

private static final Logger log = LoggerFactory.getLogger(Agent.class);
Expand Down
82 changes: 82 additions & 0 deletions agent/src/main/java/com/walmartlabs/concord/agent/AgentModule.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
package com.walmartlabs.concord.agent;

/*-
* *****
* Concord
* -----
* Copyright (C) 2017 - 2023 Walmart Inc.
* -----
* 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.
* =====
*/

import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.inject.Binder;
import com.google.inject.Module;
import com.typesafe.config.Config;
import com.walmartlabs.concord.agent.cfg.*;
import com.walmartlabs.concord.agent.executors.runner.DefaultDependencies;
import com.walmartlabs.concord.agent.executors.runner.ProcessPool;
import com.walmartlabs.concord.agent.remote.ApiClientFactory;
import com.walmartlabs.concord.agent.remote.QueueClientProvider;
import com.walmartlabs.concord.common.ObjectMapperProvider;
import com.walmartlabs.concord.server.queueclient.QueueClient;
import com.walmartlabs.ollie.config.ConfigurationProcessor;
import com.walmartlabs.ollie.config.Environment;
import com.walmartlabs.ollie.config.EnvironmentSelector;

import javax.inject.Named;

import static com.google.inject.Scopes.SINGLETON;

@Named
public class AgentModule implements Module {

private final Config config;

public AgentModule() {
this(loadDefaultConfig());
}

public AgentModule(Config config) {
this.config = config;
}

@Override
public void configure(Binder binder) {
binder.bind(ObjectMapper.class).toProvider(ObjectMapperProvider.class);
binder.bind(Config.class).toInstance(config);

binder.bind(AgentConfiguration.class).in(SINGLETON);
binder.bind(DockerConfiguration.class).in(SINGLETON);
binder.bind(GitConfiguration.class).in(SINGLETON);
binder.bind(ImportConfiguration.class).in(SINGLETON);
binder.bind(PreForkConfiguration.class).in(SINGLETON);
binder.bind(RepositoryCacheConfiguration.class).in(SINGLETON);
binder.bind(RunnerV1Configuration.class).in(SINGLETON);
binder.bind(RunnerV2Configuration.class).in(SINGLETON);
binder.bind(ServerConfiguration.class).in(SINGLETON);

binder.bind(DefaultDependencies.class).in(SINGLETON);
binder.bind(ProcessPool.class).in(SINGLETON);
binder.bind(ApiClientFactory.class).in(SINGLETON);
binder.bind(QueueClient.class).toProvider(QueueClientProvider.class).in(SINGLETON);

binder.bind(Agent.class).in(SINGLETON);
}

private static Config loadDefaultConfig() {
Environment env = new EnvironmentSelector().select();
return new ConfigurationProcessor("concord-agent", env, null, null).process();
}
}
Loading

0 comments on commit 01d0cea

Please sign in to comment.