travis configuration, and baseUrl mods to image URLs

This commit is contained in:
Jim Schubert 2019-01-03 23:39:39 -05:00
parent 148041812e
commit 009e2f3ea7
6 changed files with 35 additions and 17 deletions

View File

@ -3,7 +3,6 @@ language: java
jdk:
- openjdk8
cache:
directories:
- $HOME/.m2
@ -34,6 +33,7 @@ cache:
- $HOME/samples/server/petstore/cpp-pistache/pistache
- $HOME/.npm
- $HOME/.rvm/gems/ruby-2.4.1
- $HOME/website/node_modules/
services:
- docker
@ -102,6 +102,7 @@ before_install:
gpg --keyserver keyserver.ubuntu.com --recv-key $SIGNING_KEY ;
gpg --check-trustdb ;
fi;
- pushd .; cd website; npm install; popd
install:
# Add Godeps dependencies to GOPATH and PATH
@ -152,6 +153,15 @@ after_success:
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && docker build -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/openapi-generator-online && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME && echo "Pushed to $DOCKER_GENERATOR_IMAGE_NAME"; fi; fi
## docker: build cli image and push to Docker Hub
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && cp docker-entrypoint.sh ./modules/openapi-generator-cli && docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/openapi-generator-cli && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME && echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME"; fi; fi
## publish latest website, variables below are secure environment variables which are unavailable to PRs from forks.
- if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
cd website;
git config --global user.name "${GH_NAME}";
git config --global user.email "${GH_EMAIL}";
echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc;
npm install;
GIT_USER="${GH_NAME}" npm run-script publish-gh-pages;
fi;
env:
- DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli NODE_ENV=test CC=gcc-5 CXX=g++-5

View File

@ -29,7 +29,7 @@ The docker images are available on DockerHub: https://hub.docker.com/u/openapito
**CLI for OpenAPI Generator**
Image to run OpenAPI Generator in the command line (see [OpenAPI Generator CLI Docker Image](../README.md#openapi-generator-cli-docker-image))
Image to run OpenAPI Generator in the command line (see [OpenAPI Generator CLI Docker Image](https://github.com/OpenAPITools/openapi-generator/blob/master/README.md#openapi-generator-cli-docker-image))
Old: `swaggerapi/swagger-codegen-cli`
@ -37,7 +37,7 @@ New: `openapitools/openapi-generator-cli`
**OpenAPI Generator as web service**
Image to run OpenAPI Generator as a web service (see [OpenAPI Generator Online Docker Image](../README.md#openapi-generator-online-docker-image))
Image to run OpenAPI Generator as a web service (see [OpenAPI Generator Online Docker Image](https://github.com/OpenAPITools/openapi-generator/blob/master/README.md#openapi-generator-online-docker-image))
Old: `swaggerapi/swagger-generator`

View File

@ -303,7 +303,7 @@ class Index extends React.Component {
.filter(user => user.pinned)
.map(user => (
<a href={user.infoLink} key={user.infoLink}>
<img src={user.image} alt={user.caption} title={user.caption} />
<img src={baseUrl + user.image} alt={user.caption} title={user.caption} />
</a>
));

View File

@ -29,10 +29,13 @@ const MediaLink = props => {
};
const Member = ({member}) => {
const { baseUrl } = siteConfig;
const { github, twitter, name, joined } = member;
const avatarUrl = `https://avatars.githubusercontent.com/${github}`;
const twitterUrl = `https://twitter.com/${twitter}`;
const githubUrl = `https://github.com/${github}`;
const ghIcon = `${baseUrl}img/icons/github.svg`;
const twitterIcon = `${baseUrl}img/icons/twitter.svg`;
return (
<div className="member">
@ -43,14 +46,14 @@ const Member = ({member}) => {
<div style={{ fontWeight: 600 }}>{name}</div>
<MediaLink
iconAlt="github"
iconSource="/img/icons/github.svg"
iconSource={ghIcon}
size="16"
url={githubUrl}
text={github}
/>
<MediaLink
iconAlt="twitter"
iconSource="/img/icons/twitter.svg"
iconSource={twitterIcon}
size="16"
url={twitterUrl}
text={twitter}
@ -76,8 +79,8 @@ const MemberGroup = props => {
class Team extends React.Component {
render() {
const team = siteConfig.team;
const editUrl = `${siteConfig.repoUrl}/edit/master/website/dynamic/team.yml`;
const {team, repoUrl} = siteConfig;
const editUrl = `${repoUrl}/edit/master/website/dynamic/team.yml`;
return (
<div>
<EditThisPage title="The Team" url={editUrl} />

View File

@ -17,16 +17,21 @@ const Container = CompLibrary.Container;
class Users extends React.Component {
render() {
const {config: siteConfig} = this.props;
const {baseUrl, repoUrl} = siteConfig;
if ((siteConfig.users || []).length === 0) {
return null;
}
const editUrl = `${siteConfig.repoUrl}/edit/master/website/dynamic/team.yml`;
const showcase = siteConfig.users.map(user => (
const editUrl = `${repoUrl}/edit/master/website/dynamic/team.yml`;
const showcase = siteConfig.users.map(user => {
let imgUrl = `${baseUrl}${user.infoLink.startsWith("/") ? user.image : "/" + user.image}`;
return (
<a href={user.infoLink} key={user.infoLink}>
<img src={user.image} alt={user.caption} title={user.caption} />
<img src={imgUrl} alt={user.caption} title={user.caption}/>
</a>
));
);
}
);
return (
<Container padding={['bottom']}>

View File

@ -13,15 +13,15 @@ const users = loadYaml("dynamic/users.yml");
const siteConfig = {
title: 'OpenAPI Generator', // Title for your website.
tagline: 'Generate clients, servers, and documentation from OpenAPI 2.0/3.x documents',
url: 'https://your-docusaurus-test-site.com', // Your website URL
baseUrl: '/', // Base URL for your project */
url: 'https://OpenAPITools.github.io', // Your website URL
baseUrl: '/openapi-generator/', // Base URL for your project */
// For github.io type URLs, you would set the url and baseUrl like:
// url: 'https://facebook.github.io',
// baseUrl: '/test-site/',
// Used for publishing and more
projectName: 'openapi-generator',
organizationName: 'openapitools',
organizationName: 'OpenAPITools',
// For top-level user or org sites, the organization is still the same.
// e.g., for the https://JoelMarcey.github.io site, it would be set like...
// organizationName: 'JoelMarcey'